邊界網關協定(BGP)是用於實現Internet連線冗餘的關鍵協定之一。將您的網路連線到兩個不同的Internet服務提供商(ISP)時,它稱為多宿主。多宿主提供冗餘和網路最佳化。它會選擇提供到達資源的最佳路徑的ISP。當您使用多個服務提供商運行BGP時,您的自治系統(AS)可能會成為傳輸AS。這會導致Internet流量通過您的AS,並可能佔用路由器CPU上的所有頻寬和資源。本文解決該問題並提供相應的配置示例。
繼續進行之前,請參閱以下檔案:
本文中的資訊係根據以下軟體和硬體版本:
採用Cisco IOS®軟體版本12.4(13r)T的Cisco 2800系列路由器
採用Cisco IOS軟體版本12.4(13r)T的Cisco 3800系列路由器
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
本節提供用於設定本文件中所述功能的資訊。
註:使用Command Lookup Tool(僅限註冊客戶)查詢有關本文檔中使用的命令的更多資訊。
本檔案會使用以下網路設定:
在此網路中,路由器A連線到兩個不同的服務提供商SP-A和SP-B,形成多宿主,其中AS 101將1010:1010::/64和2020:2020::/64通告給外部,並且從兩個不同的AS、AS 202和AS 303接收網路12:1212::/64。
註:此處是影片連結(在Cisco支援社群 上提供),其中概述了BGP多宿主,並提供了如何解決常見BGP問題(如對等和高CPU)的建議。
本檔案會使用以下設定:
路由器A |
---|
Router-A# ipv6 unicast-routing !---Enables the forwarding of IPv6 packets. ipv6 cef interface Serial3/0 description CONNECTED TO SP-A ip address 192.168.10.1 255.255.255.0 ipv6 address 1202:ABCD::/64 eui-64 ipv6 enable no fair-queue clock rate 64000 ! interface Serial3/1 description CONNECTED TO SP-B no ip address ipv6 address 2303:ABCD::/64 eui-64 clock rate 64000 ! router bgp 101 bgp router-id 1.1.1.1 no bgp default ipv4-unicast bgp log-neighbor-changes neighbor 1202:ABCD::21B:54FF:FEA9:24B0 remote-as 202 !--- Configures SP-A as neighbor. neighbor 1202:ABCD::21B:54FF:FEA9:24B0 ebgp-multihop 2 neighbor 2303:ABCD::21B:54FF:FE54:FB10 remote-as 303 !--- Configures SP-B as neighbor. ! address-family ipv6 neighbor 1202:ABCD::21B:54FF:FEA9:24B0 activate neighbor 2303:ABCD::21B:54FF:FE54:FB10 activate network 1010:1010::/64 network 2020:2020::/64 exit-address-family ! |
服務提供商A |
---|
SP-A# ipv6 unicast-routing ipv6 cef interface Serial1/0 no ip address ipv6 address 1202:ABCD::/64 eui-64 ipv6 enable no fair-queue ! router bgp 202 bgp router-id 2.2.2.2 no bgp default ipv4-unicast bgp log-neighbor-changes neighbor 1202:ABCD::21C:58FF:FEED:3E90 remote-as 101 !--- Configuers Router A as neighbor. ! address-family ipv6 neighbor 1202:ABCD::21C:58FF:FEED:3E90 activate network 1212:1212::/64 exit-address-family ! |
服務提供商B |
---|
SP-B# ipv6 unicast-routing ipv6 cef interface Serial1/0 no ip address ipv6 address 2303:ABCD::/64 eui-64 no fair-queue ! router bgp 303 no synchronization bgp router-id 3.3.3.3 bgp log-neighbor-changes neighbor 2303:ABCD::21C:58FF:FEED:3E90 remote-as 101 !--- Configures as Router A as neighbor. neighbor 2303:ABCD::21C:58FF:FEED:3E90 ebgp-multihop 5 no auto-summary ! address-family ipv6 neighbor 2303:ABCD::21C:58FF:FEED:3E90 activate network 1212:1212::/64 exit-address-family ! |
使用本節內容,確認您的組態是否正常運作。
輸出直譯器工具(僅供已註冊客戶使用)(OIT)支援某些show命令。使用OIT檢視show命令輸出的分析。
路由器A與兩個ISP對等連線
Router-A# show bgp ipv6 unicast summary BGP router identifier 1.1.1.1, local AS number 101 BGP table version is 6, main routing table version 6 3 network entries using 447 bytes of memory 4 path entries using 304 bytes of memory 4/2 BGP path/bestpath attribute entries using 496 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 1295 total bytes of memory BGP activity 3/0 prefixes, 14/10 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 1202:ABCD::21B:54FF:FEA9:24B0 4 202 108 119 6 0 0 00:31:41 1 2303:ABCD::21B:54FF:FE54:FB10 4 303 108 121 6 0 0 00:25:1 1 !--- Indicates that Router A is peering with both the ISP SP-A and SP-B
路由器A從SP-A和SP-B獲知的路由
Router-A#show bgp ipv6 unicast BGP table version is 6, local router ID is 1.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 *> 1010:1010::/64 :: 0 32768 i * 1212:1212::/64 2303:ABCD::21B:54FF:FE54:FB10 0 0 303 i *> 1202:ABCD::21B:54FF:FEA9:24B0 0 0 202 i *> 2020:2020::/64 :: 0 32768 i
在SP-A上:
SP-A#sh bgp ipv6 unicast BGP table version is 4, local router ID is 2.2.2.2 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 *> 1010:1010::/64 1202:ABCD::21C:58FF:FEED:3E90 0 0 101 i *> 1212:1212::/64 :: 0 32768 i *> 2020:2020::/64 1202:ABCD::21C:58FF:FEED:3E90 0 0 101 i
在SP-B上:
SP-B#sh bgp ipv6 unicast BGP table version is 4, local router ID is 3.3.3.3 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 *> 1010:1010::/64 2303:ABCD::21C:58FF:FEED:3E90 0 0 101 i * 1212:1212::/64 2303:ABCD::21C:58FF:FEED:3E90 0 101 202 i *> :: 0 32768 i *> 2020:2020::/64 2303:ABCD::21C:58FF:FEED:3E90 0 0 101 i
使用debug bgp ipv6 update 命令可顯示更新的調試資訊,以幫助確定對等狀態。
修訂 | 發佈日期 | 意見 |
---|---|---|
1.0 |
25-Jan-2012 |
初始版本 |