路由重发布

路由重发布
1、 配置地址
2、 配置ospf路由
3、 配置RIP
4、 R3上配置静态路由目标网络192.168.6.0 下一跳192.168.4.2
5、 配置OSPF重发布到RIP 中
6、 配置RIP重分布到OSPF中
7、 重发布直连路由到RIP 和ospf 中去
8、 重发布静态路由到RIP和OSPF中去
9、 重发布默认路由到RIP 和OSPF中去

基本配置
R1
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
no shutdown
!
router ospf 1
network 192.168.1.0 0.0.0.255 area 0
!
R2
interface FastEthernet0/0
ip address 192.168.1.2 255.255.255.0
no shutdown
!
interface FastEthernet1/0
ip address 192.168.2.1 255.255.255.0
no shutdown
!
router ospf 1
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0

R3

interface Loopback0
ip address 192.168.5.1 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.2.2 255.255.255.0
no shutdown

!
interface FastEthernet1/0
ip address 192.168.3.1 255.255.255.0
no shutdown
!
interface FastEthernet2/0
ip address 192.168.4.1 255.255.255.0
no shutdown

router ospf 1
network 192.168.2.0 0.0.0.255 area 0

router rip
version 2
network 192.168.3.0

ip route 192.168.6.0 255.255.255.0 192.168.4.2

R4
interface FastEthernet0/0
ip address 192.168.3.2 255.255.255.0
no shutdown
!
router rip
version 2
network 192.168.3.0
no auto-summary

R5
interface Loopback0
ip address 192.168.6.1 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.4.2 255.255.255.0
no shutdown


在路由重发布之前要查看各路由器的路由条目

R2上的路由信息
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, FastEthernet1/0
R2#

R4上的路由信息
R4#show ip route
C 192.168.3.0/24 is directly connected, FastEthernet0/0

在R3上进行路由重发布
R3(config)#router rip
R3(config-router)#redistribute ospf 1 metric 2 发布OSPF到RIP
R3(config-router)#redistribute connected 发布直连路由
R3(config-router)#redistribute static metric 5 发布静态路由
R3(config-router)#default-information originate 发布默认路由
R3(config-router)#exit
R3(config)#
R3(config)#router ospf 1
R3(config-router)#redistribute rip subnets 发布RIP到OSPF
R3(config-router)#redistribute connected subnets发布直连路由
R3(config-router)#redistribute static subnets发布静态路由
R3(config-router)#default-information originate always发布默认路由

R4#show ip route

R 192.168.4.0/24 [120/1] via 192.168.3.1, 00:00:02, FastEthernet0/0
R 192.168.5.0/24 [120/1] via 192.168.3.1, 00:00:02, FastEthernet0/0
R 192.168.6.0/24 [120/5] via 192.168.3.1, 00:00:02, FastEthernet0/0
R 192.168.1.0/24 [120/2] via 192.168.3.1, 00:00:02, FastEthernet0/0
R 192.168.2.0/24 [120/1] via 192.168.3.1, 00:00:02, FastEthernet0/0
C 192.168.3.0/24 is directly connected, FastEthernet0/0
R* 0.0.0.0/0 [120/1] via 192.168.3.1, 00:00:02, FastEthernet0/0
R4#

R2#show ip route
O E2 192.168.4.0/24 [110/20] via 192.168.2.2, 00:08:45, FastEthernet1/0
O E2 192.168.5.0/24 [110/20] via 192.168.2.2, 00:08:45, FastEthernet1/0
O E2 192.168.6.0/24 [110/20] via 192.168.2.2, 00:08:35, FastEthernet1/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, FastEthernet1/0
O E2 192.168.3.0/24 [110/20] via 192.168.2.2, 00:08:51, FastEthernet1/0
O*E2 0.0.0.0/0 [110/1] via 192.168.2.2, 00:08:28, FastEthernet1/0

转载于:https://blog.51cto.com/ronning/2328694

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值