一个简单地次优路径小实验
原创
©著作权归作者所有:来自51CTO博客作者ShjRouting的原创作品,请联系作者获取转载授权,否则将追究法律责任
基本配置
R1:
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
duplex auto
speed auto
interface FastEthernet0/1
ip address 13.13.13.1 255.255.255.0
duplex auto
speed auto
router eigrp 123
network 12.12.12.1 0.0.0.0
network 13.13.13.1 0.0.0.0
no auto-summary
-------------------------------------------------
R2:
interface Loopback0
ip address 2.2.2.2 255.255.255.0
ip ospf network point-to-point
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
duplex auto
speed auto
interface FastEthernet0/1
ip address 23.23.23.2 255.255.255.0
duplex auto
speed auto
router eigrp 123
network 2.2.2.2 0.0.0.0
network 12.12.12.2 0.0.0.0
no auto-summary
router ospf 1
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 0
network 23.23.23.2 0.0.0.0 area 0
------------------------------------------------
R3:
interface Loopback0
ip address 3.3.3.3 255.255.255.0
ip ospf network point-to-point
interface FastEthernet0/0
ip address 13.13.13.3 255.255.255.0
duplex auto
speed auto
interface FastEthernet0/1
ip address 23.23.23.3 255.255.255.0
duplex auto
speed auto
router eigrp 123
network 3.3.3.3 0.0.0.0
network 13.13.13.3 0.0.0.0
no auto-summary
router ospf 1
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 0
network 23.23.23.3 0.0.0.0 area 0
配完后,我们看R2的路由表:
R2#sh ip route | in 3.3.3.0
D 3.3.3.0 [90/435200] via 12.12.12.1, 00:05:04, FastEthernet0/0
同样的,R3上:
R3#sh ip route | in 2.2.2.0
D 2.2.2.0 [90/435200] via 13.13.13.1, 00:05:20, FastEthernet0/0
可以很明显地看到两条次优:
R2到达R3的loopback0口选择了EIGRP路由,从R1绕,R3到R2loopback0口也是一样,原因很好分析,因为EIGRP的内部管理距离90优于OSPF的110。
因此解决方案就是改变管理距离:
这里可能有人会过滤,但是过滤了EIGRP的路由就不冗余了。
R2
ip access-list standard R3LOOPBACK
permit 3.3.3.0 0.0.0.255
router ospf 1
distance 89 3.3.3.3 0.0.0.0 R3LOOPBACK
R3
ip access-list standard R2LOOPBACK
permit 2.2.2.0 0.0.0.255
router ospf 1
distance 89 2.2.2.2 0.0.0.0 R2LOOPBACK
配置结束后再看路由表
R2#sh ip route | in 3.3.3.0
O 3.3.3.0 [89/11] via 23.23.23.3, 00:10:24, FastEthernet0/1
R3#sh ip route | in 2.2.2.0
O 2.2.2.0 [89/11] via 23.23.23.2, 00:03:19, FastEthernet0/1
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
一个简单的MPLS ×××实验
MPLS VPN实验
职场 BGP 休闲 MPLS VPN -
Laravel实现一个简单的小例子
第一次学习框架,写错的地方麻烦各位大侠指导我一下首先实现过程如下:看完流程图获得了大概的印象吧,趁热打铁,把你的印象变成知识
Laravel PHP框架 php laravel Test