BGP联邦
它将一个自治系统划分为若干个子AS,每个子AS系统内部的IBGP同伴全连接,并同联盟中其他的子AS建立连接。联盟能很容易的检测到自治系统内部的路由环路。子AS之间及联盟本身与外部AS之间使用的是EBGP.下一跳,MED和LP等重要的信息在穿越子AS的时候都不会丢失。
由于AP_PATH属性被用于成员AS之间,所以可以预防环路。
将update消息发送给联盟之外的对等体时,将删除AS_CONFED_SEQUENCE和AS_CONFEN_SET属性(语法和AS_PATH相同),使用联盟ID附加在AS_PATH中,外部看的是一个AS(联盟ID)。
典型的联盟拓扑如下:
实验拓扑:
配置:
-------------------R1------------------
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 12.1.1.1 255.255.255.0
duplex auto
speed auto
!
router bgp 100
no synchronization
bgp router-id 1.1.1.1
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.0
neighbor 12.1.1.2 remote-as 200
no auto-summary
-------------------R2-----------------
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 12.1.1.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 23.1.1.2 255.255.255.0
duplex auto
speed auto
!
router ospf 100
router-id 2.2.2.2
log-adjacency-changes
network 2.2.2.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
!
router bgp 65001
no synchronization
bgp router-id 2.2.2.2
bgp log-neighbor-changes
bgp confederation identifier 200
neighbor 3.3.3.3 remote-as 65001
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 next-hop-self
neighbor 12.1.1.1 remote-as 100
no auto-summary
---------------------R3-----------------------
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 34.1.1.3 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 23.1.1.3 255.255.255.0
duplex auto
speed auto
!
router ospf 100
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 0
network 23.1.1.0 0.0.0.255 area 0
network 34.1.1.0 0.0.0.255 area 0
!
router bgp 65001
no synchronization
bgp router-id 3.3.3.3
bgp log-neighbor-changes
bgp confederation identifier 200
bgp confederation peers 65002
neighbor 2.2.2.2 remote-as 65001
neighbor 2.2.2.2 update-source Loopback0
neighbor 4.4.4.4 remote-as 65002
neighbor 4.4.4.4 ebgp-multihop 255
neighbor 4.4.4.4 update-source Loopback0
no auto-summary
------------------R4----------------------
interface Loopback0
ip address 4.4.4.4 255.255.255.0
!
interface FastEthernet0/0
ip address 34.1.1.4 255.255.255.0
duplex auto
speed auto
!
router ospf 100
router-id 4.4.4.4
log-adjacency-changes
network 4.4.4.4 0.0.0.0 area 0
network 34.1.1.0 0.0.0.255 area 0
!
router bgp 65002
no synchronization
bgp router-id 4.4.4.4
bgp log-neighbor-changes
bgp confederation identifier 200
bgp confederation peers 65001
network 4.4.4.0 mask 255.255.255.0
neighbor 3.3.3.3 remote-as 65001
neighbor 3.3.3.3 ebgp-multihop 255
no auto-summary
分析:
从上面可看出外部AS只能看到联盟ID。
从上图可以看出成员自治系统号在出联盟ID是已经被删除。
转载于:https://blog.51cto.com/692344/1057441