首先配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.9 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.5 30
[AR3]int g0/0/0
[AR3-GigabitEthernet0/0/0]ip add 192.168.1.10 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 g 0/0/0
[AR4-GigabitEthernet0/0/0]ip add 192.168.1.6 30
[AR4-GigabitEthernet0/0/0]int g0/0/1
[AR4-GigabitEthernet0/0/1]ip add 192.168.1.14 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
[AR5]int g 0/0/0
[AR5-GigabitEthernet0/0/0]ip add 192.168.1.18 30
[AR5-GigabitEthernet0/0/0]int g0/0/2
[AR5-GigabitEthernet0/0/2]ip add 192.168.1.22 30
[AR5-GigabitEthernet0/0/2]int g0/0/1
[AR5-GigabitEthernet0/0/1]ip add 12.0.0.5 24
[AR6]int g0/0/0
[AR6-GigabitEthernet0/0/0]ip add 12.0.0.6 24
在配环回地址
[AR1]int l0
[AR1-LoopBack0]ip add 192.168.1.33 28
[AR1-LoopBack0]int l1
[AR1-LoopBack1]ip add 192.168.1.49 28
[AR2]int l0
[AR2-LoopBack0]ip add 192.168.1.65 28
[AR2-LoopBack0]int l1
[AR2-LoopBack1]ip add 192.168.1.81 28
[AR4]int l0
[AR4-LoopBack0]ip add 192.168.1.129 28
[AR4-LoopBack0]int l1
[AR4-LoopBack1]ip add 192.168.1.145 28
[AR5]int l0
[AR5-LoopBack0]ip add 192.168.1.169 27
[AR6]int l0
[AR6-LoopBack0]ip add 1.1.1.6 24
在AR3打开DHCP服务为pc分配ip 首先创建地址池给地址池分配网段,网关和dns
在连接连接交换机分配地址的接口打开DHCP的全局服务给每个路由器配置 静态路由,后续用display ip routing-table protocol static 查看静态路由信息
[AR1]ip route-static 192.168.1.64 27 192.168.1.2
[AR1]ip route-static 192.168.1.4 30 192.168.1.2
[AR1]ip route-static 192.168.1.128 27 192.168.1.2
[AR1]ip route-static 192.168.1.128 27 192.168.1.10
[AR1]ip route-static 192.168.1.16 30 192.168.1.2
[AR1]ip route-static 192.168.1.16 30 192.168.1.10
[AR1]ip route-static 192.168.1.168 27 192.168.1.2
[AR1]ip route-static 192.168.1.168 27 192.168.1.10
[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.10
[AR1]ip route-static 192.168.1.12 30 192.168.1.10
[AR1]ip route-static 192.168.1.96 27 192.168.1.10
[AR2]ip route-static 192.168.1.128 27 192.168.1.6
[AR2]ip route-static 192.168.1.16 30 192.168.1.6
[AR2]ip route-static 192.168.1.168 27 192.168.1.6
[AR2]ip route-static 192.168.1.20 30 192.168.1.6
[AR2]ip route-static 192.168.1.12 30 192.168.1.6
[AR2]ip route-static 192.168.1.96 27 192.168.1.6
[AR2]ip route-static 192.168.1.96 27 192.168.1.1
[AR2]ip route-static 192.168.1.8 30 192.168.1.1
[AR2]ip route-static 192.168.1.32 27 192.168.1.1
[AR3]ip route-static 192.168.1.32 27 192.168.1.9
[AR3]ip route-static 192.168.1.0 30 192.168.1.9
[AR3]ip route-static 192.168.1.64 27 192.168.1.9
[AR3]ip route-static 192.168.1.64 27 192.168.1.14
[AR3]ip route-static 192.168.1.4 30 192.168.1.14
[AR3]ip route-static 192.168.1.128 27 192.168.1.14
[AR3]ip route-static 192.168.1.16 30 192.168.1.14
[AR3]ip route-static 192.168.1.168 27 192.168.1.14
[AR4]ip route-static 192.168.1.96 27 192.168.1.13
[AR4]ip route-static 192.168.1.8 30 192.168.1.13
[AR4]ip route-static 192.168.1.32 27 192.168.1.13
[AR4]ip route-static 192.168.1.32 27 192.168.1.5
[AR4]ip route-static 192.168.1.0 30 192.168.1.5
[AR4]ip route-static 192.168.1.64 27 192.168.1.5
[AR4]ip route-static 192.168.1.168 27 192.168.1.18
[AR4]ip route-static 192.168.1.168 27 192.168.1.22
[AR5]ip route-static 192.168.1.128 27 192.168.1.1
[AR5]ip route-static 192.168.1.128 27 192.168.1.21
[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
[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.8 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.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.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.64 27 192.168.1.17
[AR5]ip route-static 192.168.1.64 27 192.168.1.21
[AR5]ip route-static 192.168.1.4 30 192.168.1.17
[AR5]ip route-static 192.168.1.4 30 192.168.1.21
防止成环进行破除
R1:
[R1]ip route-static 192.168.1.32 27 NULL 0
R2:
[R2]ip route-static 192.168.1.64 27 NULL 0
R4:
[R4]ip route-static 192.168.1.128 27 NULL 0
R5:
[R5]ip route-static 192.168.1.160 27 NULL 0
设置AR5
[AR5]acl 2000
[AR5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[AR5]int g0/0/1
[AR5-GigabitEthernet0/0/1]nat outbound 2000
配置缺省路由
[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.10
[AR2]ip route-static 0.0.0.0 0 192.168.1.6
[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
[AR4]ip route-static 0.0.0.0 0 192.168.1.22
[AR5]ip route-static 0.0.0.0 0 12.0.0.6
修改R4R5之间的优先级
R1:
[AR1]ip route-static 192.168.1.20 30 192.168.1.2 preference 61
[AR1]ip route-static 192.168.1.20 30 192.168.1.6 preference 61
[AR2]ip route-static 192.168.1.20 30 192.168.1.10 preference 61
[AR3]ip route-static 192.168.1.20 30 192.168.1.14 preference 61
[AR4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61
[AR5]ip route-static 192.168.1.0 24 192.168.1.21 preference 61
进行登录验证实验是否成功
[AR1]aaa
[AR1-aaa]local-user admin privilege level 15 password cipher 123456
[AR1-aaa]local-user admin service-type telnet
[AR1]user-interface vty 0 4
[AR1-ui-vty0-4]authentication-mode aaa
[AR5-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 23 ins
ide 192.168.1.1 23
Warning:The port 23 is well-known port. If you continue it may cause function fa
ilure.
Are you sure to continue?[Y/N]:y
<AR6>telnet 12.0.0.2
Trying 12.0.0.2 ...
Press CTRL+K to abort
Connected to 12.0.0.2 ...
Login authentication
Username:admin
Password:
Info: The max number of VTY users is 10, and the number
of current VTY users on line is 1.
The current login time is 2024-03-24 18:13:36.
<AR1>
<AR1>q
<AR6>