1.配置需求
R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.1 30
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.1.5 30
[R1]int l0
[R1-LoopBack0]ip add 172.16.1.1 24
[R1-LoopBack0]int l1
[R1-LoopBack1]ip add 172.16.2.1 24
[R1-LoopBack1]int l2
[R1-LoopBack2]ip add 172.16.3.1 24
[R1-rip-1]ver 2 //选择版本
[R1-rip-1]undo summary //取消汇总
[R1-rip-1]net 172.0.0.0
[R1-rip-1]net 192.168.1.0
[R1-GigabitEthernet0/0/0]rip summary-address 172.16.0.0 255.255.252.0 //手工汇总
[R1]ip route-static 172.16.0.0 22 NULL 0 //指向NULL0 的防环路由
[R1-GigabitEthernet0/0/0]rip authentication-mode simple plain 123456 //明文认证
R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.1.2 30
[R2-GigabitEthernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 192.168.1.9 30
[R2]int l0
[R2-LoopBack0]ip add 192.168.1.33 27
[R2]rip 1
[R2-rip-1]ver 2
[R2-rip-1]net 192.168.1.0
[R2-GigabitEthernet0/0/0]rip authentication-mode simple cipher 123456 //MD5认证
[R2-GigabitEthernet0/0/0]nat server protocol tcp global interface loopback 0 23
inside 7.7.7.7 23 //端口映射
R3
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 192.168.1.10 30
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 192.168.1.13 30
[R3-GigabitEthernet0/0/1]int l0
[R3-LoopBack0]ip add 192.168.1.65 27
[R3]rip 1
[R3-rip-1]ver 2
[R3-rip-1]net 192.168.1.0
[R3]acl 2000
[R3-acl-basic-2000]rule permit source 192.168.1.0 255.255.255.224 //抓取路由
[R3-GigabitEthernet0/0/1]rip metricout 2000 5 //出接口cost值增加到5
R4
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 192.168.1.6 30
[R4-GigabitEthernet0/0/0]int g0/0/1
[R4-GigabitEthernet0/0/1]ip add 192.168.1.14 30
[R4]int g 0/0/2
[R4-GigabitEthernet0/0/2]i add 192.168.1.17 30
[R4-GigabitEthernet0/0/2]int g 4/0/0
[R4-GigabitEthernet4/0/0]ip add 192.168.1.21 30
[R4-GigabitEthernet0/0/1]int l0
[R4-LoopBack0]ip add 192.168.1.97 27
[R4]rip 1
[R4-rip-1]ver 2
[R4-rip-1]net 192.168.1.0
R5
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 192.168.1.18 30
[R5-GigabitEthernet0/0/0]int l0
[R5-LoopBack0]ip add 5.5.5.5 24
[R5] rip 1
[R5-rip-1]ver 2
[R5-rip-1]net 192.168.1.0
[R5-rip-1]default-route originate //缺省路由
R6
[R6]int g0/0/0
[R6-GigabitEthernet0/0/0]ip add 192.168.1.22 30
[R6-GigabitEthernet0/0/0]int g0/0/1
[R6-GigabitEthernet0/0/1]ip add 192.168.1.25 30
[R6-GigabitEthernet0/0/1]int l0
[R6-LoopBack0]ip add 192.168.1.129 27
[R6]rip 1
[R6-rip-1]ver 1
[R6-rip-1]undo summary
[R6-rip-1]net 192.168.1.0
[R6-rip-1]int g0/0/0
[R6-GigabitEthernet0/0/0]rip ver 2 //将G0/0/0接口修改为RIPv2版本
[R6]acl 2000
[R6-acl-basic-2000]rule deny source 1.1.0.0 255.255.252.0
[R6-acl-basic-2000]rip 1
[R6-rip-1]filter-policy 2000 import g0/0/1 //限制学习R1环回地址
R7
[R7]INT G0/0/0
[R7-GigabitEthernet0/0/0]ip add 192.168.1.25 30
[R7-GigabitEthernet0/0/0]int l0
[R7-LoopBack0]ip add 7.7.7.7 24
[R7] rip 1
[R7-rip-1]ver 1
[R7-rip-1]undo summary
[R7-rip-1]net 192.168.1.0
[R7-rip-1]net 7.0.0.0
[R7] aaa
[R7-aaa]local-user R7 privilege level 15 password cipher 123456
Info: Add a new user.
[R7-aaa]local-user R7 service-type telnet
[R7-aaa]q
[R7]user-interface vty 0 4
[R7-ui-vty0-4]authentication-mode aaa //开启Telnet服务
全网可通