MP-BGP支持多种协议服务,IPv6自然是可以支持的。配置IPv6的BGP关闭bgp default ipv4-unicast并在地址簇下激活邻居,同时必须配置bgp router-id才可以为IPv6建立邻居做准备。
实验拓扑图如下:
全互联是最容易实现的,如果邻居数量不多也非常适合,绝大多数的考试环境也都是全互联。但是为了简略配置本实验使用简化的配置,在R1和R3上指定R2为iBGP邻居,在R2上使用bgp动态监听并使用对等体组与R1和R2建立邻居,为了把R1和R3传递过来的路由信息/NLRI传递给彼此,在R2上开启路由反射器功能,为了使R3的iBGP边界能把外部的BGP路由传递给此iBGP内部,在R3上开启下一跳自我。
R1的基础配置如下:
hostname R1
!
ipv6 unicast-routing
!
interface Loopback0
ipv6 address 2000:1111::1/128
ipv6 eigrp 10
!
interface Ethernet0/0
no sh
ipv6 address 2025:DB8:0:12::1/64
ipv6 eigrp 10
!
ipv6 router eigrp 10
eigrp router-id 1.1.1.1
!
router bgp 123
bgp router-id 1.1.1.1
no bgp default ipv4-unicast
neighbor 2000:2222::2 remote-as 123
neighbor 2000:2222::2 update-source Loopback0
!
address-family ipv6
network 2000:1111::1/128
neighbor 2000:2222::2 activate
exit-address-family
!
end
R2的基础配置如下:
hostname R2
!
ipv6 unicast-routing
!
interface Loopback0
ipv6 address 2000:2222::2/128
ipv6 eigrp 10
!
interface Ethernet0/0
no sh
ipv6 address 2025:DB8:0:12::2/64
ipv6 eigrp 10
!
interface Ethernet0/1
no sh
ipv6 address 2025:DB8:1:23::2/64
ipv6 eigrp 10
!
ipv6 router eigrp 10
eigrp router-id 2.2.2.2
!
router bgp 123
bgp router-id 2.2.2.2
bgp listen range 2000::/16 peer-group IBGPV6
no bgp default ipv4-unicast
neighbor IBGPV6 peer-group
neighbor IBGPV6 remote-as 123
neighbor IBGPV6 update-source Loopback0
!
address-family ipv6
neighbor IBGPV6 activate
neighbor IBGPV6 route-reflector-client
exit-address-family
!
end
R3的基础配置如下:
hostname R3
!
ipv6 unicast-routing
!
interface Loopback0
ipv6 address 2000:3333::3/128
ipv6 eigrp 10
!
interface Ethernet0/0
no sh
ipv6 address 2025:DB8:1:23::3/64
ipv6 eigrp 10
!
interface Ethernet0/1
no sh
ipv6 address 2025:DB8:2:34::3/64
ipv6 eigrp 10
!
ipv6 router eigrp 10
eigrp router-id 3.3.3.3
!
router bgp 123
bgp router-id 3.3.3.3
no bgp default ipv4-unicast
neighbor 2000:2222::2 remote-as 123
neighbor 2000:2222::2 update-source Loopback0
neighbor 2025:DB8:2:34::4 remote-as 444
!
address-family ipv6
neighbor 2000:2222::2 activate
neighbor 2000:2222::2 next-hop-self
neighbor 2025:DB8:2:34::4 activate
exit-address-family
!
end
R4的基础配置如下:
hostname R4
!
ipv6 unicast-routing
!
interface Loopback0
ipv6 address 2000:4444::4/128
!
interface Ethernet0/0
no sh
ipv6 address 2025:DB8:2:34::4/64
!
route-map CONN permit 10
match interface Loopback0
!
router bgp 444
bgp router-id 4.4.4.4
no bgp default ipv4-unicast
neighbor 2025:DB8:2:34::3 remote-as 123
!
address-family ipv6
redistribute connected route-map CONN
neighbor 2025:DB8:2:34::3 activate
exit-address-family
!
end
查看R3的TCP连接摘要信息:(由于是通过反射器实现更新传递的,所以没有全互联)
IPv6建立TCP连接也是同样使用179号端口。
以上信息主要可以看到BGP路由器ID以及本地ASN,还会看到BGP表占用的内存大小。同时除了eBGP传过来的的直连邻居外,通过R2的反射器可以把R1发布的network也传递过来。
查看R3和R4的BGP表如下:
依次查看R1~R4的BGP路由表如下:
测试远端连通性如下:
BGP的IPv6地址簇也依然是使用相同的方法建立对等体连接交换update报文;Cisco的对等体若已经建立为established的状态则在BGP邻居表中的“State/PfxRcd”位置显示具体数字,如果没有NRLI信息也是标为0;其他状态,例如idle/active都是未建立邻居。
另外,如果iBGP的AS内部路由器过多也可以使用BGP联邦代替或BGP联邦+路由反射器实现全互联的配置方案。