请教一个BGP问题
大家好,请教一个BGP的问题,拓扑如图:R1和R2,R3是EBGP邻居,R2和R3是IBGP邻居。R1宣告1.1.1.0网络,R1将1.1.1.0发送给R2时,设置MED值为10,发送给R3时,设置MED值为20。
R3会收到两条BGP路由1.1.1.0,一条是R1发来的(AD=20,Metric=20) ,另一条是R2发来的(AD=200,Metric=10),按照AD值的大小,R3是不是应该选择R1作为1.1.1.0的下一跳? 但实验结果R3会选择R2作为下一跳,这是为什么? 谢谢。
三个路由器配置如下:
R1:
router bgp 100
network 1.1.1.0 mask 255.255.255.0
neighbor 12.1.1.2 remote-as 200
neighbor 12.1.1.2 route-map MED10 out
neighbor 13.1.1.3 remote-as 200
neighbor 13.1.1.3 route-map MED20 out
route-map MED10 permit 10
set metric 10
!
route-map MED20 permit 10
set metric 20
R2:
router bgp 200
no synchronization
bgp log-neighbor-changes
neighbor 12.1.1.1 remote-as 100
neighbor 23.1.1.3 remote-as 200
neighbor 23.1.1.3 next-hop-self
R3:
router bgp 200
no synchronization
bgp log-neighbor-changes
neighbor 13.1.1.1 remote-as 100
neighbor 23.1.1.2 remote-as 200
neighbor 23.1.1.2 next-hop-self
no auto-summary
BGP选路原则问题,请把那10条选路原则看完以后,你就会明白了! 错了,是13条选路原则。 路过了解一下 不同AS要比較MED 必須另外下參數 本帖最后由 dadasq 于 2015-11-20 21:43 编辑
BGP的选路原则跟管理距离没有什么关系的,楼主。
它是根据自身的选路原则来决定将BGP表中的哪个路由最优,也就是best
然后装载进路由表中。欢迎加我QQ探讨56839137
BGP选路原则,按顺序执行,MED值在第6位,比较next-hop在第8条
而且跟AD没有关系
你把2个MED值调换下位置就好了 show ip route bgp
页:
[1]