需求: R1-R2- R3-R4- R5运行RIPV2
R6- R7运行RIPV1
1使用合理IP地址规划网络,各自创建环回接口
2. R1创建环回172.16.1.1/24 172.16.2.1/24 172.16.3.1/24
3要求3使用82访间R1环回
4.减少路由条目数量,增加路由传递安全性
5. RS创建一个环回模拟运营商, 不能宣告
6. R1 telneta R2环回实际telnet到R7.上,
7, R6-R7路由器不能学习到达R环回路由
8,全网可达
R1:
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip add 12.0.0.1 24
[r1]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip add 14.0.0.1 24
环回:
[r1-GigabitEthernet0/0/1]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
R2:
[r2]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
环回
[r2]int l0
[r2-LoopBack0]ip add 2.2.2.2 24
R3:
[r3]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.1 24
[r3-GigabitEthernet0/0/1]int l0
[r3-LoopBack0]ip add 3.3.3.3 24
R4:
[r4]int g 0/0/1
[r4-GigabitEthernet0/0/1]ip add 34.0.0.2 24
[r4-GigabitEthernet0/0/1]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip add 14.0.0.2 24
[r4-GigabitEthernet0/0/0]int g 2/0/0
[r4-GigabitEthernet2/0/0]ip add 45.0.0.1 24
[r4-GigabitEthernet2/0/0]int g 1/0/0
[r4-GigabitEthernet1/0/0]ip add 46.0.0.1 24
[r4-GigabitEthernet1/0/0]int l0
[r4-LoopBack0]ip add 4.4.4.4 24
R5:
[r5]int g 0/0/0
[r5-GigabitEthernet0/0/0]ip add 45.0.0.2 24
[r5-GigabitEthernet0/0/0]int l0
[r5-LoopBack0]ip add 5.5.5.5 24
R6:
[r6]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
[r6-GigabitEthernet0/0/1]int l0
[r6-LoopBack0]ip add 6.6.6.6 24
R7:
[r7]int g 0/0/0
[r7-GigabitEthernet0/0/0]ip add 67.0.0.2 24
[r7-GigabitEthernet0/0/0]int l0
[r7-LoopBack0]ip add 7.7.7.7 24
检查:
R1
R2:
R1:
所有直连网段都宣告了:
按主类宣告:
[r1]rip
[r1-rip-1]v 2
[r1-rip-1]network 12.0.0.0
[r1-rip-1]network 14.0.0.0
环回
[r1-rip-1]network 1.0.0.0
[r1-rip-1]network 172.16.0.0
R2:
[r2]rip
[r2-rip-1]v 2
[r2-rip-1]network 12.0.0.0
[r2-rip-1]network 23.0.0.0
[r2-rip-1]network 2.0.0.0
R3:
[r3]rip
[r3-rip-1]v 2
[r3-rip-1]network 23.0.0.0
[r3-rip-1]network 34.0.0.0
[r3-rip-1]network 3.0.0.0
R4;
[r4]rip
[r4-rip-1]v 2
[r4-rip-1]network 34.0.0.0
[r4-rip-1]network 14.0.0.0
[r4-rip-1]network 46.0.0.0
[r4-rip-1]network 45.0.0.0
[r4-rip-1]network 4.0.0.0
R5:
[r5]rip
[r5-rip-1]v 2
[r5-rip-1]network 45.0.0.0
因为第五题题目要求,所以不用宣告环回
R6:
[r6]rip
[r6-rip-1]v 1
[r6-rip-1]network 46.0.0.0
[r6-rip-1]network 6.0.0.0
[r6-rip-1]network 67.0.0.0
R7:
[r7]rip
[r7-rip-1]v 1
[r7-rip-1]network 67.0.0.0
[r7-rip-1]network 7.0.0.0
R1:
display ip routing-table protocol rip
R1-5都变成了汇总网段
把R4这条路的开销值增大
按照对入口对自己影响
第3题:
查看路由表,看R3是怎样访问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
display ip routing-table protocol rip
影响自己的开销值,增加上面进的开销值,使只走下面
[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]rip metricin 10
[r3-GigabitEthernet0/0/0]display ip routing-table protocol rip
[r3-GigabitEthernet0/0/0]undo rip metricin
[r3]display ip routing-table protocol rip
恢复了
R3:
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[r3-acl-basic-2000]rule permit source 1.1.1.0 0
[r3-GigabitEthernet0/0/0]int g 0/0/1
[r3-GigabitEthernet0/0/1]rip metricin 2000 10
[r3-GigabitEthernet0/0/1]display ip routing-table protocol rip
第4题:
增加路由的安全性
每个接口都配认证
R1 2
Md5比对摘要值进行验证
Cipher 本地密文
[r1-GigabitEthernet0/0/0]rip authentication-mode md5 usual cipher 123456
第5题:
R5不宣告也可以全网可达
写缺省
R4相当于边界路由器
[r4]ip route-static 0.0.0.0 0 45.0.0.2
内网所有缺省的都应该指向边界R4
R4下发一条缺省,让大家自动指向自己
[r4]rip
[r4-rip-1]default-route originate
因为R6运行的是RIPV1
方法一:重发布要挑选一个边界路由器同时运行RIPV1 RIPV2
修改R6 0/0/0接口运行V2的规则发送信息
[r6]int g 0/0/0
[r6-GigabitEthernet0/0/0]rip version 2
[r6-GigabitEthernet0/0/0]q
[r6]display ip routing-table protocol rip
全网可达
第5、8题完成
第六题:
单独做端口映射会出问题
最终登录的是R7,R7的Telnet服务要开启
[r7]aaa
[r7-aaa]local-user admin privilege level 15 password cipher 123456
[r7-aaa]local-user admin service-type telnet
[r7]user-interface vty 0 4
[r7-ui-vty0-4]authentication-mode aaa
测试;
让R2的环回去登录R7
边界路由器的出接口
修改的目标IP还是源IP
修改的目标IP
修改端口映射
[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
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
[r2-GigabitEthernet0/0/0]
为什么连接不上
端口是不是生效的,流量是怎么流动的
发现R2走的负载均衡
通过修改开销值只让他走上面的那条路
[r2]acl 2000
[r2-acl-basic-2000]rule permit source 7.0.0.0 0
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]rip metricin 2000 5
过去没问题,回来呢?
[r4]acl 2000
[r4-acl-basic-2000]rule permit source 12.0.0.0 0
[r4-acl-basic-2000]q
[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]rip metricin 2000 10
测试:
第七题:
[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.0.255.255
[r6-acl-basic-2000]rule permit source any
r6]rip
[r6-rip-1] v 1
[r6-rip-1]filter-policy 2000 import
[r6-rip-1]display ip routing-table protocol rip
第七题完成