BGP can use multiple protocols like IPv4 Unicast, IPv4 Multicast, IPv6 Unicast, IPv6 Multicast, etc..… This means you need to have a way to tell BGP which protocol you want to use, and that’s where the address-family comes in. You’ll also use address-family for VRFs. This has been discussed for a long time, but I like to keep my configs clean and straightforward. I try to do things to make things easier for my co-workers. I sometimes feel people make things complicated for no reason. I’m sure we have all seen it. Or their reason is they think if they make it difficult, only they know it? Who knows, but that’s not how I roll :). I don’t want unnecessary configurations if I don’t need them. I also want to prevent human mistakes when I can help avoid them.
Let’s look at both options which do the same thing.
BGP is a multiprotocol protocol that may transport several address families thanks to the new NLRI. Almost two-dozen distinct NLRIs are now conveyed through BGP. For the new address families, new AFI and SAFI have been defined. As part of BGP’s Multiprotocol capabilities, the address family identification is communicated across BGP peers via the BGP OPEN message. During the BGP UPDATE message with the NLRI, it is used to define the network layer protocol associated with the network addresses that follow it.
First, I want to say that it only makes sense to use address-family if you’re going to use multiple protocols or VRFs. If you’re not going to use multiple protocols or VRFs, it doesn’t make sense. I want to make sure I can hand off configurations to engineers who might not know as much about BGP. I want them to either see it and say I got it or be able to learn it as quickly as possible with the least amount of explanation. Some things I can see happening are that they forget to activate the neighbor, or they are trying to put the “next-hop-self” in the wrong area, or they are trying to put the route map in the wrong area, and then comes the “it doesn’t work” :). I want to avoid this whenever I can. Avoid complexity whenever possible.
I’m all about KISS and this is not keeping it simple if you don’t need to use it. That’s my opinion 🙂 .
What I can see is using are BGP Peer Groups to help cleanup the BGP configuration. I like to use Peer Groups and think they’re great. I recommend them. We may utilize Peer Groups to simplify BGP configuration and minimize the amount of updates BGP needs to produce. We can create a Peer Group with our neighbors and then apply all of our configurations. BGP will prepare updates for the Peer Group, which uses fewer CPU resources than individually processing updates for each neighbor.
Using peer-groups, we can see with three BGP Peers and the ISP, we are still less lines than the Address-Family configuration.
Some quick notes about the Address-Family config:
1. The moment you enter “address-family ipv4“, the whole config will convert to the new format. This is only one way and you can’t revert back. If you do a “no address-family ipv4“, you’ll have to redo your BGP config.