BGP的基本原理

IPA-taskpacket001BGP的基本原理

實驗一:BGP路由傳遞原則


實驗目標:掌握BGP的路由傳遞原則

實驗TOP



wKioL1NM1yuSObxWAALjs52h1tM138.jpg

wKiom1NM11iT3L6IAAJt6bMfUvk443.jpg



基本配置


R1


!

hostname R1

!

no ip domain lookup

!

interface Loopback0

ipaddress 1.1.1.1 255.255.255.0

!

interface Loopback10

ipaddress 10.10.10.10 255.255.255.0

ipospf network point-to-point

!

interface Serial1/0

ipaddress 12.1.1.1 255.255.255.0

!

interface Serial1/1

ipaddress 13.1.1.1 255.255.255.0

!

router ospf 10

router-id 1.1.1.1

network 10.10.10.0 0.0.0.255 area 0

network 12.1.1.0 0.0.0.255 area 0

network 13.1.1.0 0.0.0.255 area 0

!

router bgp 65001

nosynchronization

bgprouter-id 1.1.1.1

network 1.1.1.0 mask 255.255.255.0

neighbor 12.1.1.2 remote-as 65001

neighbor 13.1.1.3 remote-as 65001

noauto-summary

!



R2


!

hostname R2

!

no ip domain lookup

!

interface Loopback0

ipaddress 2.2.2.2 255.255.255.0

!

interface Loopback10

ipaddress 20.20.20.20 255.255.255.0

ipospf network point-to-point

!

interface Serial1/0

ipaddress 24.2.2.2 255.255.255.0

!

interface Serial1/1

ipaddress 12.1.1.2 255.255.255.0

!        

router ospf 10

router-id 2.2.2.2

network 12.1.1.0 0.0.0.255 area 0

network 20.20.20.0 0.0.0.255 area 0

network 24.2.2.0 0.0.0.255 area 0

!

router bgp 65001

nosynchronization

bgprouter-id 2.2.2.2

network 2.2.2.0 mask 255.255.255.0

neighbor12.1.1.1 remote-as 65001

neighbor 24.2.2.4 remote-as 65001

noauto-summary

!



R3


!

hostname R3

!

no ip domain lookup

!

interface Loopback0

ipaddress 3.3.3.3 255.255.255.0

!

interface Loopback10

ipaddress 30.30.30.30 255.255.255.0

ipospf network point-to-point

!

interface Serial1/1

ipaddress 13.1.1.3 255.255.255.0

!

interface Serial1/0

ipaddress 34.3.3.3 255.255.255.0

!        

router ospf 10

router-id 3.3.3.3

network 13.1.1.0 0.0.0.255 area 0

network 30.30.30.0 0.0.0.255 area 0

network34.3.3.0 0.0.0.255 area 0

!

router bgp 65001

nosynchronization

bgprouter-id 3.3.3.3

network 3.3.3.0 mask 255.255.255.0

neighbor 13.1.1.1 remote-as 65001

neighbor 34.3.3.4 remote-as 65001

no auto-summary

!



R4


!

hostname R4

!

no ip domain lookup

!

interface Loopback0

ipaddress 4.4.4.4 255.255.255.0

!

interface Loopback10

ipaddress 40.40.40.40 255.255.255.0

ipospf network point-to-point

!

interface Serial1/0

ipaddress 24.2.2.4 255.255.255.0

!

interface Serial1/1

ipaddress 34.3.3.4 255.255.255.0

!

Interface Serial1/2

Ip address 45.4.4.4 255.255.255.0

!

Interface Serial1/3

Ip address 46.4.4.4 255.255.255.0

!

router ospf 10

router-id 4.4.4.4

network 40.40.40.0 0.0.0.255 area 0

network 24.2.2.0 0.0.0.255 area 0

network 34.3.3.0 0.0.0.255 area 0

!

router bgp 65001

nosynchronization

bgprouter-id 4.4.4.4

network 4.4.4.0 mask 255.255.255.0

neighbor 24.2.2.2 remote-as 65001

neighbor 34.3.3.3 remote-as 65001

neighbor 45.4.4.5 remote-as 65002

neighbor 46.4.4.6 remote-as 65003

noauto-summary

!



R5


!

Hostname R5

!

no ip domain lookup

!

interface Loopback0

ipaddress 5.5.5.5 255.255.255.0

!

interface Serial1/0

ipaddress 45.4.4.5 255.255.255.0

!

router bgp 65002

nosynchronization

bgprouter-id 5.5.5.5

network 5.5.5.0 mask 255.255.255.0

neighbor 45.4.4.4 remote-as 65001

noauto-summary

!



R6


!

hostnameR6

!

interfaceLoopback0

ip address 6.6.6.6 255.255.255.0

!

interfaceSerial1/0

ip address 46.4.4.6 255.255.255.0

!

routerbgp 65003

no synchronization

bgp router-id 6.6.6.6

network 6.6.6.0 mask 255.255.255.0

neighbor 46.4.4.4 remote-as 65001

no auto-summary

!


批註:路由器接口默認是關閉的,所以應將對應的接口開啓




基本配置完成之後,我們開始檢查BGP對等體關係是否正常建立


R1#show ip bgp summary

BGP router identifier 1.1.1.1, local AS number 65001

BGP table version is 4, main routing table version 4

3 network entries using 303 bytes of memory

3 path entries using 144 bytes of memory

2 BGP path attribute entries using 120 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP using 567 total bytes of memory

BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs


Neighbor        V    AS MsgRcvd MsgSent   TblVer InQ OutQ Up/Down  State/PfxRcd

12.1.1.2        4 65001      10     10        4    0   0 00:05:28        1

13.1.1.3        4 65001       9      9        4    0   0 00:04:42        1

R1#


//R1此時已經正常與R2R3建立iBGP對等體關係



R2#show ip bgp summary

BGP router identifier 2.2.2.2, local AS number 65001

BGP table version is 4, main routing table version 4

5 network entries using 505 bytes of memory

5 path entries using 240 bytes of memory

4 BGP path attribute entries using 240 bytes of memory

2 BGP AS-PATH entries using 48 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP using 1033 total bytes of memory

BGP activity 5/0 prefixes, 5/0 paths, scan interval 60 secs


Neighbor        V    AS MsgRcvd MsgSent   TblVer InQ OutQ Up/Down  State/PfxRcd

12.1.1.1        4 65001      11     11        4   0    0 00:06:13        1

24.2.2.4        4 65001      11      9        4    0   0 00:04:51        3

R2#


//R2此時已經正常與R1R4建立iBGP對等體關係



R3#show ip bgp summary

BGP router identifier 3.3.3.3, local AS number 65001

BGP table version is 4, main routing table version 4

5 network entries using 505 bytes of memory

5 path entries using 240 bytes of memory

4 BGP path attribute entries using 240 bytes of memory

2 BGP AS-PATH entries using 48 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP using 1033 total bytes of memory

BGP activity 5/0 prefixes, 5/0 paths, scan interval 60 secs


Neighbor        V    AS MsgRcvd MsgSent   TblVer InQ OutQ Up/Down  State/PfxRcd

13.1.1.1        4 65001      10     10        4    0   0 00:05:53        1

34.3.3.4        4 65001      12     10        4    0   0 00:05:16        3

R3#


//R3此時已經正常與R1R4建立iBGP對等體關係



R4#show ip bgp summary

BGP router identifier 4.4.4.4, local AS number 65001

BGP table version is 6, main routing table version 6

5 network entries using 505 bytes of memory

5 path entries using 240 bytes of memory

4 BGP path attribute entries using 240 bytes of memory

2 BGP AS-PATH entries using 48 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP using 1033 total bytes of memory

BGP activity 5/0 prefixes, 5/0 paths, scan interval 60 secs


Neighbor        V    AS MsgRcvd MsgSent   TblVer InQ OutQ Up/Down  State/PfxRcd

24.2.2.2        4 65001      11     13        6    0   0 00:06:13        1

34.3.3.3        4 65001      11     13        6    0   0 00:06:13        1

45.4.4.5        4 65002       9     11        6    0   0 00:04:34        1

46.4.4.6        4 65003       9     11        6    0   0 00:04:10        1

R4#


//R4此時已經正常與R2R3建立iBGP對等體關係,並且與R5R6建立eBGP對等體關係



R5#show ip bgp summary

BGP router identifier 5.5.5.5, local AS number 65002

BGP table version is 6, main routing table version 6

5 network entries using 505 bytes of memory

5 path entries using 240 bytes of memory

4 BGP path attribute entries using 240 bytes of memory

2 BGP AS-PATH entries using 48 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP using 1033 total bytes of memory

BGP activity 5/0 prefixes, 5/0 paths, scan interval 60 secs


Neighbor        V    AS MsgRcvd MsgSent   TblVer InQ OutQ Up/Down  State/PfxRcd

45.4.4.4        4 65001      11      9        6    0   0 00:04:53        4

R5#


//R5此時已經正常與R4建立eBGP對等體關係



R6#show ip bgp summary

BGP router identifier 6.6.6.6, local AS number 65003

BGP table version is 6, main routing table version 6

5 network entries using 505 bytes of memory

5 path entries using 240 bytes of memory

4 BGP path attribute entries using 240 bytes of memory

2 BGP AS-PATH entries using 48 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP using 1033 total bytes of memory

BGP activity 5/0 prefixes, 5/0 paths, scan interval 60 secs


Neighbor        V    AS MsgRcvd MsgSent   TblVer InQ OutQ Up/Down  State/PfxRcd

46.4.4.4        4 65001      11      9        6    0   0 00:04:56        4

R6#


//R6此時已經正常與R4建立eBGP對等體關係



調試:

1.IBGP路由器從直連IBGP對等體學來的路由條目不會再傳送給另外一個直連IBGP對等體。


如下圖所示,如果R3不會將自己從iBGP對等體R1學習到的1.1.1.0/24網段傳遞給另一個iBGP對等體R4證明此結論正確。


wKioL1NM12Xj2kHsAAJt6bMfUvk193.jpg


首先我們查看R3bgp表:


R3#show ip bgp

BGP table version is 4, local router ID is3.3.3.3

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

             r RIB-failure, S Stale

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


 Network          Next Hop            Metric LocPrf Weight Path

*>i1.1.1.0/24      13.1.1.1                 0    100      0 i

*> 3.3.3.0/24       0.0.0.0                  0         32768 i

*>i4.4.4.0/24       34.3.3.4                 0    100     0 i

* i5.5.5.0/24       45.4.4.5                 0    100     0 65002 i

* i6.6.6.0/24       46.4.4.6                 0    100     0 65003 i


//我們發現R3學習到了R1lo0


再來查看R4的BGP表

R4#show ip bgp

BGP table version is 6, local router ID is 4.4.4.4

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

             r RIB-failure, SStale

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


  Network          Next Hop            Metric LocPrf Weight Path

*>i2.2.2.0/24      24.2.2.2                 0    100     0 i

*>i3.3.3.0/24      34.3.3.3                 0    100     0 i

*> 4.4.4.0/24       0.0.0.0                  0        32768 i

*> 5.5.5.0/24      45.4.4.5                 0             0 65002 i

*> 6.6.6.0/24      46.4.4.6                 0             0 65003 i

R4#


//我們發現R4並沒有學習到了R1lo0



2.IBGP路由器會將自己從其他IBGP對等體學來的條目傳給自身直連的EBGP對等體。


如果R5學習到R3的3.3.3.0/24路由條目,確定此結論正確。


首先我們查看R4BGP


R4#show ip bgp

BGP table version is 6, local router ID is4.4.4.4

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

            r RIB-failure, S Stale

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


 Network          Next Hop            Metric LocPrf Weight Path

*>i2.2.2.0/24       24.2.2.2                 0    100     0 i

*>i3.3.3.0/24       34.3.3.3                 0    100     0 i

*> 4.4.4.0/24       0.0.0.0                  0         32768 i

*> 5.5.5.0/24       45.4.4.5                 0             0 65002 i

*> 6.6.6.0/24       46.4.4.6                 0             0 65003 i

R4#


//R4學習到R3的路由


再來查看R5BGP

R5#show ip bgp

BGP table version is 6, local router ID is5.5.5.5

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

            r RIB-failure, S Stale

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


 Network          Next Hop            Metric LocPrf Weight Path

*> 2.2.2.0/24       45.4.4.4                               0 65001 i

*>3.3.3.0/24       45.4.4.4                               0 65001 i

*> 4.4.4.0/24       45.4.4.4                 0             0 65001 i

*> 5.5.5.0/24       0.0.0.0                  0         32768 i

*> 6.6.6.0/24       45.4.4.4                               0 65001 65003 i

R5#


//我們發現R5確實學習到了R3 的路由,證明上結論沒有問題



3.從EBGP對等體學來的路由條目會傳遞給自身直連的IBGP對等體。


如果R4eBGP對等體R5學習到5.5.5.0/24網段可以傳遞給iBGP對等體R3,則可證明結論正確

那麼首先我們查看R4BGP


R4#show ip bgp

BGP table version is 6, local router ID is4.4.4.4

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

            r RIB-failure, S Stale

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


 Network          Next Hop            Metric LocPrf Weight Path

*>i2.2.2.0/24       24.2.2.2                 0    100     0 i

*>i3.3.3.0/24       34.3.3.3                 0    100     0 i

*> 4.4.4.0/24       0.0.0.0                  0         32768 i

*>5.5.5.0/24       45.4.4.5                 0             0 65002 i

*> 6.6.6.0/24       46.4.4.6                 0             0 65003 i

R4#


//我們發現R4學習到了5.5.5.0的路由


再來查看R3bgp


R3#show ip bgp

BGP table version is 4, local router ID is3.3.3.3

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

            r RIB-failure, S Stale

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


 Network          Next Hop            Metric LocPrf Weight Path

*>i1.1.1.0/24       13.1.1.1                 0    100     0 i

*> 3.3.3.0/24       0.0.0.0                  0         32768 i

*>i4.4.4.0/24       34.3.3.4                 0    100     0 i

*i5.5.5.0/24       45.4.4.5                 0    100     0 65002 i

* i6.6.6.0/24       46.4.4.6                 0    100     0 65003 i

R3#


//我們發現R3也學習到了5.5.5.0/24,說明R4會傳遞R55.5.5.0/24網段



4.從EBGP對等體學來的路由條目會傳遞給其他EBGP對等體。


我們可以在R5和R6上測試,觀察R4從eBGP對等體R6學習到的6.6.6.0/24是否會傳遞給eBGP對等體R5


首先,我們查看R4的bgp表


R4#show ip bgp

BGP table version is 6, local router ID is 4.4.4.4

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

             rRIB-failure, S Stale

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


  Network          Next Hop            Metric LocPrf Weight Path

*>i2.2.2.0/24      24.2.2.2                 0    100     0 i

*>i3.3.3.0/24      34.3.3.3                 0    100     0 i

*> 4.4.4.0/24      0.0.0.0                  0         32768 i

*> 5.5.5.0/24      45.4.4.5                 0             0 65002 i

*> 6.6.6.0/24       46.4.4.6                 0             0 65003 i

R4#


//我們發現R4學習到了R6的6.6.6.0/24


再來查看R5的bgp表



R5#showip bgp

BGPtable version is 6, local router ID is 5.5.5.5

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

             r RIB-failure, S Stale

Origincodes: i - IGP, e - EGP, ? - incomplete


  Network          Next Hop            Metric LocPrf Weight Path

*>2.2.2.0/24       45.4.4.4                               0 65001 i

*>3.3.3.0/24       45.4.4.4                               0 65001 i

*>4.4.4.0/24       45.4.4.4                 0             0 65001 i

*>5.5.5.0/24       0.0.0.0                  0         32768 i

*> 6.6.6.0/24       45.4.4.4                               0 65001 65003 i


//此時R5也同樣學習到R66.6.6.0/24網絡,證明結論沒有問題



5.從IBGP對等體學來的路由條目再傳送給EBGP對等體,下一跳會改成自己的出口。


我們測試R22.2.2.0/24網段在傳遞給iBGP對等體R4後,由R4在傳遞給直連的eBGP對等體,下一跳是否修改?


首先,我們查看R4BGP


R4#showip bgp

BGPtable version is 6, local router ID is 4.4.4.4

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

             r RIB-failure, S Stale

Origincodes: i - IGP, e - EGP, ? - incomplete


  Network          Next Hop            Metric LocPrf Weight Path

*>i2.2.2.0/24       24.2.2.2                0    100      0 i

*>i3.3.3.0/24       34.3.3.3                 0    100     0 i

*>4.4.4.0/24       0.0.0.0                  0         32768 i

*>5.5.5.0/24       45.4.4.5                 0             0 65002 i

*>6.6.6.0/24       46.4.4.6                 0             0 65003 i


//我們發現此時R4iBGP對等體R2學習到的2.2.2.0/24網段的下一跳爲R2的出口IP地址24.2.2.2


再來查看R5BGP


R5#showip bgp

BGPtable version is 6, local router ID is 5.5.5.5

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

             r RIB-failure, S Stale

Origincodes: i - IGP, e - EGP, ? - incomplete


  Network          Next Hop            Metric LocPrf Weight Path

*> 2.2.2.0/24       45.4.4.4                               0 65001 i

*>3.3.3.0/24       45.4.4.4                               0 65001 i

*>4.4.4.0/24       45.4.4.4                 0             0 65001 i

*>5.5.5.0/24       0.0.0.0                  0         32768 i

*>6.6.6.0/24       45.4.4.4                               0 65001 65003 i

R5#


//我們發現R5學習到的2.2.2.0/24的下一跳已經更改爲R4 的出口45.4.4.4



6.從EBGP對等體學來的路由條目再傳送給IBGP對等體,下一跳不會更改爲自己的出口。


這裏測試R4從eBGP對等體R5學習到的5.5.5.0/24在傳遞給iBGP對等體R2,下一跳是否更改


首先,我們查看R4的BGP表

R4#show ip bgp

BGP table version is 6, localrouter ID is 4.4.4.4

Status codes: s suppressed, ddamped, 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

*>i2.2.2.0/24       24.2.2.2                 0    100     0 i

*>i3.3.3.0/24       34.3.3.3                 0    100     0 i

*> 4.4.4.0/24       0.0.0.0                  0         32768 i

*> 5.5.5.0/24       45.4.4.5                 0             0 65002 i

*> 6.6.6.0/24       46.4.4.6                 0             0 65003 i

R4#


//我們發現R4學習到的5.5.5.0/24網段的下一跳IP地址是45.4.4.5


我們再來查看R2的BGP表


R2#show ip bgp

BGP table version is 4, localrouter ID is 2.2.2.2

Status codes: s suppressed, ddamped, 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

*>i1.1.1.0/24       12.1.1.1                 0    100     0 i

*> 2.2.2.0/24       0.0.0.0                  0         32768 i

*>i4.4.4.0/24       24.2.2.4                 0    100     0 i

* i5.5.5.0/24       45.4.4.5                 0    100     0 65002 i

* i6.6.6.0/24       46.4.4.6                 0    100     0 65003 i

R2#


//我們得出R2學習到的5.5.5.0/24網段,下一跳IP地址依然是爲45.4.4.5,沒有改變。

並且在R2的BGP中沒有出現大於號(即最後路徑的標記),那麼R2是不會將它裝入路由表的,我們查看R2的路由表

R2#show ip route bgp

    1.0.0.0/24 is subnetted, 1 subnets

B       1.1.1.0 [200/0] via 12.1.1.1, 00:20:10

    4.0.0.0/24 is subnetted, 1 subnets

B       4.4.4.0 [200/0] via 24.2.2.4, 00:18:18

R2#


//我們發現R2並沒有將5.5.5.0/24網段裝入路由表,原因是由於在R2的BGP中對應的下一跳地址45.4.4.5所在的網段45.4.4.0/24網段,對於R2 而言不可達造成。我們再來查看R2的IGP路由表:

R2#show ip route

Codes: C - connected, S -static, R - RIP, M - mobile, B - BGP

      D - EIGRP, EX - EIGRP external, O -OSPF, IA - OSPF inter area

      N1 - OSPF NSSA external type 1, N2 -OSPF NSSA external type 2

      E1 - OSPF external type 1, E2 - OSPFexternal type 2

      i - IS-IS, su - IS-IS summary, L1 -IS-IS level-1, L2 - IS-IS level-2

      ia - IS-IS inter area, * - candidatedefault, U - per-user static route

      o - ODR, P - periodic downloaded staticroute


Gateway of last resort is notset


    34.0.0.0/24 is subnetted, 1 subnets

O       34.3.3.0 [110/128] via 24.2.2.4, 00:19:55,Serial1/0

    1.0.0.0/24 is subnetted, 1 subnets

B       1.1.1.0 [200/0] via 12.1.1.1, 00:20:02

    2.0.0.0/24 is subnetted, 1 subnets

C       2.2.2.0 is directly connected, Loopback0

    4.0.0.0/24 is subnetted, 1 subnets

B       4.4.4.0 [200/0] via 24.2.2.4, 00:18:10

    20.0.0.0/24 is subnetted, 1 subnets

C       20.20.20.0 is directly connected,Loopback10

    24.0.0.0/24 is subnetted, 1 subnets

C       24.2.2.0 is directly connected,Serial1/0

    40.0.0.0/24 is subnetted, 1 subnets

O       40.40.40.0 [110/65] via 24.2.2.4, 00:19:55,Serial1/0

    10.0.0.0/24 is subnetted, 1 subnets

O       10.10.10.0 [110/65] via 12.1.1.1,00:19:55, Serial1/1

    12.0.0.0/24 is subnetted, 1 subnets

C       12.1.1.0 is directly connected,Serial1/1

    13.0.0.0/24 is subnetted, 1 subnets

O       13.1.1.0 [110/128] via 12.1.1.1,00:19:55, Serial1/1

    30.0.0.0/24 is subnetted, 1 subnets

O       30.30.30.0 [110/129] via 12.1.1.1,00:19:55, Serial1/1

                  [110/129] via 24.2.2.4,00:19:55, Serial1/0

R2#


//我們發現R2確實沒有對應的45.4.4.0/24網段的路由在IGP路由表中。


補充:如果想讓R2將學習到的5.5.5.0/24,裝入對應的路由表中,我們必須滿足下一跳可達,這裏可以用靜態路由、重發布IGP、next-hop-self等完成可達。



7.從EBGP對等體學來的路由條目,再傳送給EBGP路由器,下一跳更改爲自己的出口。


這裏我們測試R5從eBGP對等體R4學習到R6的6.6.6.0/24網段,下一跳是否會更改

首先,我們查看R4 的BGP表

R4#show ip bgp

BGP table version is 6, localrouter ID is 4.4.4.4

Status codes: s suppressed, ddamped, 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

*>i2.2.2.0/24       24.2.2.2                 0    100     0 i

*>i3.3.3.0/24       34.3.3.3                 0    100     0 i

*> 4.4.4.0/24       0.0.0.0                  0         32768 i

*> 5.5.5.0/24       45.4.4.5                 0             0 65002 i

*> 6.6.6.0/24       46.4.4.6                0             0 65003 i

R4#


//我們得出R4學習到R6的6.6.6.0/24網段,下一跳爲R6的出口IP地址46.4.4.6


然後我們查看R5的BGP表

R5#show ip bgp

BGP table version is 6, localrouter ID is 5.5.5.5

Status codes: s suppressed, ddamped, 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

*> 2.2.2.0/24       45.4.4.4                               0 65001 i

*> 3.3.3.0/24       45.4.4.4                               0 65001 i

*> 4.4.4.0/24       45.4.4.4                 0             0 65001 i

*> 5.5.5.0/24       0.0.0.0                  0         32768 i

*> 6.6.6.0/24       45.4.4.4                              0 65001 65003 i

R5#


//我們發現R5學習到的6.6.6.0/24網段,下一跳變更爲R4 的出口IP地址45.4.4.4


補充:此時我們發現整個網絡沒有收斂,這是由於BGP路由傳遞原則造成,這裏可以採用Full-Mesh、RR等解決方案來完成收斂。





發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章