路由器
1,loopback 路由器的逻辑接口
int loopback 0 配置Loopback接口
作业
所有ping通
R1路由器配置与结果
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn r1
[r1]int loo
[r1]int LoopBack 0
[r1-LoopBack0]ip add 1.1.1.1 32
[r1-LoopBack0]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.10.1 24
Apr 6 2021 13:52:56-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]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 192.168.20.1 24
Apr 6 2021 13:53:32-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r1-GigabitEthernet0/0/1]q
[r1]ip ro
[r1]ip route-st
[r1]ip route-static 2.2.2.2 32 192.168.20.2
[r1]ip ro
[r1]ip route-s
[r1]ip route-static 3.3.3.3 24 192.168.10.2
Info: The destination address and mask of the configured static route mismatched
, and the static route 3.3.3.0/24 was generated.
[r1]ip route-static 3.3.3.3 32 192.168.10.2
[r1]ping 2.2.2.2
PING 2.2.2.2: 56 data bytes, press CTRL_C to break
Reply from 2.2.2.2: bytes=56 Sequence=1 ttl=255 time=20 ms
Reply from 2.2.2.2: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 2.2.2.2: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 2.2.2.2: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 2.2.2.2: bytes=56 Sequence=5 ttl=255 time=20 ms
— 2.2.2.2 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/20/20 ms
[r1]ping 3.3.3.3
PING 3.3.3.3: 56 data bytes, press CTRL_C to break
Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=255 time=10 ms
Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=255 time=10 ms
Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=255 time=20 ms
— 3.3.3.3 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/18/30 ms
r2路由器配置与结果
The device is running!
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn r2
[r2]int l
[r2]int LoopBack 0
[r2-LoopBack0]ip add 2.2.2.2 32
[r2-LoopBack0]int g0/0/1
[r2-GigabitEthernet0/0/1]ip ad 192.168.20.2 24
Apr 6 2021 13:54:53-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r2-GigabitEthernet0/0/1]int g0/0/0
[r2-GigabitEthernet0/0/0]ip ad 192.168.30.1 24
Apr 6 2021 13:55:18-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]
Please check whether system data has been changed, and save data in time
Configuration console time out, please press any key to log on
sys Enter system view, return user view with Ctrl+Z. [r2]ip ro [r2]ip route-s [r2]ip route-static 1.1.1.1 32 192.168.20.1 [r2]ip ro [r2]ip route-s [r2]ip route-static 3.3.3.3 32 192.168.30.2 [r2] [r2] [r2]ping 1.1.1.1 PING 1.1.1.1: 56 data bytes, press CTRL_C to break Reply from 1.1.1.1: bytes=56 Sequence=1 ttl=255 time=60 ms Reply from 1.1.1.1: bytes=56 Sequence=2 ttl=255 time=1 ms Reply from 1.1.1.1: bytes=56 Sequence=3 ttl=255 time=20 ms Reply from 1.1.1.1: bytes=56 Sequence=4 ttl=255 time=30 ms Reply from 1.1.1.1: bytes=56 Sequence=5 ttl=255 time=20 ms— 1.1.1.1 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/26/60 ms
[r2]ping 3.3.3.3
PING 3.3.3.3: 56 data bytes, press CTRL_C to break
Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=255 time=20 ms