第1章 基本配置

图片[1]-第1章 基本配置-大赛人网
图1-1 基本配置网络拓扑

1.设备启动模式:用户模式(用户视图),用<>表示

<Huawei>

2.进入特权模式

<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]

3.进入接口模式,退出使用quit命令

[Huawei]interface  GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]quit
[Huawei]

4.设置设备名称

[Huawei]sysname R1
[R1]

5.设置console口密码,设置认证方式

[R1]user-interface console 0
[R1-ui-console0]authentication-mode ?
  aaa       AAA authentication
  password  Authentication through the password of a user terminal interface

[R1-ui-console0]authentication-mode password 
Please configure the login password (maximum length 16):
dsrw
[R1-ui-console0]set authentication password cipher dsrw.com
[R1-ui-console0]quit
[R1]
[R1]aaa
[R1-ui-console0]authentication-mode aaa 
[R1-ui-console0]quit
[R1-aaa]local-user dsrw password cipher dsrw.com

6.路由协议模式

[R1]rip
[R1-rip-1]quit
[R1]ospf 1
[R1-ospf-1]quit
[R1]isis
[R1-isis-1]quit
[R1]bgp 1234
[R1-bgp]quit
[R1]

7.设置系统时间和时区(用户视图模式下)

<R1>clock timezone beijing add 8
<R1>clock datetime 11:25:30 2023-1-31

8.设置telnet登录密码,aaa认证方式设置权限等级等

用户级0为参观级、1为监控级、2为配置级、3~15为管理级
[Huawei]user-interface vty 0 4
[Huawei-ui-vty0-4]authentication-mode password 
Please configure the login password (maximum length 16):dsrw
[Huawei-ui-vty0-4]set authentication password cipher dsrw.com
[Huawei-ui-vty0-4]quit
[R1]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode aaa
[R1-ui-vty0-4]quit
[R1]aaa
[R1-aaa]local-user dsrw password cipher dsrw.com
[R1-aaa]local-user dsrw privilege level 3
[R1-aaa]local-user dsrw service-type telnet

9.保存配置

<R1>save
  The current configuration will be written to the device. 
  Are you sure to continue? (y/n)[n]:y

10.清空配置

<R1>reset saved-configuration
This will delete the configuration in the flash memory.
The device configurations will be erased to reconfigure.
Are you sure? (y/n)[n]:y

11.显示当前运行配置信息

<R1>display current-configuration 
[V200R003C00]
#
 sysname R1

12.路由器接口配置IP地址,关闭与激活接口

[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 12.1.1.1 8
[R1-GigabitEthernet0/0/0]shutdown 
[R1-GigabitEthernet0/0/0]undo shutdown 

13.显示接口状态信息

[R1]display interface GigabitEthernet 0/0/0
GigabitEthernet0/0/0 current state : UP
Line protocol current state : UP
Last line protocol up time : 2023-01-31 12:04:16 UTC-08:00
Description:HUAWEI, AR Series, GigabitEthernet0/0/0 Interface
Route Port,The Maximum Transmit Unit is 1500
Internet Address is 12.1.1.1/8

14.网络连通性测试(R2配置对应IP地址)

[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ip address 12.1.1.2 8
[R2]ping 12.1.1.1
  PING 12.1.1.1: 56  data bytes, press CTRL_C to break
    Reply from 12.1.1.1: bytes=56 Sequence=1 ttl=255 time=80 ms
    Reply from 12.1.1.1: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 12.1.1.1: bytes=56 Sequence=3 ttl=255 time=20 ms
    Reply from 12.1.1.1: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 12.1.1.1: bytes=56 Sequence=5 ttl=255 time=20 ms

  --- 12.1.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/32/80 ms

15.路由跟踪

[R1]tracert 12.1.1.2
 traceroute to  12.1.1.2(12.1.1.2), max hops: 30 ,packet length: 40,press CTRL_C to break 
 1 12.1.1.2 10 ms  10 ms  10 ms 

16.查看路由表

[R1]display ip routing-table 
Route Flags: R - relay, D - download to fib
Routing Tables: Public
         Destinations : 7        Routes : 7  Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

       12.0.0.0/8   Direct  0    0           D   12.1.1.1        GigabitEthernet0/0/0
       12.1.1.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/0
 12.255.255.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/0
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

17.关闭信息提示,系统视图下执行

[R1]undo info-center enable 
Info: Information center is disabled.

18.关闭终端显示信息中心发送信息的功能,用户视图下执行

<R1>undo terminal monitor 
Info: Current terminal monitor is off.
<R1>u t m #简写
© 版权声明
THE END
喜欢就支持一下吧
点赞10 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称

    请登录后查看评论内容