六个广播域当成一个广播域,每个路由器上的两个环回接口当成一个网段则要划分五个网段则借三位
192.168.1.000 00000/27 192.168.1.0/27 骨干
192.168.1.0/30 192.168.1.4/30 192.168.1.8/30 192.168.1.12/30 192.168.1.16/30 192.168.1.20/30
192.168.1.001 00000/27 192.168.1.32/27 r1
192.168.1.32/28 192.168.1.48/28
192.168.1.010 00000/27 192.168.1.64/27 r2
192.168.1.64/28 192.168.1.80/28
192.168.1.011 00000/27 192.168.1.96/27 r3
192.168.1.96/28 192.168.1.112/28
详细标注如图所示
192.168.1.100 00000/27 192.168.1.128/27 r4
192.168.1.128/28 192.168.1.144/28
1.r1配置
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
[r1-GigabitEthernet0/0/1]ip address 192.168.1.14 30
r2配置
[r2-GigabitEthernet0/0/1]ip address 192.168.1.5 30
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
r3配置
[r3-GigabitEthernet0/0/0]ip address 192.168.1.13 30
[r3-GigabitEthernet0/0/1]ip address 192.168.1.9 30
r4配置
[r4-GigabitEthernet0/0/0]ip address 192.168.1.10 30
[r4-GigabitEthernet0/0/1]ip address 192.168.1.6 30
[r4-GigabitEthernet4/0/0]ip address 192.168.1.17 30
[r4-GigabitEthernet0/0/2]ip address 192.168.1.21 30
r5配置
[r5-GigabitEthernet0/0/1]ip address 192.168.1.18 30
[r5-GigabitEthernet0/0/0]ip address 192.168.1.22 30
[r5]interface LoopBack 0
[r5-LoopBack0]ip address 5.5.5.5 24
2.
r1配置
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 192.168.1.33 28
[r1]interface LoopBack 1
[r1-LoopBack1]ip address 192.168.1.49 28
r2配置
[r2-LoopBack0]ip address 192.168.1.65 28
[r2-LoopBack1]ip address 192.168.1.80 28
r3配置
[r3-LoopBack0]ip address 192.168.1.97 28
[r3-LoopBack1]ip address 192.168.1.113
r4配置
[r4-LoopBack0]ip address 192.168.1.129 28
[r4-LoopBack1]ip address 192.168.1.145 28
3.
r1
[r1]ip route-static 192.168.1.64 27 192.168.1.2
[r1]ip route-static 192.168.1.4 30 192.168.1.2
[r1]ip route-static 192.168.1.96 27 192.168.1.2
[r1]ip route-static 192.168.1.96 27 192.168.1.13
[r1]ip route-static 192.168.1.8 30 192.168.1.13
[r1]ip route-static 192.168.1.128 27 192.168.1.13
[r1]undo ip route-static 192.168.1.96 27 192.168.1.2
[r1]ip route-static 192.168.1.128 27 192.168.1.2
[r1]ip rou
[r1]ip route-
[r1]ip route-static 192.168.1.16 30 192.168.1.2
[r1]ip route-static 192.168.1.16 30 192.168.1.13
[r1]ip route-static 192.168.1.20 30 192.168.1.13
[r1]ip route-static 192.168.1.20 30 192.168.1.2
r2
[r2]ip rpu
[r2]ip rou
[r2]ip route-
[r2]ip route-static 192.168.1.128 27 192.168.1.6
[r2]ip route-static 192.168.1.16 30 192.168.1.6
[r2]ip route-static 192.168.1.21 30 192.168.1.6
Info: The destination address and mask of the configured static route mismatched
, and the static route 192.168.1.20/30 was generated.
[r2]ip route-static 192.168.1.20 30 192.168.1.6
Error: The route already exists.
[r2]ip route-static 192.168.1.8 30 192.168.1.6
[r2]ip route-static 192.168.1.96 27 192.168.1.6
[r2]ip route-static 192.168.1.96 27 192.168.1.1
[r2]ip route-static 192.168.1.32 27 192.168.1.1
[r2]ip route-static 192.168.1.12 30 192.168.1.1
r3
[r3]ip route-
[r3]ip route-static 192.168.1.32 27 192.168.1.14
[r3]ip route-static 192.168.1.0 30 192.168.1.14
[r3]ip route-static 192.168.1.64 27 192.168.1.14
[r3]ip route-static 192.168.1.64 27 192.168.1.10
[r3]ip route-static 192.168.1.128 27 192.168.1.10
[r3]ip route-static 192.168.1.4 30 192.168.1.10
[r3]ip route-static 192.168.1.16 30 192.168.1.10
[r3]ip route-static 192.168.1.20 30 192.168.1.10
r4
[r4]ip route-static 192.168.1.64 27 192.168.1.5
[r4]ip route-static 192.168.1.0 30 192.168.1.5
[r4]ip route-static 192.168.1.32 27 192.168.1.5
[r4]ip route-static 192.168.1.32 27 192.168.1.9
[r4]ip route-static 192.168.1.96 27 192.168.1.9
[r4]ip route-static 192.168.1.12 30 192.168.1.9
[r4]
r5
[r5]ip route-
[r5]ip route-static 192.168.1.128 27 192.168.1.17
[r5]ip route-static 192.168.1.4 30 192.168.1.17
[r5]ip route-static 192.168.1.64 27 192.168.1.17
[r5]ip route-static 192.168.1.0 30 192.168.1.17
[r5]ip route-static 192.168.1.32 27 192.168.1.17
[r5]ip route-static 192.168.1.12 30 192.168.1.17
[r5]ip route-static 192.168.1.96 27 192.168.1.17
[r5]ip route-static 192.168.1.8 30 192.168.1.17
4
r1
r1]ip route-static 0.0.0.0 0 192.168.1.2
[r1]ip route-static 0.0.0.0 0 192.168.1.13
r2
[r2]ip route-static 0.0.0.0 0 192.168.1.6
r3
[r3]ip route-static 0.0.0.0 0 192.168.1.10
避免环路
[r1]ip route-static 192.168.1.32 27 null 0
[r2]ip route-static 192.168.1.64 27 null 0
[r3]ip route-static 192.168.1.96 27 null 0
[r4]ip route-static 192.168.1.128 27 null 0
5
r4
[r4]ip route-static 0.0.0.0 0 192.168.1.18
[r4]ip route-static 0.0.0.0 0 192.168.1.22 pre
[r4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61