对R1
[r1]int l0
[r1-LoopBack0]ip add 1.1.1.1 24
[r1-LoopBack0]int l1
[r1-LoopBack1]ip add 172.16.1.1 24
[r1-LoopBack1]int l2
[r1-LoopBack2]ip add 172.16.2.1 24
[r1-LoopBack2]int l3
[r1-LoopBack3]ip add 172.16.3.1 24
[r1-LoopBack3]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip add 12.0.0.1 24
[r1-GigabitEthernet0/0/0]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip add 14.0.0.1 24
对R2
[r2]int l0
[r2-LoopBack0]ip add 2.2.2.2 24
[r2-LoopBack0]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip add 12.0.0.2 24
[r2-GigabitEthernet0/0/0]int g 0/0/1
[r2-GigabitEthernet0/0/1]ip add 23.0.0.1 24
对R3
[r3]int l0
[r3-LoopBack0]ip add 3.3.3.3 24
[r3-LoopBack0]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip add 23.0.0.2 24
[r3-GigabitEthernet0/0/0]int g 0/0/1
[r3-GigabitEthernet0/0/1]ip add 34.0.0.2 24
对R4
[r4]int l0
[r4-LoopBack0]ip add 4.4.4.4 24
[r4-LoopBack0]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip add 14.0.0.2 24
[r4-GigabitEthernet0/0/0]int g 0/0/1
[r4-GigabitEthernet0/0/1]ip add 34.0.0.1 24
[r4-GigabitEthernet0/0/1]int g 0/0/2
[r4-GigabitEthernet0/0/2]ip add 45.0.0.1 24
[r4-GigabitEthernet0/0/2]int g 4/0/0
[r4-GigabitEthernet4/0/0]ip add 46.0.0.1 24
对R5
[r5]int l0
[r5-LoopBack0]ip add 5.5.5.5 24
[r5-LoopBack0]int g 0/0/0
[r5-GigabitEthernet0/0/0]ip add 45.0.0.2 24
对R6
[r6]int l0
[r6-LoopBack0]ip add 6.6.6.6 24
[r6-LoopBack0]int g 0/0/0
[r6-GigabitEthernet0/0/0]ip add 46.0.0.2 24
[r6-GigabitEthernet0/0/0]int g 0/0/1
[r6-GigabitEthernet0/0/1]ip add 67.0.0.1 24
对R7
[r7]int l0
[r7-LoopBack0]ip add 7.7.7.7 24
[r7-LoopBack0]int g 0/0/0
[r7-GigabitEthernet0/0/0]ip add 67.0.0.2 24
进行宣告
对R1
[r1]rip
[r1-rip-1]version 2
[r1-rip-1]network 1.0.0.0
[r1-rip-1]network 172.16.0.0
[r1-rip-1]network 12.0.0.0
[r1-rip-1]network 14.0.0.0
对R2
[r2]rip
[r2-rip-1]version 2
[r2-rip-1]network 2.0.0.0
[r2-rip-1]network 12.0.0.0
[r2-rip-1]network 23.0.0.0
对R3
[r3]rip
[r3-rip-1]version 2
[r3-rip-1]network 3.0.0.0
[r3-rip-1]network 23.0.0.0
[r3-rip-1]network 34.0.0.0
对R4
[r4]rip
[r4-rip-1]version 2
[r4-rip-1]network 34.0.0.0
[r4-rip-1]network 14.0.0.0
[r4-rip-1]network 45.0.0.0
[r4-rip-1]network 46.0.0.0
[r4-rip-1]network 4.0.0.0
对R5
[r5]rip
[r5-rip-1]version 2
[r5-rip-1]network 45.0.0.0
[r5-rip-1]network 5.0.0.0
对R6
[r6]rip
[r6-rip-1]version 1
[r6-rip-1]network 6.0.0.0
[r6-rip-1]network 46.0.0.0
[r6-rip-1]network 67.0.0.0
对R7
[r7]rip
[r7-rip-1]version 1
[r7-rip-1]network 7.0.0.0
[r7-rip-1]network 67.0.0.0
对R1上环回进行汇总并设置空接口
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]rip summary-address 172.16.0.0 255.255.252.0
[r1-GigabitEthernet0/0/0]int g 0/0/1
[r1-GigabitEthernet0/0/1]rip summary-address 172.16.0.0 255.255.252.0
[r1]ip route-static 172.16.0.0 22 NULL 0
在AR3的0/0/1接口上设置ACL和COST值,使得AR3通过AR2访问AR1的环回
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 172.16.0.0 0
[r3-acl-basic-2000]rule permit source 1.1.1.0 0
[r3-acl-basic-2000]int g 0/0/1
[r3-GigabitEthernet0/0/1]rip metricin 2000 10
安全性
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]rip authentication-mode md5 usual cipher 123456
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]rip authentication-mode md5 usual cipher 123456
在AR5上再创建一个环回,并且不能宣告
[r5]int l1
[r5-LoopBack1]ip add 10.0.0.1 24
在R4上做缺省路由,边界下发缺省
[r4-rip-1]default-route originate
在边界AR6上的0/0/0接口上设置RIPV2
[r6]int g 0/0/0
[r6-GigabitEthernet0/0/0]rip version 2
R1 telnet R2环回实际telnet到R7上,在AR7上创建用户,开启telnet服务
[r7]aaa
[r7-aaa]local-user csj privilege level 15 password cipher 123456
[r7-aaa]local-user csj service-type telnet
[r7]user-interface vty 0 4
[r7-ui-vty0-4]authentication-mode aaa
在R2上设置NAT
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]nat server protocol tcp global interface loopback 0 23 inside 7.7.7.7 23
[r2]acl 2000
[r2-acl-basic-2000]rule permit source 7.0.0.0 0
[r2-acl-basic-2000]int g 0/0/0
[r2-GigabitEthernet0/0/0]rip metricin 2000 5
在AR4上对0/0/0口的12.0.0.0数据增大COST值,使得数据只能从AR2的0/0/0出去
[r4]acl 2000
[r4-acl-basic-2000]rule permit source 12.0.0.0 0
[r4-acl-basic-2000]int g 0/0/0
[r4-GigabitEthernet0/0/0]rip metricin 2000 10
R6-R7路由器不能学习到达R1环回路由
[r6]acl 2000
[r6-acl-basic-2000]rule deny source 1.1.1.0 0
[r6-acl-basic-2000]rule deny source 172.16.0.0 0
[r6-acl-basic-2000]rule permit source any
[r6-acl-basic-2000]rip
[r6-rip-1]filter-policy 2000 import