分析 IP 地址(五个路由器,14网段)
网络范围192.168.1.0/24
骨干 192.168.1.0/27
192.168.1.32/27
R1: 192.168.1.32/27 192.168.1.48/27
64
R2: 192.168.1.64/27 192.168.1.80/27
96
R3: 192.168.1.96/27 192.168.1.112/27
128
R4: 192.168.1.128/27 192.168.1.144/27
广播域范围 192.168.1.0/30
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.24/30 192.168.1.28/30
路由器配置IP
[AR1]int g0/0/0
[AR1-GigabitEthernet0/0/0]ip add 192.168.1.1 30
[AR1]int g0/0/1
[AR1-GigabitEthernet0/0/1]ip add 192.168.1.5 30
[AR2]int g0/0/0
[AR2-GigabitEthernet0/0/0]ip add 192.168.1.2 30
[AR2-GigabitEthernet0/0/0]int g0/0/1
[AR2-GigabitEthernet0/0/1]ip add 192.168.1.9 30
[AR3]int g0/0/0
[AR3-GigabitEthernet0/0/0]ip add 192.168.1.6 30
[AR3-GigabitEthernet0/0/0]int g0/0/1
[AR3-GigabitEthernet0/0/1]ip add 192.168.1.13 30
[AR4]int g0/0/0
[AR4-GigabitEthernet0/0/0]ip add 192.168.1.14 30
[AR4-GigabitEthernet0/0/0]int g0/0/1
[AR4-GigabitEthernet0/0/1]ip add 192.168.1.10 30
[AR4-GigabitEthernet0/0/1]int g0/0/2
[AR4-GigabitEthernet0/0/2]ip add 192.168.1.17 30
[AR4-GigabitEthernet0/0/2]int g4/0/0
[AR4-GigabitEthernet4/0/0]ip add 192.168.1.21 30
[AR6]int g0/0/0
[AR6-GigabitEthernet0/0/0]ip add 192.168.1.18 30
[AR6-GigabitEthernet0/0/0]int g0/0/1
[AR6-GigabitEthernet0/0/1]ip add 192.168.1.22 30
配置环路接口
[AR1]int LoopBack 0
[AR1-LoopBack0]ip add 192.168.1.33 28
[AR1]int LoopBack 1
[AR1-LoopBack1]ip add 192.168.1.49 28
[AR2]int LoopBack 0
[AR2-LoopBack0]ip add 192.168.1.65 28
[AR2]int LoopBack 1
[AR2-LoopBack1]ip add 192.168.1.81 28
[AR3]int LoopBack 0
[AR3-LoopBack0]ip add 192.168.1.97 28
[AR3]int LoopBack 1
[AR3-LoopBack1]ip add 192.168.1.113 28
[AR4]int LoopBack 0
[AR4-LoopBack0]ip add 192.168.1.129 28
[AR4]int LoopBack 1
[AR4-LoopBack1]ip add 192.168.1.145 28
[AR6-LoopBack0]ip add 5.5.5.1 24
静态路由
[R1]ip route-static 192.168.1.64 27 192.168.1.2
[R1]ip route-static 192.168.1.96 27 192.168.1.6
[R1]ip route-static 192.168.1.128 27 192.168.1.2
[R1]ip route-static 192.168.1.128 27 192.168.1.6
[R1]ip route-static 192.168.1.8 30 192.168.1.2
[R1]ip route-static 192.168.1.12 30 192.168.1.6
[R1]ip route-static 192.168.1.16 30 192.168.1.6
[R1]ip route-static 192.168.1.16 30 192.168.1.2
[AR2]ip route-static 192.168.1.32 27 192.168.1.1
[AR2]ip route-static 192.168.1.128 27 192.168.1.10
[AR2]ip route-static 192.168.1.4 30 192.168.1.1
[AR2]ip route-static 192.168.1.12 30 192.168.1.10
[AR2]ip route-static 192.168.1.96 27 192.168.1.1
[AR2]ip route-static 192.168.1.96 27 192.168.1.10
[AR2]ip route-static 192.168.1.16 30 192.168.1.10
[AR3]ip route-static 192.168.1.32 27 192.168.1.5
[AR3]ip route-static 192.168.1.128 27 192.168.1.14
[AR3]ip route-static 192.168.1.0 30 192.168.1.5
[AR3]ip route-static 192.168.1.8 30 192.168.1.14
[AR3]ip route-static 192.168.1.64 27 192.168.1.5
[AR3]ip route-static 192.168.1.64 27 192.168.1.14
[AR3]ip route-static 192.168.1.16 30 192.168.1.14
[AR4]ip route-static 192.168.1.64 27 192.168.1.9
[AR4]ip route-static 192.168.1.96 27 192.168.1.13
[AR4]ip route-static 192.168.1.32 27 192.168.1.9
[AR4]ip route-static 192.168.1.32 27 192.168.1.13
[AR4]ip route-static 192.168.1.0 30 192.168.1.9
[AR4]ip route-static 192.168.1.4 30 192.168.1.13
[AR6]ip route-static 192.168.1.32 27 192.168.1.17
[AR6]ip route-static 192.168.1.64 27 192.168.1.17
[AR6]ip route-static 192.168.1.96 27 192.168.1.17
[AR6]ip route-static 192.168.1.128 27 192.168.1.17
[AR6]ip route-static 192.168.1.0 30 192.168.1.17
[AR6]ip route-static 192.168.1.4 30 192.168.1.17
[AR6]ip route-static 192.168.1.8 30 192.168.1.17
[AR6]ip route-static 192.168.1.12 30 192.168.1.17
缺省路由
[AR1]ip route-static 0.0.0.0 0 192.168.1.2
[AR1]ip route-static 0.0.0.0 0 192.168.1.6
[AR2]ip route-static 0.0.0.0 0 192.168.1.10
[AR3]ip route-static 0.0.0.0 0 192.168.1.14
[AR4]ip route-static 0.0.0.0 0 192.168.1.18
路由优先级(100M)
[AR1]ip route-static 192.168.1.20 30 192.168.1.2
[AR1]ip route-static 192.168.1.20 30 192.168.1.2
[AR2]ip route-static 192.168.1.20 30 192.168.1.10
[AR3]ip route-static 192.168.1.16 30 192.168.1.14
[AR4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61
[AR6]ip route-static 192.168.1.32 27 192.168.1.21 preference 61
[AR6]ip route-static 192.168.1.64 27 192.168.1.21 preference 61
[AR6]ip route-static 192.168.1.96 27 192.168.1.21 preference 61
[AR6]ip route-static 192.168.1.128 27 192.168.1.21 preference 61
[AR6]ip route-static 192.168.1.0 30 192.168.1.21 preference 61
[AR6]ip route-static 192.168.1.4 30 192.168.1.21 preference 61
[AR6]ip route-static 192.168.1.8 30 192.168.1.21 preference 61
[AR6]ip route-static 192.168.1.12 30 192.168.1.21 preference 61
空接口(防止环路)
[AR1]ip route-static 192.168.1.32 27 null 0
[AR2]ip route-static 192.168.1.64 27 null 0
[AR3]ip route-static 192.168.1.96 27 null 0
[AR4]ip route-static 192.168.1.128 27 null 0
配置结果(图片)