骨干链路端口地址配置:
AR1:
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
[r1]interface g0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.22 30
AR2:
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
[r2]interface g0/0/1
[r2-GigabitEthernet0/0/1]ip address 192.168.1.5 30
AR3:
[r3]interface g0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.1.18
[r3]interface g0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.1.21 30
AR4:
[r4]interface g0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.6 30
[r4]interface g2/0/0
[r4-GigabitEthernet4/0/0]ip address 192.168.1.9
[r4]interface g4/0/0
[r4-GigabitEthernet4/0/0]ip address 192.168.1.14 30
AR5:
[r5]interface g0/0/0
[r5-GigabitEthernet0/0/0]ip address 192.168.1.10 30
[r5]interface g0/0/1
[r5-GigabitEthernet0/0/1]ip address 192.168.1.13 30
环回IP 地址配置
AR1:
[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
AR2:
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 192.168.1.65 28
[r2-LoopBack0]q
[r2]interface LoopBack 1
[r2-LoopBack1]ip address 192.168.1.81 28
AR3:
[r3]interface LoopBack 0
[r3-LoopBack0]ip address 192.168.1.129 28
[r3]interface LoopBack 1
[r3-LoopBack1]ip address 192.168.1.145 28
AR4:
[r4]interface LoopBack 0
[r4-LoopBack0]ip address 192.168.1.97 28
[r4]interface LoopBack 1
[r4-LoopBack1]ip address 192.168.1.113 28
AR5:
[r5]interface LoopBack 0
[r5-LoopBack0]ip address 5.5.5.5 24
静态路由配置
AR1:
[r1]ip route-static 192.168.1.4 30 192.168.1.2
[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.21
[r1]ip route-static 192.168.1.16 30 192.168.1.21
[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.2
[r1]ip route-static 192.168.1.96 27 192.168.1.21
[r1]ip route-static 192.168.1.128 27 192.168.1.21
AR2:
ip route-static 192.168.1.8 255.255.255.252 192.168.1.6
ip route-static 192.168.1.12 255.255.255.252 192.168.1.6
ip route-static 192.168.1.16 255.255.255.252 192.168.1.1
ip route-static 192.168.1.20 255.255.255.252 192.168.1.1
ip route-static 192.168.1.32 255.255.255.224 192.168.1.1
ip route-static 192.168.1.96 255.255.255.224 192.168.1.6
ip route-static 192.168.1.128 255.255.255.224 192.168.1.1
AR3:
ip route-static 192.168.1.0 255.255.255.252 192.168.1.22
ip route-static 192.168.1.4 255.255.255.252 192.168.1.22
ip route-static 192.168.1.8 255.255.255.252 192.168.1.17
ip route-static 192.168.1.12 255.255.255.252 192.168.1.17
ip route-static 192.168.1.32 255.255.255.224 192.168.1.22
ip route-static 192.168.1.64 255.255.255.224 192.168.1.22
ip route-static 192.168.1.96 255.255.255.224 192.168.1.17
AR4:
ip route-static 192.168.1.0 255.255.255.252 192.168.1.5
ip route-static 192.168.1.20 255.255.255.252 192.168.1.18
ip route-static 192.168.1.32 255.255.255.224 192.168.1.5
ip route-static 192.168.1.32 255.255.255.224 192.168.1.18
ip route-static 192.168.1.64 255.255.255.224 192.168.1.5
ip route-static 192.168.1.128 255.255.255.224 192.168.1.18
AR5:
ip route-static 192.168.1.0 255.255.255.252 192.168.1.9
ip route-static 192.168.1.4 255.255.255.252 192.168.1.9
ip route-static 192.168.1.16 255.255.255.252 192.168.1.14
ip route-static 192.168.1.20 255.255.255.252 192.168.1.14
ip route-static 192.168.1.32 255.255.255.224 192.168.1.9
ip route-static 192.168.1.32 255.255.255.224 192.168.1.14
ip route-static 192.168.1.64 255.255.255.224 192.168.1.9
ip route-static 192.168.1.96 255.255.255.224 192.168.1.9
ip route-static 192.168.1.96 255.255.255.224 192.168.1.14
ip route-static 192.168.1.128 255.255.255.224 192.168.1.14
路由缺省配置
AR1:
[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.21
AR2:
[r2]ip route-static 0.0.0.0 0 192.168.1.6
AR3:
[r3]ip route-static 0.0.0.0 0 192.168.1.17
AR4:
[r4]ip route-static 0.0.0.0 0 192.168.1.10
[r4]ip route-static 0.0.0.0 0 192.168.1.13
优先级的配置:
AR4:
[r4]ip route-static 0.0.0.0 0 192.168.1.10 preference 80
AR4:
[r4]interface g4/0/0
[r4-GigabitEthernet4/0/0]shutdown
空接口防环路由设置:
R1: [r1]ip route-static 192.168.1.32 27 NULL 0
R2: [r1]ip route-static 192.168.1.64 27 NULL 0
R3: [r1]ip route-static 192.168.1.128 27 NULL 0
R4: [r1]ip route-static 192.168.1.96 27 NULL 0