R5配置IP地址和静态路由
<R5>sys
Enter system view, return user view with Ctrl+Z.
[R5]undo info-center enable
Info: Information center is disabled.
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 10.9.40.2 24
[R5]ip route-static 10.9.100.0 24 g0/0/0
R5路由表
[R5]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 8 Routes : 8
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.9.40.0/24 Direct 0 0 D 10.9.40.2 GigabitEthernet0/0/0
10.9.40.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
10.9.40.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
10.9.100.0/24 Static 60 0 D 10.9.40.2 GigabitEthernet0/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
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
[R5]
R6配置IP地址和静态路由
<R6>sys
Enter system view, return user view with Ctrl+Z.
[R6]undo info-center enable
Info: Information center is disabled.
[R6]int g0/0/0
[R6-GigabitEthernet0/0/0]ip add 10.9.100.3 24
[R6-GigabitEthernet0/0/0]quit
[R6]ip route-static 10.9.40.0 24 g0/0/0
R6路由表
<R6>dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 8 Routes : 8
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.9.40.0/24 Static 60 0 D 10.9.100.3 GigabitEthernet0/0/0
10.9.100.0/24 Direct 0 0 D 10.9.100.3 GigabitEthernet0/0/0
10.9.100.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
10.9.100.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/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
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
<R6>
测试连通性:R5pingR6超时
<R5>ping 10.9.100.3
PING 10.9.100.3: 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out
--- 10.9.100.3 ping statistics ---
5 packet(s) transmitted
0 packet(s) received
100.00% packet loss
**查阅资料,需要绑定静态ARP
R5路由器添加对端接口静态ARP**
[R5]arp static 10.9.100.3 00e0-fc77-0254
R5路由器添加对端接口静态ARP
[R6]arp static 10.9.40.2 00e0-fc93-0848
测试连通性:R5能够ping通R6
<R5>ping 10.9.100.3
PING 10.9.100.3: 56 data bytes, press CTRL_C to break
Reply from 10.9.100.3: bytes=56 Sequence=1 ttl=255 time=80 ms
Reply from 10.9.100.3: bytes=56 Sequence=2 ttl=255 time=50 ms
Reply from 10.9.100.3: bytes=56 Sequence=3 ttl=255 time=50 ms
Reply from 10.9.100.3: bytes=56 Sequence=4 ttl=255 time=40 ms
Reply from 10.9.100.3: bytes=56 Sequence=5 ttl=255 time=60 ms
--- 10.9.100.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 40/56/80 ms
结论:
测试结果:不能直接通信,需要配置路由
单独配置路由后还是不通,还需要配置静态arp绑定mac地址;
仅配置静态arp也不能通信,必须配置路由条目,两者缺一不可。