[Huawei]undo info-center enable //关闭路由器输出信息
[R1]interface g0/0/0 //进入接口G0/0/0
[R1-GigabitEthernet0/0/0]ip address 12.1.1.1 24 //配置IP地址
[R1-GigabitEthernet0/0/0]undo shutdown //打开接口
[R1-GigabitEthernet0/0/0]quit 退出
[R1]ping 12.1.1.2 使用ping命令测试R1访问R2的网络连通性
PING 12.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 12.1.1.2: bytes=56 Sequence=1 ttl=255 time=130 ms
Reply from 12.1.1.2: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 12.1.1.2: bytes=56 Sequence=3 ttl=255 time=70 ms
Reply from 12.1.1.2: bytes=56 Sequence=4 ttl=255 time=60 ms
Reply from 12.1.1.2: bytes=56 Sequence=5 ttl=255 time=60 ms
--- 12.1.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/68/130 ms
[R1]ip route-static 23.1.1.0 255.255.255.0 12.1.1.2
[R1]ip route-static 23.1.1.0 255.255.255.0 g0/0/0
[R1]ip route-static 23.1.1.0 255.255.255.0 g0/0/0 12.1.1.2
[R1]ip route-static 23.1.1.0 255.255.255.0 12.1.1.2
Error: The route already exists.
[R1]display ip routing-table 查看路由表
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 5 Routes : 7
Destination/Mask Proto Pre Cost Flags NextHop Interface
12.1.1.0/24 Direct 0 0 D 12.1.1.1 GigabitEthernet
0/0/0
12.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
23.1.1.0/24 Static 60 0 RD 12.1.1.2 GigabitEthernet
0/0/0
Static 60 0 D 12.1.1.1 GigabitEthernet
0/0/0
Static 60 0 D 12.1.1.2 GigabitEthernet
0/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
<R1>ping 23.1.1.3 使用ping命令测试R1访问R3的网络连通性
PING 23.1.1.3: 56 data bytes, press CTRL_C to break
Reply from 23.1.1.3: bytes=56 Sequence=1 ttl=254 time=80 ms
Reply from 23.1.1.3: bytes=56 Sequence=2 ttl=254 time=60 ms
Reply from 23.1.1.3: bytes=56 Sequence=3 ttl=254 time=50 ms
Reply from 23.1.1.3: bytes=56 Sequence=4 ttl=254 time=70 ms
Reply from 23.1.1.3: bytes=56 Sequence=5 ttl=254 time=90 ms
--- 23.1.1.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 50/70/90 ms
<Huawei>system-view 进入系统视图
[Huawei]undo info-center enable 关闭路由器输出信息
[Huawei]sysname R2
[R2]interface g0/0/1 进入接口G0/0/1
[R2-GigabitEthernet0/0/1]ip address 12.1.1.2 24 配置IP地址
[R2-GigabitEthernet0/0/1]undo shutdown 打开接口
[R2-GigabitEthernet0/0/1]quit
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]ip address 23.1.1.2 24
[R2-GigabitEthernet0/0/0]undo shutdown
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R2-GigabitEthernet0/0/0]quit
[R2]ping 23.1.1.3使用ping命令测试R2访问R3的网络连通性
PING 23.1.1.3: 56 data bytes, press CTRL_C to break
Reply from 23.1.1.3: bytes=56 Sequence=1 ttl=255 time=130 ms
Reply from 23.1.1.3: bytes=56 Sequence=2 ttl=255 time=60 ms
Reply from 23.1.1.3: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 23.1.1.3: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 23.1.1.3: bytes=56 Sequence=5 ttl=255 time=30 ms
--- 23.1.1.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/56/130 ms
<R2>display ip routing-table 查看路由表
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public Destinations : 6 Routes : 6
Destination/Mask Proto Pre Cost Flags NextHop Interface
12.1.1.0/24 Direct 0 0 D 12.1.1.2 GigabitEthernet
0/0/1
12.1.1.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
23.1.1.0/24 Direct 0 0 D 23.1.1.2 GigabitEthernet
0/0/0
23.1.1.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/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
<Huawei>system-view
[Huawei]undo info-center enable
Info: Information center is disabled.
[Huawei]sysname R3
[R3]interface g0/0/1
[R3-GigabitEthernet0/0/1]ip address 23.1.1.3 24
[R3-GigabitEthernet0/0/1]undo shutdown
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R3-GigabitEthernet0/0/1]quit
[R3]ip route-static 12.1.1.0 24 23.1.1.2
<R3>display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 5 Routes : 5
Destination/Mask Proto Pre Cost Flags NextHop Interface
12.1.1.0/24 Static 60 0 RD 23.1.1.2 GigabitEthernet
0/0/1
23.1.1.0/24 Direct 0 0 D 23.1.1.3 GigabitEthernet
0/0/1
23.1.1.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
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