4-高级路由:RIP默认路由

一、实验拓扑:

二、命令部署:
1、基本部署:
R1(config)#int f0/0
R1(config-if)#no shutdown
R1(config-if)#ip add 14.1.1.1 255.255.255.0
R1(config-if)#int f1/0
R1(config-if)#no shutdown
R1(config-if)#ip add 12.1.1.1 255.255.255.0

R1(config)#router rip
R1(config-router)#network 14.1.1.1
R1(config-router)#network 12.1.1.1

R2(config-if)#int f0/0
R2(config-if)#no shutdown
R2(config-if)#ip add 12.1.1.2 255.255.255.0
R2(config-if)#int f1/0
R2(config-if)#no shutdown
R2(config-if)#ip add 23.1.1.2 255.255.255.0

R2(config)#router rip
R2(config-router)#network 12.1.1.2
R2(config-router)#network 23.1.1.2

R3(config)#int f0/0
R3(config-if)#no shutdown
R3(config-if)#ip add 23.1.1.3 255.255.255.0

R3(config)#router rip
R3(config-router)#network 23.1.1.3

R4(config)#int f0/0
R4(config-if)#no shutdown
R4(config-if)#ip add 14.1.1.4 255.255.255.0

R4(config)#int lo1
R4(config-if)#ip add 4.4.4.4 255.255.255.0

2、重点部署:
①第一种方法:互指默认路由,在边界路由器R1 RIP协议内重分发静态路由。
R1(config)#ip route 0.0.0.0 0.0.0.0 14.1.1.4
R4(config)#ip route 0.0.0.0 0.0.0.0 14.1.1.1

R1(config)#router rip
R1(config-router)#redistribute static

②第二种方法:互指默认路由,在边界路由器R1 RIP协议内宣告0.0.0.0网段。
R1(config)#ip route 0.0.0.0 0.0.0.0 14.1.1.4
R4(config)#ip route 0.0.0.0 0.0.0.0 14.1.1.1

R1(config)#router rip
R1(config-router)#network 0.0.0.0

③第三种方法(推荐使用此方法):互指默认路由,在边界路由器R1 RIP协议内部署:default-information originate(强制让身后R2、R3获得带*默认路由)
R1(config)#ip route 0.0.0.0 0.0.0.0 14.1.1.4
R4(config)#ip route 0.0.0.0 0.0.0.0 14.1.1.1

R1(config)#router rip
R1(config-router)#default-information originate

④第四种方法:
R1(config)#no ip route 0.0.0.0 0.0.0.0 14.1.1.4
R4(config)#no ip route 0.0.0.0 0.0.0.0 14.1.1.1

R1(config)#ip default-network 14.0.0.0
R1(config)#router rip
R1(config-router)#network 14.0.0.0

三、验证:
①第一种方法:
未重分发前:
R2#show ip route
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, FastEthernet1/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, FastEthernet0/0
R 14.0.0.0/8 [120/1] via 12.1.1.1, 00:00:15, FastEthernet0/0
测试:R2#ping 4.4.4.4 显示不通

重分发后:
R2#show ip route
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, FastEthernet1/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, FastEthernet0/0
R 14.0.0.0/8 [120/1] via 12.1.1.1, 00:00:03, FastEthernet0/0
R* 0.0.0.0/0 [120/1] via 12.1.1.1, 00:00:03, FastEthernet0/0
测试:R2#ping 4.4.4.4 成功Ping 通
同理:R3和R2显示效果一样。
②第二种方法:
此处R1的SecureCRT卡住了,可能是新版本不允许这样。

③第三种方法:
R2#show ip route
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, FastEthernet1/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, FastEthernet0/0
R 14.0.0.0/8 [120/1] via 12.1.1.1, 00:00:04, FastEthernet0/0
R 0.0.0.0/0 [120/1] via 12.1.1.1, 00:00:04, FastEthernet0/0
测试:R2#ping 4.4.4.4 成功Ping 通
同理:R3和R2显示效果一样。
④第四种方法:
R2#show ip route
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, FastEthernet1/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, FastEthernet0/0
R 14.0.0.0/8 [120/1] via 12.1.1.1, 00:00:01, FastEthernet0/0
R
0.0.0.0/0 [120/1] via 12.1.1.1, 00:00:01, FastEthernet0/0
测试:R2#ping 4.4.4.4 不通很正常,因为没有到4.4.4.4的路由条目。
4-高级路由:RIP默认路由

转载于:https://blog.51cto.com/13856092/2137469

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值