1.配置R1端口ip
<Huawei>
<Huawei>sys
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]interf
[R1]interface gi
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 12.1.1.1 24
[R1-GigabitEthernet0/0/0]
2.配置R2端口ip,并测试连通性
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 12.1.1.2 24
Sep 30 2023 23:08:23-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R2-GigabitEthernet0/0/0]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=200 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=30 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/58/200 ms
[R2-GigabitEthernet0/0/0]q
[R2]
3.配置R1远程登录密码
<R1>system-view
Enter system view, return user view with Ctrl+Z.
[R1]user-in
[R1]user-interface vty 0 4
[R1-ui-vty0-4]set au
[R1-ui-vty0-4]set authentication pass
[R1-ui-vty0-4]set authentication password cipher Huawei
[R1-ui-vty0-4]user pri
[R1-ui-vty0-4]user privilege level 15
[R1-ui-vty0-4]
4.通过R2远程登录R1
[R2]
<R2>telnet 12.1.1.1
Press CTRL_] to quit telnet mode
Trying 12.1.1.1 ...
Connected to 12.1.1.1 ...
Login authentication
Password:
<R1>sys
<R1>system-view
Enter system view, return user view with Ctrl+Z.
[R1]