Implementing MP-BGP in a SP IPv6 and IPv4 network
The multiprotocol BGP (MBGP) feature adds capabilities to BGP to enable multicast routing policy throughout the Internet and to connect multicast topologies within and between BGP autonomous systems. In other words, multiprotocol BGP (MBGP) is an enhanced BGP that carries IP multicast routes. BGP carries two sets of routes, one set for unicast routing and one set for multicast routing. The routes associated with multicast routing are used by the Protocol Independent Multicast (PIM) to build data distribution trees.
The only three pieces of information carried by BGP-4 that are IPv4 specific are (a) the NEXT_HOP attribute (expressed as an IPv4 address), (b) AGGREGATOR (contains an IPv4 address), and (c) NLRI(expressed as IPv4 address prefixes). Any BGP speaker, including MBGP speakers, has to have an IPv4 address, which will be used, among other things, in the AGGREGATOR attribute. To enable BGP-4 to support routing for multiple Network Layer protocols the only two things that have to be added to BGP-4 are (a) the ability to associate a particular Network Layer protocol with the next hop information, and (b) the ability to associated a particular Network Layer protocol with NLRI.
MP-BGP is an extension to the BGP protocol that has an objective to carry routing information about:
- other protocols
- Multicast
- MPLS VPN
- IPv6
- 6PE
- CLNS
Exchange of Multi-Protocol NLRI must be negotiated at session set up.
For some practical presentation of the MP-BGP protocol I have created a small ISP lab with couple of UPSTREAM providers that will use the IPv6 and IPv4 prefix routing at the same time. This is a common practice nowadays in the ISP enviroment.
We have a small ISP with two routers the are iBGP speakers and couple of eBGP peers with upstream connections. For those that are familiar with the IPV6 setup and address space this will come easy. I am using /127 networks for the WAN links to simulate only two IP address space in the peer connection. On the same physical link I am using also the IPv4 address to peer with the BGP speaking router. Now let us look at the configs, I will try to clarify every command. For more on MP-BGP protocol , one can read a RFC on that subject - RFC2858.
ISP1
ipv6 unicast-routing >> important to turn on because by default IPV6 routing is disabled
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Loopback1
no ip address
ipv6 address 2030:1::1/64 >> I have defined a couple of /64 networks to propagate to AS100
ipv6 address 2030:2::1/64
ipv6 address 2030:3::1/64
ipv6 enable
!
interface FastEthernet0/0 >> dual IP stack IPv4 and IPv6 address on the WAN link
ip address 10.0.0.2 255.255.255.252
duplex auto
speed auto
ipv6 address 2005:1::/127 << /127 networks allows only two IPv6 hosts
ipv6 enable << on some routers this is enabled after entering the IP address
!
router bgp 100
bgp router-id 1.1.1.1
no bgp default ipv4-unicast << I have disabled the default behaviour of BGP , as we are using
bgp log-neighbor-changes address family concept >>
neighbor 10.0.0.1 remote-as 100
neighbor 2005:1::1 remote-as 100
!
address-family ipv4 << the address family model for IPV4
neighbor 10.0.0.1 activate
no auto-summary
no synchronization
exit-address-family
!
address-family ipv6
neighbor 2005:1::1 activate
network 2030:1::1/64 << advertising loopback 1 subnets into BGP
network 2030:2::1/64
network 2030:3::1/64
exit-address-family
The Cisco BGP address family identifier (AFI) model was introduced with multiprotocol BGP and is designed to be modular and scalable, and to support multiple AFI and subsequent address family identifier (SAFI) configurations.
As we can see I have defined two address families IPv4 and IPv6 for the BGP peerings. We must use the activate command on every neighbor for the family, or the peer group to make it easier to manage. We must add the peer address and the AS number under the global BGP process, and further activate the neighbor under the family model.
Now let us look at the rest of the router config, they are pretty much the same.
ISP2
ipv6 unicast-routing
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Loopback1
no ip address
ipv6 address 2010:1::1/64
ipv6 address 2010:2::1/64
ipv6 address 2010:3::1/64
ipv6 enable
!
interface Loopback2
ip address 22.22.22.1 255.255.255.0 secondary
ip address 22.22.24.1 255.255.255.0
!
interface FastEthernet0/0
ip address 10.0.0.1 255.255.255.252
duplex auto
speed auto
ipv6 address 2005:1::1/127
ipv6 enable
!
interface FastEthernet1/0
ip address 172.16.1.1 255.255.255.252
duplex auto
speed auto
ipv6 address 2001:1::/127
ipv6 enable
!
interface FastEthernet2/0
ip address 173.16.1.1 255.255.255.252
duplex auto
speed auto
ipv6 address 2002:1::/127
ipv6 enable
!
router bgp 100
bgp router-id 2.2.2.2
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 10.0.0.2 remote-as 100
neighbor 2001:1::1 remote-as 200
neighbor 2002:1::1 remote-as 300
neighbor 2005:1:: remote-as 100
neighbor 172.16.1.2 remote-as 200
neighbor 173.16.1.2 remote-as 300
!
address-family ipv4
neighbor 10.0.0.2 activate
neighbor 172.16.1.2 activate
neighbor 173.16.1.2 activate
no auto-summary
no synchronization
network 22.22.22.0 mask 255.255.255.0
network 22.22.24.0 mask 255.255.255.0
exit-address-family
!
address-family ipv6
neighbor 2001:1::1 activate
neighbor 2002:1::1 activate
neighbor 2005:1:: activate
neighbor 2005:1:: next-hop-self
network 2010:1::1/64
network 2010:2::1/64
network 2010:3::1/64
exit-address-family
UPSTREAM1
ipv6 unicast-routing
!
interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface Loopback1
no ip address
ipv6 address 2006:1::1/64
ipv6 address 2006:2::1/64
ipv6 address 2006:3::1/64
ipv6 address 2006:4::1/64
!
interface Loopback2
ip address 55.55.56.1 255.255.255.0 secondary
ip address 55.55.55.1 255.255.255.0
!
interface FastEthernet0/0
ip address 172.16.1.2 255.255.255.252
duplex auto
speed auto
ipv6 address 2001:1::1/127
ipv6 enable
!
router bgp 200
bgp router-id 5.5.5.5
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 2001:1:: remote-as 100
neighbor 172.16.1.1 remote-as 100
!
address-family ipv4
neighbor 172.16.1.1 activate
no auto-summary
no synchronization
network 55.55.55.0 mask 255.255.255.0
network 55.55.56.0 mask 255.255.255.0
exit-address-family
!
address-family ipv6
neighbor 2001:1:: activate
network 2006:1::1/64
network 2006:2::1/64
network 2006:3::1/64
network 2006:4::1/64
exit-address-family
UPSTREAM2
ipv6 unicast-routing
!
interface Loopback0
ip address 6.6.6.6 255.255.255.255
!
interface Loopback1
no ip address
ipv6 address 2020:1::1/64
ipv6 address 2020:2::1/64
ipv6 address 2020:3::1/64
ipv6 address 2020:4::1/64
ipv6 enable
!
interface Loopback2
ip address 66.66.67.1 255.255.255.0
!
interface FastEthernet0/0
ip address 173.16.1.2 255.255.255.252
duplex auto
speed auto
ipv6 address 2002:1::1/127
ipv6 enable
!
router bgp 300
bgp router-id 6.6.6.6
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 2002:1:: remote-as 100
neighbor 173.16.1.1 remote-as 100
!
address-family ipv4
neighbor 173.16.1.1 activate
no auto-summary
no synchronization
network 66.66.66.0 mask 255.255.255.0
network 66.66.67.0 mask 255.255.255.0
exit-address-family
!
address-family ipv6
neighbor 2002:1:: activate
network 2020:1::1/64
network 2020:2::1/64
network 2020:3::1/64
network 2020:4::1/64
exit-address-family
To see the BGP table we must use some different syntax on the IPV6 address family. First let us look at the BGP table on the ISP2 router, that interconnects every other router in our small topology.
ISP2#sh ip bgp
BGP table version is 6, 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
*> 22.22.22.0/24 0.0.0.0 0 32768 i
*> 22.22.24.0/24 0.0.0.0 0 32768 i
*> 55.55.55.0/24 172.16.1.2 0 0 200 i
*> 55.55.56.0/24 172.16.1.2 0 0 200 i
*> 66.66.67.0/24 173.16.1.2 0 0 300 i
The BGP table looks simple and clean. We have routes from internal and external neighbors in our table correctly installed. We can test the IPV4 data plane with a simple ping. And verify that it is working fine.
ISP2#ping 66.66.67.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 66.66.67.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/24/40 ms
Now, let us look a the IPV6 BGP table and the IPV6 family neighbors. Cisco introduces a new command to verify the IPV6 neighbor connectivity and the BGP table.
ISP2#sh ip bgp ipv6 unicast summary
BGP router identifier 2.2.2.2, local AS number 100
BGP table version is 15, main routing table version 15
14 network entries using 2086 bytes of memory
14 path entries using 1064 bytes of memory
5/4 BGP path/bestpath attribute entries using 620 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 3818 total bytes of memory
BGP activity 23/4 prefixes, 23/4 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2001:1::1 4 200 64 67 15 0 0 00:59:34 4
2002:1::1 4 300 47 51 15 0 0 00:42:28 4
2005:1:: 4 100 297 297 15 0 0 04:51:16 3
We can see that we have three IPV6 BGP neighbors, two external and one internal BGP speaking router. The prefixes are exhanged between them. Now , let us see the IPV6 BGP routing table.
ISP2#sh ip bgp ipv6 unicast
BGP table version is 15, 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
*> 2006:1::/64 2001:1::1 0 0 200 i
*> 2006:2::/64 2001:1::1 0 0 200 i
*> 2006:3::/64 2001:1::1 0 0 200 i
*> 2006:4::/64 2001:1::1 0 0 200 i
*> 2010:1::1/64 :: 0 32768 i
*> 2010:2::1/64 :: 0 32768 i
*> 2010:3::1/64 :: 0 32768 i
*> 2020:1::/64 2002:1::1 0 0 300 i
*> 2020:2::/64 2002:1::1 0 0 300 i
*> 2020:3::/64 2002:1::1 0 0 300 i
*> 2020:4::/64 2002:1::1 0 0 300 i
*>i2030:1::/64 2005:1:: 0 100 0 i
*>i2030:2::/64 2005:1:: 0 100 0 i
*>i2030:3::/64 2005:1:: 0 100 0 i
We can see all the prefixes from the advertised IPV6 loopbacks that are insalled in the global IPV6 routing table. We can do a simple ping to verify connectivity. I can verify that it is working ok.
ISP2#ping ipv6 2020:1::1 source loopback 1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2020:1::1, timeout is 2 seconds:
Packet sent with a source address of 2010:1::1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/20/28 ms
There is much more to talk about the MP-BGP protocol, and more blogs to come on L3 MPLS VPN, where we will exchange the VPNV4 and VPNV6 routes. On detailed implementation one can always use the Cisco site on MP-BGP for IPV6.
Feel free to comment.
No comments:
Post a Comment