要求
1.所有设备必要有预配,都得改名r1,r2
<Huawei>sy
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sy
[Huawei]sysname r1
[r1]ue
[r1]us
[r1]user-bind
[r1]user-group
[r1]user-interface con
[r1]user-interface console 0
[r1-ui-console0]idle
[r1-ui-console0]idle-timeout 0 0
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r2
[r2]user-bind
[r2]user-group
[r2]user-interface co
[r2]user-interface console 0
[r2-ui-console0]id
[r2-ui-console0]idle-timeout 0 0
[r2-ui-console0]
2.r1用密码加密,密码为金城
[r1]user-interface console 0
[r1-ui-console0]authentication-mode password
Please configure the login password (maximum length 16):jincheng
[r1-ui-console0]quit
[r1]quit
<r1>quit
Configuration console exit, please press any key to log on
Login authentication
Password:
<r1>
3.r2使用用户名为jincheng,权限为15,密码为xueyuan
r2使用用户名为xuesheng,权限为0,密码为123
[r2]aaa
[r2-aaa]local-user jincheng privilege level 15 password cipher xueyuan
Info: Add a new user.
[r2-aaa]local-user jincheng service-type terminal
[r2-aaa]local-user xuesheng privilege level 0 password cipher 123
Info: Add a new user.
[r2-aaa]quit
[r2]user-interface console 0
[r2-ui-console0]authentication-mode aaa
[r2-ui-console0]quit
[r2-ui-console0]quit
[r2]quit
<r2>quit
Configuration console exit, please press any key to log on
Login authentication
Username:jincheng
Password:
<r2>quit
Configuration console exit, please press any key to log on
Login authentication
Username:xuesheng
Password:
<r2>
4.r1 可以ping通r2,地址为192.168.1.0/24
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
Oct 30 2022 09:45:12-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r1-GigabitEthernet0/0/0]quit
[r1]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 2
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 2
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.1/24 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
[r1]
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ip ad
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 24
Oct 30 2022 09:46:02-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r2-GigabitEthernet0/0/0]