实验要求:
![](https://i-blog.csdnimg.cn/blog_migrate/895ef7707b66d8f48c214eab279b4fbf.jpeg)
r1:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r1
[r1]user-i
[r1]user-interface c
[r1]user-interface console 0
[r1-ui-console0]id
[r1-ui-console0]idle-timeout 0 0
[r1-ui-console0]q
[r1]in g 0/0/0
[r1-GigabitEthernet0/0/0]ip add int 12.1.1.1 24
^
Error: Wrong parameter found at '^' position.
[r1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
[r1-GigabitEthernet0/0/0]
Jan 4 2023 21:49:57-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]q
[r1]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip add 14.1.1.2 24
Jan 4 2023 21:51:31-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]int
[r1]interface l
[r1]interface LoopBack 0
[r1-LoopBack0]ip add 1.1.1.1 24
[r1-LoopBack0]dis ip int bri
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 12.1.1.1/24 up up
GigabitEthernet0/0/1 14.1.1.2/24 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 1.1.1.1/24 up up(s)
NULL0 unassigned up up(s)
[r1-LoopBack0]q
[r1]ip r
[r1]ip ro
[r1]ip route-static 2.2.2.2 24 12.1.1.2
Info: The destination address and mask of the configured static route mismatched, and the static route 2.2.2.0/24 was generated.
[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=100 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=30 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/38/100 ms
[r1]ip ro
[r1]ip route
[r1]ip route-static 23.1.1.0 24 12.1.1.2
[r1]ping 23.1.1.1
PING 23.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 23.1.1.1: bytes=56 Sequence=1 ttl=255 time=30 ms
Reply from 23.1.1.1: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 23.1.1.1: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 23.1.1.1: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 23.1.1.1: bytes=56 Sequence=5 ttl=255 time=20 ms
--- 23.1.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/26/30 ms
[r1]ip rou
[r1]ip route
[r1]ip route
[r1]ip route
[r1]ping 23.1.1.2
PING 23.1.1.2: 56 data bytes, press CTRL_C to break
Request time out
Reply from 23.1.1.2: bytes=56 Sequence=2 ttl=254 time=60 ms
Reply from 23.1.1.2: bytes=56 Sequence=3 ttl=254 time=40 ms
Reply from 23.1.1.2: bytes=56 Sequence=4 ttl=254 time=30 ms
Reply from 23.1.1.2: bytes=56 Sequence=5 ttl=254 time=30 ms
--- 23.1.1.2 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 30/40/60 ms
[r1]ip rou
[r1]ip route
[r1]ip route-static 3.3.3.3 24 12.1.1.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]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=254 time=30 ms
Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=254 time=30 ms
Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=254 time=40 ms
Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=254 time=30 ms
Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=254 time=30 ms
--- 3.3.3.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/32/40 ms
[r1]ip rou
[r1]ip route
[r1]ip route-static 4.4.4.4 24 14.1.1.1
Info: The destination address and mask of the configured static route mismatched, and the static route 4.4.4.0/24 was generated.
[r1]ping 4.4.4.4
PING 4.4.4.4: 56 data bytes, press CTRL_C to break
Reply from 4.4.4.4: bytes=56 Sequence=1 ttl=255 time=130 ms
Reply from 4.4.4.4: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 4.4.4.4: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 4.4.4.4: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 4.4.4.4: bytes=56 Sequence=5 ttl=255 time=20 ms
--- 4.4.4.4 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/44/130 ms
[r1]ip rou
[r1]ip route
[r1]ip route-static 34.1.1.0 24 14.1.1.1
[r1]ping 34.1.1.2
PING 34.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 34.1.1.2: bytes=56 Sequence=1 ttl=255 time=30 ms
Reply from 34.1.1.2: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 34.1.1.2: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 34.1.1.2: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 34.1.1.2: bytes=56 Sequence=5 ttl=255 time=30 ms
--- 34.1.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/28/30 ms
[r1]ping 34.1.1.1
PING 34.1.1.1: 56 data bytes, press CTRL_C to break
Request time out
Reply from 34.1.1.1: bytes=56 Sequence=2 ttl=254 time=20 ms
Reply from 34.1.1.1: bytes=56 Sequence=3 ttl=254 time=20 ms
Reply from 34.1.1.1: bytes=56 Sequence=4 ttl=254 time=40 ms