1.AR6(isp)仅配置IP地址,其他接口配置缺省路由
2.划分
3.配置环回接口
4.dhcp协议,配置AR3,电脑端自动获取IP地址
5.配置空接口,避免环路
6.配置静态路由,全网可通
7.配置telnet,做server映射
8.配置路由优先级,取61(默认60)
划分子网(192.168.1.0/24)
骨干192.168.1.0/27
AR1 192.168.1.32/27
192.168.1.32/28 192.168.1.48/28
AR2 192.168.1.64/27
192.168.1.64/28 192.168.1.80/28
AR3 192.168.1.96/27
AR4 192.168.1.96/27
192.168.1.96/28 192.168.1.112/28
AR5 192.168.1.128/27
配置IP地址
[AR1]int g0/0/0
[AR1-GigabitEthernet0/0/0]ip add 192.168.1.1 30
[AR1-GigabitEthernet0/0/0]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
[AR3-GigabitEthernet0/0/1]int g0/0/2
[AR3-GigabitEthernet0/0/2]ip add 192.168.1.97 27
[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.21 30
[AR4-GigabitEthernet0/0/2]int g4/0/0
[AR4-GigabitEthernet4/0/0]ip add 192.168.1.17 30
[AR5]int g0/0/0
[AR5-GigabitEthernet0/0/0]ip add 192.168.1.22 30
[AR5-GigabitEthernet0/0/0]int g0/0/1
[AR5-GigabitEthernet0/0/1]ip add 192.168.1.18 30
[AR5-GigabitEthernet0/0/1]int g0/0/2
[AR5-GigabitEthernet0/0/2]ip add 1.1.1.1 24
[ISP]int g0/0/0
[ISP-GigabitEthernet0/0/0]ip add 1.1.1.2 24
配置环回
[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.68 28
[AR2]int LoopBack 1
[AR2-LoopBack1]ip add 192.168.1.81 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
[AR5]int LoopBack 0
[AR5-LoopBack0]ip add 192.168.1.161 27
dhcp自动获取路由
[AR3]dhcp enable
[AR3]ip pool aa
[AR3-ip-pool-aa]network 192.168.1.96 mask 27
[AR3-ip-pool-aa]gateway-list 192.168.1.97
[AR3-ip-pool-aa]dns-list 114.114.114.114
[AR3-ip-pool-aa]int g0/0/2
[AR3-GigabitEthernet0/0/2]dhcp select global
配置下一跳,静态配置
[AR1]ip route-static 192.168.1.64 27 192.168.1.2
[AR1]ip route-static 192.168.1.96 27 192.168.1.6
[AR1]ip route-static 192.168.1.128 27 192.168.1.6
[AR1]ip route-static 192.168.1.128 27 192.168.1.2
[AR1]ip route-static 192.168.1.160 27 192.168.1.2
[AR1]ip route-static 192.168.1.160 27 192.168.1.6
[AR1]ip route-static 192.168.1.16 30 192.168.1.6
[AR1]ip route-static 192.168.1.16 30 192.168.1.2
[AR1]ip route-static 192.168.1.8 30 192.168.1.2
[AR1]ip route-static 192.168.1.12 30 192.168.1.6
[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.6
[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.160 27 192.168.1.10
[AR2]ip route-static 192.168.1.96 27 192.168.1.10
[AR2]ip route-static 192.168.1.96 27 192.168.1.1
[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.16 30 192.168.1.10
[AR2]ip route-static 192.168.1.20 30 192.168.1.10
[AR3]ip route-static 192.168.1.128 27 192.168.1.14
[AR3]ip route-static 192.168.1.64 27 192.168.1.14
[AR3]ip route-static 192.168.1.8 30 192.168.1.14
[AR3]ip route-static 192.168.1.16 30 192.168.1.14
[AR3]ip route-static 192.168.1.20 30 192.168.1.14
[AR3]ip route-static 192.168.1.160 27 192.168.1.14
[AR3]ip route-static 192.168.1.32 27 192.168.1.5
[AR3]ip route-static 192.168.1.64 27 192.168.1.5
[AR3]ip route-static 192.168.1.1 30 192.168.1.5
[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.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.0 30 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
[AR4]ip route-static 192.168.1.160 27 192.168.1.18
[AR5]ip route-static 192.168.1.32 27 192.168.1.17
[AR5]ip route-static 192.168.1.32 27 192.168.1.21
[AR5]ip route-static 192.168.1.64 27 192.168.1.21
[AR5]ip route-static 192.168.1.64 27 192.168.1.17
[AR5]ip route-static 192.168.1.96 27 192.168.1.17
[AR5]ip route-static 192.168.1.96 27 192.168.1.21
[AR5]ip route-static 192.168.1.128 27 192.168.1.21
[AR5]ip route-static 192.168.1.128 27 192.168.1.17
[AR5]ip route-static 192.168.1.0 30 192.168.1.17
[AR5]ip route-static 192.168.1.0 30 192.168.1.21
[AR5]ip route-static 192.168.1.4 30 192.168.1.21
[AR5]ip route-static 192.168.1.4 30 192.168.1.17
[AR5]ip route-static 192.168.1.8 30 192.168.1.21
[AR5]ip route-static 192.168.1.8 30 192.168.1.17
[AR5]ip route-static 192.168.1.12 30 192.168.1.17
[AR5]ip route-static 192.168.1.12 30 192.168.1.21
配置缺省路由
[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
[AR5]ip route-static 0.0.0.0 0 1.1.1.2
设置路由优先级
[AR4]ip route-static 192.168.1.160 27 192.168.1.22 preference 61
[AR4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61
[AR5]ip route-static 192.168.1.32 27 192.168.1.21 preference 61
[AR5]ip route-static 192.168.1.64 27 192.168.1.21 preference 61
[AR5]ip route-static 192.168.1.96 27 192.168.1.21 preference 61
[AR5]ip route-static 192.168.1.128 27 192.168.1.21 preference 61
[AR5]ip route-static 192.168.1.0 30 192.168.1.21 preference 61
[AR5]ip route-static 192.168.1.4 30 192.168.1.21 preference 61
[AR5]ip route-static 192.168.1.8 30 192.168.1.21 preference 61
[AR5]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
[AR5]ip route-static 192.168.1.160 27 null 0
抓取内网,访问外网,AR5访问AR6外网
[AR5]acl 2000
[AR5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[AR5]int g0/0/2
[AR5-GigabitEthernet0/0/2]nat outbound 2000
实验检验