使用静态路由实现全网连通
R1
[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ip address 12.1.1.1 24
[r1]interface GigabitEthernet 0/0/1
[r1-GigabitEthernet0/0/1]ip ad
[r1-GigabitEthernet0/0/1]ip address 14.1.1.1 24
[r1]interface LoopBack 0
[r1-LoopBack0]ip add
[r1-LoopBack0]ip address 1.1.1.1 24
[r1-LoopBack0]display ip interface brief
..................
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 12.1.1.1/24 up up
GigabitEthernet0/0/1 14.1.1.1/24 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 1.1.1.1/24 up up(s)
NULL0 unassigned up up(s)
[r1]ip route-static 23.1.1.0 24 12.1.1.2
[r1]ip route-static 34.1.1.0 24 14.1.1.2
[r1]ip route-static 2.2.2.0 24 12.1.1.2
[r1]ip route-static 4.4.4.0 24 14.1.1.2
[r1]ip route-static 3.3.3.0 24 12.1.1.2
[r1]ip route-static 3.3.3.0 24 14.1.1.2
R2
[r2]interface GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]ip add
[r2-GigabitEthernet0/0/1]ip address 12.1.1.2 24
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip address 23.1.1.1 24
[r2]interface LoopBack 0
[r2-LoopBack0]ip add
[r2-LoopBack0]ip address 2.2.2.2 24
[r2]display ip interface brief
.................
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 23.1.1.1/24 up up
GigabitEthernet0/0/1 12.1.1.2/24 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 2.2.2.2/24 up up(s)
NULL0 unassigned up up(s)
[r2]ip route-static 14.1.1.0 24 12.1.1.1
[r2]ip route-static 34.1.1.0 24 23.1.1.2
[r2]ip route-static 1.1.1.0 24 12.1.1.1
[r2]ip route-static 3.3.3.0 24 23.1.1.2
[r2]ip route-static 4.4.4.0 24 12.1.1.1
[r2]ip route-static 4.4.4.0 24 23.1.1.2
R3
[r3]interface GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]ip address 23.1.1.2 24
[r3]interface GigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]ip address 34.1.1.2 24
[r3]interface LoopBack 0
[r3-LoopBack0]ip add
[r3-LoopBack0]ip address 3.3.3.3 24
[r3-LoopBack0]display ip interface brief
...................
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 34.1.1.2/24 up up
GigabitEthernet0/0/1 23.1.1.2/24 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 3.3.3.3/24 up up(s)
NULL0 unassigned up up(s)
[r3]ip route-static 12.1.1.0 24 23.1.1.1
[r3]ip route-static 14.1.1.0 24 34.1.1.1
[r3]ip route-static 2.2.2.0 24 23.1.1.1
[r3]ip route-static 4.4.4.0 24 34.1.1.1
[r3]ip route-static 1.1.1.0 24 23.1.1.1
[r3]ip route-static 1.1.1.0 24 34.1.1.1
R4
[r4]interface GigabitEthernet 0/0/0
[r4-GigabitEthernet0/0/0]ip address 14.1.1.2 24
[r4]interface GigabitEthernet 0/0/1
[r4-GigabitEthernet0/0/1]ip address 34.1.1.1 24
[r4]interface Loopback 0
[r4-LoopBack0]ip address 4.4.4.4 24
[r4-LoopBack0]display ip interface brief
..................
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 14.1.1.2/24 up up
GigabitEthernet0/0/1 34.1.1.1/24 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 4.4.4.4/24 up up(s)
NULL0 unassigned up up(s)
[r4]ip route-static 12.1.1.0 24 14.1.1.1
[r4]ip route-static 23.1.1.0 24 34.1.1.2
[r4]ip route-static 1.1.1.0 24 14.1.1.1
[r4]ip route-static 3.3.3.0 24 34.1.1.2
[r4]ip route-static 2.2.2.0 24 14.1.1.1
[r4]ip route-static 2.2.2.0 24 34.1.1.2