OSPF重发布练习

拓扑和IP规划

在这里插入图片描述

ip配置

AR1

sys
int g0/0/0
ip a 12.0.0.1 24
int g0/0/1
ip a 14.0.0.1 24
int l0
ip a 1.1.1.1 24

AR2

sys
int g0/0/0
ip a 12.0.0.2 24
int g0/0/1
ip a 23.0.0.2 24
int l0
ip a 2.2.2.2 24

AR3

sys
int g0/0/1
ip a 34.0.0.1 24
int g 0/0/0
ip a 23.0.0.1 24
int l0
ip a 3.3.3.3 24

AR4

sys
int g0/0/1
ip a 14.0.0.2 24
int g 0/0/0
ip a 34.0.0.2 24
int l0
ip a 4.4.4.4 24

ARP

AR1

rip 1
version 2
network 12.0.0.0
network 14.0.0.0
network 1.0.0.0

AR2

rip 1
version 2
network 12.0.0.0
network 2.0.0.0

AR4

rip 1
version 2
network 14.0.0.0

OSPF

AR2

ospf 2 router-id 2.2.2.2
area 0
network 23.0.0.1 0.0.0.255

AR3

ospf 2 router-id 3.3.3.3
area 0
network 23.0.0.0 0.0.0.255
network 34.0.0.0 0.0.0.255
network 3.3.3.0 0.0.0.255

AR4

ospf 2 router-id 4.4.4.4
area 0
network 34.0.0.0 0.0.0.255
network 4.4.4.0 0.0.0.255

双向重发布

AR2、AR4

ospf 2
import-route rip 1
rip 1
import-route ospf 2

处理重发带来的选路问题

4.4.4.4的路由回馈和选路问题

#修改接口类型,统一为24(OSPF计算为32)。
ospf network-type broadcast 

RIP

ip ip-prefix 1 permit 4.4.4.0 24
route-policy a permit node 10
if-match ip-prefix 1
apply cost 2
route-policy a permit  node 20
重发布调用:
rip 1
import-route ospf 2 route-policy a

AR4上:

ip ip-prefix 1 permit 2.2.2.0 24
route-policy a permit node 10
if-match ip-prefix 1
apply cost 2
route-policy a permit  node 20
重发布调用:
rip 1
import-route ospf 2 route-policy a

在这里插入图片描述

OSPF

AR4:

ip ip-prefix 2 permit 14.0.0.0 24
route-policy a permit node 10
if-match ip-prefix 2
apply cost 2
apply cost-type type-1
route-policy a permit  node 20
ospf 2
import-route  rip 1 route-policy a

AR2:

ip ip-prefix 2 permit 2.2.2.0 24
ip ip-prefix 2 permit 12.0.0.0 24
route-policy a permit node 10
if-match ip-prefix 2
apply cost 2
apply cost-type type-1
route-policy a permit  node 20
ospf 2
import-route  rip 1 route-policy a

在这里插入图片描述

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值