BGP Address-family Configuration:
.
The technical name of BGP is MBGP (multiprotocol BGP) which means it was designed from ground up to advertise multiple L3 protocol to its neighbors (independent of IPv4 or IPv6)...though it was initially used for IPv4
BGP doesn’t consider the routes as a route, for BGP, all routes whether IPv4 or IPv6 are all NLRI. So, in the same BGP update, we could have NLRI for IPv4 routes, NLRI for IPv4 multicast and IPv6 routes
Multiprotocol because BGP can advertise reachability to many different ‘routes’:
- IPv4 unicast routes
- IPv4 multicast routes
- IPv6 unicast routes
- VPNv4 routes (used in MPLS VPNs)
By default, BGP only advertises IPv4 prefixes
Address-families are used to inform BGP that it needs to advertise other types of NLRI. In the Open message, BGP will tell that it supports the additional NLRI capabilities as well when address-families are configured
By default, when we type in the ‘network’ command in router BGP it will consider it under IPv4 address-family automatically. We couldn’t type in IPv6 network even if we wanted to.
Say we have two routers R1 and R2 and the link between them is only configured with IPv4, but, we have both IPv4 and IPv6 links behind us--> theoretically, we could send IPv6 routes over to the neighbor along with the IPv4 routes. But, it doesn’t make sense since I don’t know if you understand IPv6 at all in this link. So, an IPv4 network and an IPv6 network must be configured on the link the both routers share
- This point is because if we have to advertise IPv4 routes over the wire, we need to be able to speak IPv4 across the wire
- Similarly, if we need to exchange IPv6 routes over this wire, we need to be able to speak IPv6 across this wire
- So, we need to configure both IPv4 and IPv6 on the same link between the two routers
The main question to be answered (this is a design question, both are good):
Do you want two (2) BGP sessions-per-peer?
- One IPv4 session and another IPv6 session?
Or only a single BGP session per peer?
- Peering done via IPv4, and a single BGP update carries both IPv4 and Ipv6 prefixes, or….
- Peering done via IPv6, and a single BGP update carries both IPv4 and Ipv6 prefixes
Thus, we have 3 options:
- Two sessions- one for Ipv4, one for Ipv6
- One session- IPv6 over IPv4
- One session- IPv4 over IPv6
In the second methods above, we could have only one BGP session and save CPU/memory and that one session will have IPv4 section and IPv6 section...This is implemented via the number of neighbor statements we have under the router bgp
OPTION 1: One for IPv4, One for Ipv6: