加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

关于BGP和OSPF 共存下router-id问题

(2009-03-20 09:50:39)
标签:

杂谈

分类: BGP

关于BGP和OSPF 共存问题,今天敲了个试验。关于BGP的。拓扑为TCP/IP路由技术卷二上的,先上图

关于BGP和OSPF <wbr>共存下router-id问题

 

说说问题:

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路由表就是

 

    Network          Next Hop            Metric LocPrf Weight Path
* i192.168.1.200/30 192.168.255.253            100      0 400 i
*> 192.168.1.212/30 192.168.1.210                       0 300 i
*> 192.168.1.216/30 192.168.1.225                       0 200 i
* i192.168.50.0     192.168.255.253            100      0 400 i
* i192.168.75.0     192.168.255.253            100      0 400 i
*> 192.168.100.0    192.168.1.225                       0 200 i
*> 192.168.200.0    192.168.1.225                       0 200 i
*> 192.168.250.0    192.168.1.210                       0 300 i

 

可以看出,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
   192.168.200.0/24 [20/0] via 192.168.1.225, 00:05:07
   192.168.250.0/24 [20/0] via 192.168.1.210, 00:37:42
     192.168.255.0/32 is subnetted, 2 subnets
      192.168.255.254 is directly connected, Loopback0
      192.168.255.253 [110/3] via 192.168.1.222, 00:02:50, FastEthernet0/0
O E2 192.168.50.0/24 [110/1] via 192.168.1.222, 00:03:00, FastEthernet0/0
     192.168.1.0/30 is subnetted, 7 subnets
      192.168.1.224 is directly connected, Serial1/1
O E2    192.168.1.200 [110/1] via 192.168.1.222, 00:03:00, FastEthernet0/0
      192.168.1.196 [110/2] via 192.168.1.222, 00:03:10, FastEthernet0/0
      192.168.1.216 [20/0] via 192.1都的68.1.225, 00:03:25
      192.168.1.220 is directly connected, FastEthernet0/0
      192.168.1.208 is directly connected, Serial1/2
      192.168.1.212 [20/0] via 192.168.1.210, 00:03:25
   192.168.100.0/24 [20/0] via 192.168.1.225, 00:05:08

 

 

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            100      0 400 i
*> 192.168.1.212/30 192.168.1.210                       0 300 i
*> 192.168.1.216/30 192.168.1.225                       0 200 i
r>i192.168.50.0     192.168.255.253            100      0 400 i
r>i192.168.75.0     192.168.255.253            100      0 400 i
*> 192.168.100.0    192.168.1.225                       0 200 i
*> 192.168.200.0    192.168.1.225                       0 200 i
*> 192.168.250.0    192.168.1.210                       0 300 i

 

Route Table :

D EX 192.168.75.0/24 [170/286720] via 192.168.1.222, 00:08:51, FastEthernet0/0
   192.168.200.0/24 [20/0] via 192.168.1.225, 00:00:52
   192.168.250.0/24 [20/0] via 192.168.1.210, 00:33:26
     192.168.255.0/32 is subnetted, 2 subnets
      192.168.255.254 is directly connected, Loopback0
      192.168.255.253
           [90/158720] via 192.168.1.222, 00:10:02, FastEthernet0/0
D EX 192.168.50.0/24 [170/286720] via 192.168.1.222, 00:08:51, FastEthernet0/0
     192.168.1.0/30 is subnetted, 7 subnets
      192.168.1.224 is directly connected, Serial1/1
D EX    192.168.1.200
           [170/286720] via 192.168.1.222, 00:08:51, FastEthernet0/0
      192.168.1.196 [90/30720] via 192.168.1.222, 00:10:02, FastEthernet0/0
      192.168.1.216 [20/0] via 192.168.1.225, 00:00:52
      192.168.1.220 is directly connected, FastEthernet0/0
      192.168.1.208 is directly connected, Serial1/2
      192.168.1.212 [20/0] via 192.168.1.210, 00:15:52
   192.168.100.0/24 [20/0] via 192.168.1.225, 00:00:52

 

 

 

 

 

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有