一,BGP联盟产生的原因。

1,BGP联盟产生是为了解决自治系统AS网络太过于庞大,好分散开来,分成多个小的AS,便于管理者管理。

2,BGP联盟也可以解决路由黑洞,避免IBGP全互联,减轻路由器的负载。主要不是为了解决这个问题。RR才是主要解决路由黑洞而产生的。

二,如何配置和一些注意事项。

bgp联盟 ibgp下一跳不改变 原因_网关


实现:AS1234分为两个小的AS124和123。实现外部AS100宣告的网段1.1.1.0/24和AS1111宣告的网段2.2.2.2/24互通。

备注:接口IP的命名规则:举例 R1和R2的路由器之间对应的G0/0/0端口 R1:12.1.1.1 R2:12.1.1.2.其他的类推。在配置里面进行相关说明。

配置:

[R1]dis current-configuration configuration bgp

bgp 100
router-id 1.1.1.1
peer 12.1.1.2 as-number 1234(外部AS还是指向大的AS)

ipv4-family unicast
undo synchronization
import-route static
peer 12.1.1.2 enable

[R2]dis current-configuration configuration bgp
bgp 124(要已小的联盟AS号起BGP)
router-id 2.2.2.2
confederation id 1234(表明自己对外的大AS号)
confederation peer-as 125(表明自己小的联盟AS号)
peer 12.1.1.1 as-number 100
peer 23.1.1.3 as-number 124

ipv4-family unicast
undo synchronization
peer 12.1.1.1 enable
peer 23.1.1.3 enable
peer 23.1.1.3 next-hop-local

[R3]dis current-configuration configuration bgp

bgp 124(要已小的联盟AS号起BGP)**
router-id 3.3.3.3
confederation id 1234(表明自己对外的大AS号)
confederation peer-as 123 (表明自己小的联盟AS号)
peer 23.1.1.2 as-number 124
peer 35.1.1.5 as-number 123

ipv4-family unicast
undo synchronization
peer 23.1.1.2 enable
peer 35.1.1.5 enable

[R5]dis current-configuration configuration bgp

bgp 123(要已小的联盟AS号起BGP)
confederation id 1234(表明自己对外的大AS号)
confederation peer-as 124 (表明自己小的联盟AS号)
peer 35.1.1.3 as-number 124
peer 57.1.1.7 as-number 1111

ipv4-family unicast
undo synchronization
peer 35.1.1.3 enable
peer 35.1.1.3 next-hop-local(EBGP路由在联盟内部传递时,默认不会改变下一跳)
peer 57.1.1.7 enable

[R7]dis current-configuration configuration bgp

bgp 1111
router-id 7.7.7.7
peer 57.1.1.5 as-number 1234

ipv4-family unicast
undo synchronization
network 2.2.2.0 255.255.255.0
peer 57.1.1.5 enable

Ping 截图

bgp联盟 ibgp下一跳不改变 原因_网关_02


备注学习:

1,BGP路由只能宣告IP路由表里面的路由条目,让其变为BGP路由传递给BGP邻居。无效的IP路由不会传递。
2,BGP内部需要用IGP路由协议打通。
3,联邦小的AS需要手动表明自己所属大的AS(confederation id ).联邦内部建立EBGP关系,需要制定联邦内部peer(confederation peer-as)。
4,外部EBGP路由在联邦内部的EBGP邻居关系中传递时也不会改变下一跳,需要手动指定下一跳(next-hop-local)。
5,重点:为什么要制定所属AS,为什么建立联邦内部EBGP邻居关系时,需要指定联邦内部BGP peer ?
是因为联邦内部的AS与AS建立邻居关系时,默认的OPEN报文都是带的大的AS号。

强调:联盟产生的目的是为了将自治系统分散开来,便于管理者管理。主要目的不是为了解决BGP路由黑洞的问题,虽然也可以解决。 RR是主要解决路由黑洞的问题。