MP-BGP and Address Families

BGP originally only supports normal IPv4 unicast prefixes. With the passage of time & advancement in Network Technology, the need for support of more prefix types arose. There were two solutions to this problem:

First, to invent a whole new protocol or a new version of BGP,
Second, to add the extra functionality in the existing BGP.

Of course, we chose the second one due to its flexibility & backward compatibility. Hence, MP-BGP came into existence under RFC4760 ( in 2007. MP-BGP supported more than 15 different BGP address families and it solved the problem.


Nowadays MP-BGP (Multiprotocol BGP) is a normal practice which supports different addresses including IPv4, IPv6 & so on. It is simply an extension to BGP that enables BGP to carry routing information for multiple network layers and address families.



These are simply the names or ID’s of the BGP Address Families.

AFI: Each Address Family in BGP is identified by the Address-Family Identifier (AFI). It carries the identity of the Network Layer protocol associated with the Network Address that follows. For example, these are the most common AFI’s:


AFI Meaning
1 IPv4
2 IPv6



sAFI: Within each AFI there is a Subsequent Address Family Identifier. It provides additional information about the type of the Network Layer Reachability Information carried in the attribute. For example, these are the most common sAFI’s:

SAFI Meaning
1 Unicast
2 Multicast
3 Unicast and multicast
4 MPLS Label
128 MPLS-labeled VPN


So, it means 1/1 will mean IPv4 & Unicast as in below examples:

BGP AFI/sAFI 1/1 = Address family IPv4 unicast
This is default AFI. For interoperability with the older version of BGP (which were not multiprotocol supported), just define the neighbors for IPv4 unicast enabling.
BGP AFI/sAFI 2/1 = Address family IPv6 unicast
This is the AFI/sAFI is for sharing information b/w IPv6 BGP Peers.


All these address families are exchanged between BGP neighbors over a single BGP session in parallel. BGP neighbors exchange their capability in the BGP open message. If BGP neighborship is setup only for IPv4 BGP address family and later on extra protocol such as L3 VPN address family is added, BGP session goes down. Thats why careful planning is needed with BGP.


List of AFI/sAFI:

Below is the full list of all AFI/sAFI’s for reference. Each Network Equipment vendor is free to choose which one it wants to be supported on which of its equipment Hardware & Software/IOS. e.g.

– Pre 12.2 Cisco IOS supports only four AFI’s (IPv4, IPv6, CLNS, VPNv4)

– Cisco IOS Release 12.2(33)SRB, and later releases, support for the L2VPN address family and VPLS sAFI

Below output shows all the AFI’s & sAFI’s supported by Cisco IOS 12.2 as an example:



Full list of AFI’s & sAFI’s as defined by IANA is as in below:


Full List of AFI’s
AFI  Description  Reference 
0 Reserved  
1 IP (IP version 4)  
2 IP6 (IP version 6)  
3 NSAP  
4 HDLC (8-bit multidrop)  
5 BBN 1822  
6 802 (includes all 802 media plus Ethernet “canonical format”)  
7 E.163  
8 E.164 (SMDS, Frame Relay, ATM)  
9 F.69 (Telex)  
10 X.121 (X.25, Frame Relay)  
11 IPX  
12 Appletalk  
13 Decnet IV  
14 Banyan Vines  
15 E.164 with NSAP format subaddress [ATM Forum UNI 3.1. October 1995.][Andy_Malis]
16 DNS (Domain Name System)  
17 Distinguished Name [Charles_Lynn]
18 AS Number [Charles_Lynn]
19 XTP over IP version 4 [Mike_Saul]
20 XTP over IP version 6 [Mike_Saul]
21 XTP native mode XTP [Mike_Saul]
22 Fibre Channel World-Wide Port Name [Mark_Bakke]
23 Fibre Channel World-Wide Node Name [Mark_Bakke]
24 GWID [Subra_Hegde]
25 AFI for L2VPN information [RFC4761][RFC6074]
26 MPLS-TP Section Endpoint Identifier [RFC7212]
27 MPLS-TP LSP Endpoint Identifier [RFC7212]
28 MPLS-TP Pseudowire Endpoint Identifier [RFC7212]
29 MT IP: Multi-Topology IP version 4 [RFC7307]
30 MT IPv6: Multi-Topology IP version 6 [RFC7307]
31-16383 Unassigned  
16384 EIGRP Common Service Family [Donnie_Savage]
16385 EIGRP IPv4 Service Family [Donnie_Savage]
16386 EIGRP IPv6 Service Family [Donnie_Savage]
16387 LISP Canonical Address Format (LCAF) [David_Meyer]
16388 BGP-LS [RFC7752]
16389 48-bit MAC [RFC7042]
16390 64-bit MAC [RFC7042]
16391 OUI [RFC7961]
16392 MAC/24 [RFC7961]
16393 MAC/40 [RFC7961]
16394 IPv6/64 [RFC7961]
16395 RBridge Port ID [RFC7961]
16396 TRILL Nickname [RFC7455]
16397-65534 Unassigned  
65535 Reserved  



Full List of sAFI’s
sAFI Description Reference
0 Reserved [RFC4760]
1 Network Layer Reachability Information used for unicast forwarding [RFC4760]
2 Network Layer Reachability Information used for multicast forwarding [RFC4760]
3 Reserved [RFC4760]
4 Network Layer Reachability Information (NLRI) with MPLS Labels [RFC8277]
6 Network Layer Reachability Information used for Dynamic Placement of Multi-Segment Pseudowires [RFC7267]
7 Encapsulation SAFI [RFC5512]
9-63 Unassigned  
64 Tunnel SAFI [Gargi_Nalawade][draft-nalawade-kapoor-tunnel-safi-01]
65 Virtual Private LAN Service (VPLS) [RFC4761][RFC6074]
67 BGP 4over6 SAFI [RFC5747]
68 BGP 6over4 SAFI [Yong_Cui]
69 Layer-1 VPN auto-discovery information [RFC5195]
70 BGP EVPNs [RFC7432]
71 BGP-LS [RFC7752]
72 BGP-LS-VPN [RFC7752]
73 SR TE Policy SAFI [draft-previdi-idr-segment-routing-te-policy]
74-127 Unassigned  
128 MPLS-labeled VPN address [RFC4364][RFC8277]
129 Multicast for BGP/MPLS IP Virtual Private Networks (VPNs) [RFC6513][RFC6514]
130-131 Reserved [RFC4760]
132 Route Target constrains [RFC4684]
133 IPv4 dissemination of flow specification rules [RFC5575]
134 VPNv4 dissemination of flow specification rules [RFC5575]
135-139 Reserved [RFC4760]
140 VPN auto-discovery [draft-ietf-l3vpn-bgpvpn-auto]
141-240 Reserved [RFC4760]
241-254 Reserved for Private Use [RFC4760]
255 Reserved [RFC4760]


Leave a Reply

12 Comments on "MP-BGP and Address Families"

newest oldest most voted
Notify of
Miray Zehra

Is there a sAFI for Multicast VPN’s as well? OR it is classified under any other general AFI/SAFI?


Superb, I have not like this post before..


What is the cause of bgp session down when L3VPN is added?

Fernando J

Great man…..Please keep it up!


Thanks for clarification on AFI/sAFI, I was looking for these IANA tables.

Cooper Jackson

Great! Thanks

Cooper Jackson

There is some confusion about bgp and mpbgp, Please clear…………