rip高级实验

在这里插入图片描述
要求: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.要求R3使用R2访问R1环回
4.加快网络收敛,减少路由条目数量,增加路由传递安全性
5.R5创建一个环回模拟运营商,不能通告
6.R1 telnet R2环回实际telnet 到R7上
7.R6-R7路由器不能学习到达R1环回路由
8.全网可达

具体代码
r1
interface g0/0/1
ip ad 12.1.1.1 24
interface g0/0/0
ip ad 14.1.1.2 24
interface loopback 0
ip ad 1.1.1.1 24

rip 100
version 2
undo summary
network 12.0.0.0
network 14.0.0.0
network 1.0.0.0

r2
interface g0/0/1
ip ad 23.1.1.1 24
interface g0/0/0
ip ad 12.1.1.2 24
interface loopback 0
ip ad 2.2.2.2 24

rip 100
version 2
undo summary
network 12.0.0.0
network 23.0.0.0
network 2.0.0.0

r3
interface g0/0/1
ip ad 34.1.1.1 24
interface g0/0/0
ip ad 23.1.1.2 24
interface loopback 0
ip ad 3.3.3.3 24

rip 100
version 2
undo summary
network 23.0.0.0
network 34.0.0.0
network 3.0.0.0

r4
interface g0/0/1
ip ad 14.1.1.1 24
interface g0/0/0
ip ad 34.1.1.2 24
interface g0/0/2
ip ad 45.1.1.1 24
interface g4/0/1
ip ad 46.1.1.1 24
interface loopback 0
ip ad 4.4.4.4 24

rip 100
version 2
undo summary
network 14.0.0.0
network 34.0.0.0
network 45.0.0.0
network 46.0.0.0
network 4.0.0.0

r5
interface g0/0/2
ip ad 45.1.1.2 24
interface loopback 0
ip ad 5.5.5.5 24

rip 100
version 2
undo summary
network 45.0.0.0
network 5.0.0.0

r6
interface g0/0/1
ip ad 67.1.1.1 24
interface g0/0/0
ip ad 46.1.1.2 24
interface loopback 0
ip ad 6.6.6.6 24

rip 100
version 1
network 46.0.0.0
network 67.0.0.0
network 6.0.0.0

r7
interface g0/0/0
ip ad 67.1.1.2 24
interface loopback 0
ip ad 7.7.7.7 24

rip 100
version 1
network 67.0.0.0
network 7.0.0.0

r1
interface loopback 1
ip ad 172.16.1.1 24
interface loopback 2
ip ad 172.16.2.1 24
interface loopback 3
ip ad 172.16.3.1 24
rip 100
network 172.16.0.0

//要求r3使用r2访问r1环回
r4
acl 2000
rule permit source 1.1.1.0 0.0.0.0
rule permit source 172.16.0.0 0.0.3.0 //允许r1的三个环回 172.16.1.1 2.1 3.1 1、2、3的前六位相同后两位不同 不同的用1表示 所以写成00000011 即3 即0.0.3.0
interface g0/0/0
rip metricout 2000 5 //把r4接口0/0/0出去的时候的开销值改大 从而让r3使用r2访问r1环回 而非走r4

r3
display ip routing-table protocol rip //发现r3去1.0 走的是23.1.1.1 因为r4出接口0/0/0开销值被改大了

//要求加快网络收敛
r1
rip 100
timers rip 10 60 40

r2
rip 100
timers rip 10 60 40

//要求减少路由条目数量(即做汇总 在明细路由所在的出接口上做)
r1
interface g0/0/1
rip summary-address 172.16.0.0 255.255.252.0
interface g0/0/0
rip summary-address 172.16.0.0 255.255.252.0

//要求增加路由传递的安全性(做认证)
r1
interface g0/0/1
rip authentication-mode md5 usual cipher cisco

r2
interface g0/0/0
rip authentication-mode md5 usual cipher cisco

//要求r5创建一个环回模拟运营商 不能通告(rip的下放缺省)
r5
interface loopback 1
ip ad 100.1.1.1 24
rip 100
default-route originate

r7
display ip routing-table protocol rip //看不到缺省 因为版本不一 r7是v1 r5是v2

r1
ping 100.1.1.1 //通

//要求r1 telnet r2环回实际telnet到r7上
r6
interface g0/0/0
rip version 2 //首先r1要能到r7 因为r1到r5版本为2 r6到r7版本是为1 版本不一 所以要在r4的4/0/1上敲rip version 1 或在r6的0/0/0上敲 rip version 2 但切忌只敲其中一条

r7
user-interface vty 0 4
authentication-mode aaa
q
aaa
local-user huawei password cipher cisco
local-user huawei privilege level 3 //三级权限 刚好能进路由器配置的最低级的权限
local-user huawei service-type telnet

r1
telnet 7.7.7.7

r2
interface g0/0/0
nat server protocol tcp global 2.2.2.3 23 inside 7.7.7.7 23 (2.2.2.3:不能写已有的地址)

r4
acl 2001
rule permit source 7.0.0.0 0.0.0.0 //要让r2到达r7走23.1.1.2 而非12.1.1.1 因为从r1去r7走的是r1-r2-r3-r4-r6-r7
interface g0/0/1
rip metricout 2001 5 //把r4接口0/0/1出去的时候的开销值改大 从而让r2到达r7走23.1.1.2 而非12.1.1.1
r2
display ip routing-table protocol rip 之前r2到达的两条路由中的12.1.1.1无了 剩23.1.1.2

同理 回去的路径也要一致 保证来回一致 r7-r6-r4-r3-r2-r1
r7
display ip routing-table protocol rip //发现r7回r2的路由有两条 14.1.1.2 34.1.1.1 此时又要把r1接口出去的时候的开销值改大 从而满足走34.1.1.1 而非14.1.1.2

r1
acl 2000
rule permit source 2.2.2.0 0.0.0.0
interface g0/0/0
rip metricout 2000 5

acl 2000
rule permit source 12.1.1.0 0.0.0.0

r4
display ip routing-table protocol rip //发现到r2的路由只剩34.1.1.1 说明r7回r2只走r3

r1
telnet 2.2.2.3
display ip int brief //发现0/0/0接口为67.1.1.2

//要求r6-r7路由不能学习到达r1环回路由
r6
acl 2100
rule deny source 1.1.1.0 0.0.0.0
rule deny source 172.16.0.0 0.0.0.0
rule permit source any 华为控制层面拒绝所有 数据层面允许所有
q
rip 100
filter-policy 2100 import g0/0/0

//要求全网可达
r7
ping 1.1.1.1
ping 172.16.1.1

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值