关于BGP和OSPF 共存下router-id问题
标签:
杂谈 |
分类: BGP |
关于BGP和OSPF 共存问题,今天敲了个试验。关于BGP的。拓扑为TCP/IP路由技术卷二上的,先上图
说说问题:
router bgp 100
neighbor 192.168.1.210 remote-as
300
neighbor 192.168.1.225 remote-as
200
neighbor 192.168.255.253 remote-as
100
neighbor 192.168.255.253 update-source
Loopback0
neighbor 192.168.255.253
next-hop-self
这是Vail route的bgp配置
图中可以看出。Vail和Telluride中间有跟以太网线做冗余。因为环境原因,我自己没有冗余这根线。就因为这样,问题出来了。
因为是用环回接口做的BGP邻居关系,然后通过Aspen中的OSPF转接(注。Vail和Telluride中OSPF均redistribute BGP)。然后其他的都按照原来的配置方法,具体怎么配略。
现在。Vail上的BGP路由表就是
* i192.168.1.200/30
192.168.255.253
*> 192.168.1.212/30
192.168.1.210
*> 192.168.1.216/30
192.168.1.225
*
i192.168.50.0
*
i192.168.75.0
*>
192.168.100.0
*>
192.168.200.0
*>
192.168.250.0
可以看出,Telluride那边的过来的都是非最佳路径路由。
我就纳闷了。为啥不是最佳的,难道是同步规则?
当一个路由器从IBGP对等体收到一个目的地的更新信息,在把它通告给其它EBGP对等体之前,要试图验证该目的地通过自治系统内部能否到达(即验证该目的地是否存在于IGP,非BGP路由器是否可传递业务量到该目的地。若IGP认识这个目的地,才接受这样一条路由信息并通告给EBGP对等体,否则将把这个路由当作与IGP不同步,不进行通告。
于是我查看路由表:
O E2 192.168.75.0/24 [110/1] via 192.168.1.222, 00:03:00,
FastEthernet0/0
B
B
C
O
O E2 192.168.50.0/24 [110/1] via 192.168.1.222, 00:03:00,
FastEthernet0/0
C
O E2
O
B
C
C
B
B
Telluride那边的BGP路由都重分发过来的啊。奇了怪了··同步规则也满足了但是就是么有。
后来通过查看了N多文档,找到原因了:
Paths marked as "not synchronized" in the show ip bgp longer-prefixes output. If BGP synchronization is enabled, which it is by default in Cisco IOS® Software, there must be a match for the prefix in the IP routing table in order for an internal (iBGP) path to be considered a valid path. If the matching route is learned from an OSPF neighbor, its OSPF router ID must match the BGP router ID of the iBGP neighbor. Most users prefer to disable synchronization using the no synchronization BGP subcommand
而使用EIGRP则没有这个限制,使用EIGRP不会有Router_id相同这种变态要求。
这是BGP表:
r>i192.168.1.200/30
192.168.255.253
*> 192.168.1.212/30
192.168.1.210
*> 192.168.1.216/30
192.168.1.225
r>i192.168.50.0
r>i192.168.75.0
*>
192.168.100.0
*>
192.168.200.0
*>
192.168.250.0
Route Table :
D EX 192.168.75.0/24 [170/286720] via 192.168.1.222, 00:08:51,
FastEthernet0/0
B
B
C
D
D EX 192.168.50.0/24 [170/286720] via 192.168.1.222, 00:08:51,
FastEthernet0/0
C
D EX
D
B
C
C
B
B

加载中…