Below are the BGP4 AFI/SAFI numbers. Also there are lots of SAFI numbers but these are the commonly used ones.
- IPv4 (AFI/SAFI 1/1)
- VPNv4 (AFI/SAFI 1/128)
- VPNv6 with v4-mapped nhops (AFI/SAFI 2/128)
- 6PE with v4-mapped nhops (AFI/SAFI 2/4)
So, how this information is useful?
When you configure MP-BGP (means that you configure BGP to carry network layer reachability
information for address families other than unicast IPv4) BGP installs the
MP-BGP routes into different routing tables. Each routing table is identified
by the AFI and a SAFI).
Below are the wireshark captures of the bgp updates messages of different AFI/SAFI.
IPv4 EXAMPLE (AFI/SAFI 1/1)
6PE EXAMPLE (AFI/SAFI 2/4)
You can see the AFI/SAFI numbers, NLRI prefix-label information, and next-hop information inside of the MP_REACH_NLRI attribute.
VPNv4 EXAMPLE (AFI/SAFI 1/128)