天天看點

49、BGP配置實驗之聯邦

1、聯邦解析

<a href="http://s1.51cto.com/wyfs02/M02/77/BC/wKiom1ZtLuagsgevAAAxDZq9-k0391.png" target="_blank"></a>

聯邦工作原理:在AS内部手動劃分多個私有AS(聯邦中的私有AS好不增加AS-PATH的路徑長度)

配置步驟:

第一步:router bgp 小AS号(私有AS号)

第二步:聲明所在大AS号

第三步:小AS号之間互指peer

2、實驗拓撲

3、基礎配置

R1配置

interface Loopback0

 ip address 1.1.1.1 255.255.255.0

interface Serial0/0

 ip address 12.1.1.1 255.255.255.0

router bgp 1

 no synchronization

 bgp router-id 1.1.1.1

 network 1.1.1.0 mask 255.255.255.0

 neighbor 12.1.1.2 remote-as 2

 no auto-summary

R2配置

 ip address 2.2.2.2 255.255.255.0

 ip address 12.1.1.2 255.255.255.0

interface Serial0/1

 ip address 23.1.1.2 255.255.255.0

router ospf 110

 router-id 2.2.2.2

 network 2.2.2.0 0.0.0.255 area 0

 network 23.1.1.0 0.0.0.255 area 0

R3配置

 ip address 3.3.3.3 255.255.255.0

 ip address 34.1.1.3 255.255.255.0

 ip address 23.1.1.3 255.255.255.0

 router-id 3.3.3.3

 network 3.3.3.0 0.0.0.255 area 0

 network 34.1.1.0 0.0.0.255 area 0

R4配置

 ip address 4.4.4.4 255.255.255.0

 ip address 34.1.1.4 255.255.255.0

 router-id 4.4.4.4

 network 4.4.4.0 0.0.0.255 area 0

4、配置鄰邦解決水準分割

router bgp 64512

 bgp router-id 2.2.2.2

 bgp confederation identifier 2

 neighbor 3.3.3.3 remote-as 64512

 neighbor 3.3.3.3 update-source Loopback0

 neighbor 3.3.3.3 next-hop-self

 neighbor 12.1.1.1 remote-as 1

 bgp router-id 3.3.3.3

 bgp confederation peers 64513 

 neighbor 2.2.2.2 remote-as 64512

 neighbor 2.2.2.2 update-source Loopback0

 neighbor 4.4.4.4 remote-as 64513

 neighbor 4.4.4.4 ebgp-multihop 255

 neighbor 4.4.4.4 update-source Loopback0

router bgp 64513

 bgp router-id 4.4.4.4

 bgp confederation peers 64512 

 neighbor 3.3.3.3 ebgp-multihop 255

      本文轉自開源殿堂 51CTO部落格,原文連結http://blog.51cto.com/kaiyuandiantang/1722529:,如需轉載請自行聯系原作者

繼續閱讀