<b>BGP default-information originate function testing report</b>
<b>1, Requirement description</b>
This Testing need check MAIPU and CISCO BGP default-information orginate compatible with each other or not.
<b>2, Testing topology</b>
<b>3, Testing configuration</b>
<b>MP3840:</b>
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
router bgp 100
no auto-summary
no synchronization
redistribute static
neighbor 2.1.1.1 remote-as 100
default-information originate
ip route 0.0.0.0 0.0.0.0 loopback0
<b>CISCO7200:</b>
interface FastEthernet1/0
ip address 2.1.1.1 255.255.255.0
duplex full
speed auto
bgp log-neighbor-changes
neighbor 2.1.1.2 remote-as 100
<b>4, Test result:</b>
<b>On MAIPU 3840, due to this static routing already redistribute into BGP routing table, so :</b>
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, &gt; best, i - internal,
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
[S]*&gt; 0.0.0.0/0 0.0.0.0 0 32768 ?
<b>On CISCO router, MAIPU bgp neighbor use “default-information originate” , the default routing was announced to peer CISCO 7200.</b>
CISCO7200#show ip bgp
BGP table version is 5, local router ID is 2.1.1.1
r RIB-failure, S Stale
<b>Network Next Hop Metric LocPrf Weight Path</b>
<b>* I 0.0.0.0 2.1.1.2 0 100 0 ?</b>
CISCO7200#
在這裡,有一點我都忘記了,今天做這個測試報告正好複習一下,核心路由表和bgp路由表的關系,為什麼show ip bgp 有路由條目,但是show ip route沒有?
在路由器MP3840上面,bgp 100程序下面配置了default-information originate,那就必須把靜态預設路由充分發進來。
一般用這兩個指令的目的是說路由器作為ASBR,而且是internet出口網關。
如果在cisco7200上面想要到達一個目的,但是在cisco7200上面的路由表又沒有,那麼這個時候3840會把自身預設路由通過bgp通告給cisco7200.這樣達到所有的未知路由都送到3840這個出口網關上面去。
是以,條件就是,如果一個裝置需要配置成為internet預設網關的話,需要下面兩個指令:
ip route 0.0.0.0 0.0.0.0 6.6.6.7
但是,這樣并不代表就萬事大吉。
就拿這個執行個體來說明問題。注意上面的配置我已經做了修改,6.6.6.7這個網關是不存在的。
我們來看看2.1.1.1這台路由器的路由表的情況:
這裡可以看到。在bgp路由表中,實際上6.6.6.7是宣告過來作為預設的網關的。從2.1.1.2宣告過來的。
但是show ip route隻有兩個直連路由。
這是因為如果想要把bgp路由表的路由條目寫道IGP表中,需要是最優的路由。
也就是表示為:[B]*&gt;
這裡沒有大于符号,說明不是最優的路由。
而要想讓bgp路由表的路由條目處于最優,有兩個條件,要不打開同步,要不目的可達.
顯然,這裡一個都不符合。
解決辦法就是在2.1.1.1路由器上配置一個路由到達6.6.6.7的路由。
還有就是6.6.6.7需要在網絡中真實存在,隻要這兩個條件達到了,最後在路由器cisco7200上面show出來的資訊應該是:
本文轉自 hny2000 51CTO部落格,原文連結:http://blog.51cto.com/361531/898650