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:
Of course, we chose the second one due to its flexibility & backward compatibility. Hence, MP-BGP came into existence under RFC4760 (https://tools.ietf.org/html/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.
AFI/sAFI:
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:
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] |
5 | MCAST-VPN | [RFC6514] |
6 | Network Layer Reachability Information used for Dynamic Placement of Multi-Segment Pseudowires | [RFC7267] |
7 | Encapsulation SAFI | [RFC5512] |
8 | MCAST-VPLS | [RFC7117] |
9-63 | Unassigned | |
64 | Tunnel SAFI | [Gargi_Nalawade][draft-nalawade-kapoor-tunnel-safi-01] |
65 | Virtual Private LAN Service (VPLS) | [RFC4761][RFC6074] |
66 | BGP MDT SAFI | [RFC6037] |
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] |
Is there a sAFI for Multicast VPN’s as well? OR it is classified under any other general AFI/SAFI?
Yes, they have a separate sAFI
sAFI=5(MCAST-VPN).
These are documented in RFC6514 officially.
Many thanks for pointing it out. I was googling it for a while but was unable to find it.
I will look into RFC6514 now. thanks
Superb, I have not like this post before..
What is the cause of bgp session down when L3VPN is added?
Great man…..Please keep it up!
Thanks for your app
Thanks for clarification on AFI/sAFI, I was looking for these IANA tables.
Great! Thanks
There is some confusion about bgp and mpbgp, Please clear…………
Basically, BGP only supported IPv4 unicast prefixes. It was later extended to support other protocols such as IPv4 multicast, VPNv4 (for MPLS VPN) and IPv6, just to name a few.
This extension is referred to as Multiprotocol BGP (or MP-BGP) and was documented in RFC2283. Please have a look at the RFC: http://www.ietf.org/rfc/rfc2283.txt?number=2283