Technorati 标签: BGP, CCIE, default-information, originate, 路由

BGP default-information originate function testing report

1, Requirement description

This Testing need check MAIPU and CISCO BGP default-information orginate compatible with each other or not.

2, Testing topology

clip_p_w_picpath002

3, Testing configuration

MP3840:

interface loopback0

ip address 6.6.6.6 255.255.255.255

exit

interface fastethernet0

ip address 2.1.1.2 255.255.255.0

exit

router bgp 100

no auto-summary

no synchronization

redistribute static

neighbor 2.1.1.1 remote-as 100

default-information originate

exit

ip route 0.0.0.0 0.0.0.0 loopback0

CISCO7200:

interface FastEthernet1/0

ip address 2.1.1.1 255.255.255.0

duplex full

speed auto

router bgp 100

no synchronization

bgp log-neighbor-changes

neighbor 2.1.1.2 remote-as 100

no auto-summary

4, Test result:

On MAIPU 3840, due to this static routing already redistribute into BGP routing table, so :

MP3840#show ip bgp

BGP table version is 3, local router ID is 6.6.6.6

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

[S]*> 0.0.0.0/0 0.0.0.0 0 32768 ?

On CISCO router, MAIPU bgp neighbor use “default-information originate” , the default routing was announced to peer CISCO 7200.

CISCO7200#show ip bgp

BGP table version is 5, local router ID is 2.1.1.1

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

* I 0.0.0.0 2.1.1.2 0 100 0 ?

CISCO7200#

在这里,有一点我都忘记了,今天做这个测试报告正好复习一下,核心路由表和bgp路由表的关系,为什么show ip bgp 有路由条目,但是show ip route没有?

clip_p_w_picpath002[1]

在路由器MP3840上面,bgp 100进程下面配置了default-information originate,那就必须把静态默认路由充分发进来。

一般用这两个命令的目的是说路由器作为ASBR,而且是internet出口网关。

如果在cisco7200上面想要到达一个目的,但是在cisco7200上面的路由表又没有,那么这个时候3840会把自身默认路由通过bgp通告给cisco7200.这样达到所有的未知路由都送到3840这个出口网关上面去。

所以,条件就是,如果一个设备需要配置成为internet默认网关的话,需要下面两个命令:

router bgp 100

no auto-summary

no synchronization

redistribute static

neighbor 2.1.1.1 remote-as 100

default-information originate

exit

ip route 0.0.0.0 0.0.0.0 6.6.6.7

但是,这样并不代表就万事大吉。

就拿这个实例来说明问题。注意上面的配置我已经做了修改,6.6.6.7这个网关是不存在的。

我们来看看2.1.1.1这台路由器的路由表的情况:

clip_p_w_picpath004

这里可以看到。在bgp路由表中,实际上6.6.6.7是宣告过来作为默认的网关的。从2.1.1.2宣告过来的。

但是show ip route只有两个直连路由。

这是因为如果想要把bgp路由表的路由条目写道IGP表中,需要是最优的路由。

也就是表示为:[B]*>

这里没有大于符号,说明不是最优的路由。

而要想让bgp路由表的路由条目处于最优,有两个条件,要不打开同步,要不目的可达.

显然,这里一个都不符合。

解决办法就是在2.1.1.1路由器上配置一个路由到达6.6.6.7的路由。

还有就是6.6.6.7需要在网络中真实存在,只要这两个条件达到了,最后在路由器cisco7200上面show出来的信息应该是:

clip_p_w_picpath006