Skip to content

Address Families Overview

Thomas Mangin edited this page Nov 15, 2025 · 1 revision

Address Families Overview

ExaBGP supports a comprehensive range of BGP address families (AFI/SAFI combinations) as defined in various RFCs. This page provides an overview of all supported address families and links to detailed documentation.

Table of Contents

What are Address Families?

BGP address families are identified by two components:

  • AFI (Address Family Identifier): Defines the network layer protocol (e.g., IPv4, IPv6, L2VPN)
  • SAFI (Subsequent Address Family Identifier): Defines the type of network reachability information (e.g., unicast, multicast, VPN)

Together, AFI/SAFI combinations allow BGP to carry routing information for different network types and services beyond simple IPv4 unicast routing.

Supported Address Families

ExaBGP implements the following address families:

IPv4 Address Families

Family Description RFCs Documentation
IPv4 Unicast Standard IPv4 routing RFC 4271 IPv4 Unicast
IPv4 Multicast IPv4 multicast routing RFC 4760 IPv4 Multicast
IPv4 MPLS VPN Layer 3 VPN over MPLS RFC 4364 L3VPN Overview
IPv4 FlowSpec Traffic filtering and DDoS mitigation RFC 5575, RFC 8955 FlowSpec Overview
IPv4 MPLS-labeled MPLS-labeled IPv4 routes RFC 8277 IPv4 Unicast
IPv4 RT-Constraint Route Target filtering RFC 4684 RT Constraint

IPv6 Address Families

Family Description RFCs Documentation
IPv6 Unicast Standard IPv6 routing RFC 4271, RFC 2545 IPv6 Unicast
IPv6 Multicast IPv6 multicast routing RFC 4760 IPv6 Multicast
IPv6 MPLS VPN Layer 3 VPN over MPLS for IPv6 RFC 4659 L3VPN Overview
IPv6 FlowSpec Traffic filtering for IPv6 RFC 8956 FlowSpec Overview
IPv6 MPLS-labeled MPLS-labeled IPv6 routes RFC 8277 IPv6 Unicast

Layer 2 VPN Address Families

Family Description RFCs Documentation
VPLS Virtual Private LAN Service RFC 4761, RFC 4762 VPLS Overview
EVPN Ethernet VPN RFC 7432 EVPN Overview

Special Purpose Address Families

Family Description RFCs Documentation
BGP-LS BGP Link-State for topology distribution RFC 7752 BGP-LS Overview
RT-Constraint Route Target Constraint RFC 4684 RT Constraint

Segment Routing

Family Description RFCs Documentation
SRv6 Segment Routing over IPv6 RFC 8986, RFC 9514 SRv6 and MUP
SR-MPLS Segment Routing over MPLS RFC 8669 Segment Routing

AFI/SAFI Combinations

ExaBGP uses standard AFI/SAFI numeric codes as defined by IANA:

Common AFI Codes

  • 1: IPv4
  • 2: IPv6
  • 25: L2VPN
  • 16388: BGP-LS

Common SAFI Codes

  • 1: Unicast
  • 2: Multicast
  • 4: MPLS-labeled
  • 65: VPLS
  • 70: EVPN
  • 71: BGP-LS
  • 73: SR Policy
  • 128: MPLS VPN
  • 129: Multicast VPN
  • 132: Route Target Constraint
  • 133: FlowSpec
  • 134: FlowSpec VPN

Example AFI/SAFI Combinations

AFI SAFI Name Purpose
1 1 IPv4 Unicast Standard IPv4 routing
2 1 IPv6 Unicast Standard IPv6 routing
1 133 IPv4 FlowSpec IPv4 traffic filtering
2 133 IPv6 FlowSpec IPv6 traffic filtering
1 128 IPv4 VPN MPLS L3VPN for IPv4
25 65 VPLS Virtual Private LAN Service
25 70 EVPN Ethernet VPN
16388 71 BGP-LS Link-State distribution

Choosing the Right Address Family

Select the appropriate address family based on your use case:

Internet and Enterprise Routing

  • IPv4 Unicast: Standard IPv4 routing, internet peering
  • IPv6 Unicast: Standard IPv6 routing, dual-stack networks
  • Multicast: IPTV, video distribution, multicast applications

Traffic Management and Security

  • FlowSpec: DDoS mitigation, traffic filtering, QoS enforcement
  • BGP-LS: Network topology collection, SDN controllers, traffic engineering

Service Provider Services

  • L3VPN (MPLS VPN): Enterprise VPN services, customer isolation
  • VPLS: Layer 2 VPN services, E-LINE, E-LAN
  • EVPN: Next-generation data center fabrics, VXLAN control plane
  • RT-Constraint: Route Target filtering for VPN scalability

Data Center and Cloud

  • EVPN: VXLAN control plane, multi-tenancy, DCI
  • IPv4/IPv6 Unicast: Leaf-spine fabrics, ECMP load balancing

Advanced Use Cases

  • Segment Routing (SRv6/SR-MPLS): Traffic engineering, 5G mobile networks
  • BGP-LS: SDN integration, centralized path computation

Configuration Examples

Single Address Family

neighbor 192.0.2.1 {
    router-id 10.0.0.1;
    local-address 10.0.0.1;
    local-as 65001;
    peer-as 65002;

    family {
        ipv4 unicast;
    }
}

Multiple Address Families

neighbor 192.0.2.1 {
    router-id 10.0.0.1;
    local-address 10.0.0.1;
    local-as 65001;
    peer-as 65002;

    family {
        ipv4 unicast;
        ipv4 multicast;
        ipv6 unicast;
        ipv4 flow;
        ipv6 flow;
    }
}

VPN Address Families

neighbor 192.0.2.1 {
    router-id 10.0.0.1;
    local-address 10.0.0.1;
    local-as 65001;
    peer-as 65002;

    family {
        ipv4 mpls-vpn;
        ipv6 mpls-vpn;
        l2vpn vpls;
        l2vpn evpn;
    }
}

FlowSpec for DDoS Mitigation

neighbor 192.0.2.1 {
    router-id 10.0.0.1;
    local-address 10.0.0.1;
    local-as 65001;
    peer-as 65002;

    family {
        ipv4 flow;
        ipv6 flow;
    }
}

Data Center Fabric (EVPN)

neighbor 192.0.2.1 {
    router-id 10.0.0.1;
    local-address 10.0.0.1;
    local-as 65001;
    peer-as 65001;  # iBGP for EVPN

    family {
        l2vpn evpn;
    }
}

Important Notes

ExaBGP Role

ExaBGP does NOT manipulate the routing table (RIB) or forwarding table (FIB). It is a pure BGP protocol implementation that:

  • Receives routes from BGP peers
  • Sends routes to BGP peers
  • Passes route information to external programs via the API

Your external program must handle:

  • Route installation into the kernel routing table
  • Traffic forwarding decisions
  • Integration with other networking components

Address Family Negotiation

  • Address families are negotiated during BGP session establishment via capability exchange
  • Only advertise address families that your router supports
  • Peers must support the same address family to exchange routes
  • Some address families require specific BGP capabilities (e.g., ADD-PATH, extended communities)

Configuration Syntax

Address family configuration syntax varies slightly:

# IPv4/IPv6 formats
family {
    ipv4 unicast;
    ipv6 unicast;
    ipv4 multicast;
    ipv6 multicast;
}

# FlowSpec format
family {
    ipv4 flow;
    ipv6 flow;
}

# VPN formats
family {
    ipv4 mpls-vpn;
    ipv6 mpls-vpn;
    l2vpn vpls;
    l2vpn evpn;
}

# Other formats
family {
    ipv4 flow-vpn;
    ipv6 flow-vpn;
    ipv4 rtc;  # Route Target Constraint
}

See Also

Getting Started

Address Family Documentation

Use Cases

Reference


πŸ‘» Ghost written by Claude (Anthropic AI)

Clone this wiki locally