R1的路由表中默认存在:192.168.1.0192.168.3.0
需要添加:192.168.2.0 4.0 5.0
R2的路由表中默认存在:192.168.1.0192.168.2.0需要添加:192.168.3.0 4.0 5.0
R3的路由表中默认存在:192.168.3.0192.168.4.0需要添加: 1.0 2.0 5.0
R4的路由表中默认存在:192.168.2.0 192.168.4.0 192.168.5.0需要添加: 1.0 3.0
R5的路由表中默认存在:192.168.5.0需要添加: 1.0 3.0 2.0 4.0
R1配置:
[r1]interface GigabitEthernet 0/0/0 [r1-GigabitEthernet0/0/0]ip address 192.168.1.1 24 [r1]interface GigabitEthernet 0/0/1 [r1-GigabitEthernet0/0/1]ip address 192.168.3.1 24 添加的网段:
[r1]ip route-static 192.168.2.0 24 192.168.1.2
[r1]ip route-static 192.168.5.0 24 192.168.1.2
[r1]ip route-static 192.168.5.0 24 192.168.3.2
[r1]ip route-static 192.168.4.0 24 192.168.3.2
R2配置:
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 24
[r2]interface GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]ip address 192.168.2.1 24
添加网段
[r2]ip route-static 192.168.3.0 24 192.168.1.1
[r2]ip route-static 192.168.4.0 24 192.168.1.1
[r2]ip route-static 192.168.5.0 24 192.168.2.2
R3配置:
[r3]interface GigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.3.2 24
[r3]interface GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.4.1 24添加网段[r3]ip route-static 192.168.1.0 24 192.168.3.1
[r3]ip route-static 192.164.2.0 24 192.168.4.2
[r3]ip route-static 192.168.5.0 24 192.168.4.2
R4配置:
[r4]interface GigabitEthernet 0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.2.2 24
[r4]interface GigabitEthernet 0/0/2
[r4-GigabitEthernet0/0/2]ip address 192.168.4.2 24
[r4]interface GigabitEthernet 0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.5.1 24添加网段[r4]ip route-static 192.168.1.0 24 192.168.2.1
[r4]ip route-static 192.168.3.0 24 192.168.4.1
R5配置:
[r5]interface GigabitEthernet 0/0/0
[r5-GigabitEthernet0/0/0]ip address 192.168.5.2 24添加网段
[r5]ip route-static 192.168.2.0 24 192.168.5.1
[r5]ip route-static 192.168.1.0 24 192.168.5.1
[r5]ip route-static 192.168.3.0 24 192.168.5.1
[r5]ip route-static 192.168.4.0 24 192.168.5.1
R1pingR5
排错思路
1、排查IP地址是否正确,是否和接口对应 ---排查直连之间的通信
display ip interface brief
2、排路由--看路由表--看方向 ---看下一跳,
display ip routing-table