Skip to content

address families

Thomas Mangin edited this page Apr 11, 2026 · 4 revisions

Pre-Alpha. This page describes behavior that may change.

Address families in Ze fall into two groups. IPv4 and IPv6 unicast and multicast are built into the engine. Everything else (EVPN, FlowSpec, VPN, BGP-LS, labelled unicast, VPLS, MVPN, RTC, MUP) is provided by an nlri plugin, and is only available when the plugin is loaded. This page lists what ships and how to enable each one.

Built into the engine

These four families work without any plugin.

Family Config name AFI / SAFI
IPv4 Unicast ipv4/unicast 1 / 1
IPv6 Unicast ipv6/unicast 2 / 1
IPv4 Multicast ipv4/multicast 1 / 2
IPv6 Multicast ipv6/multicast 2 / 2

Enable them under peer { family { } }:

peer upstream {
    connection { remote { ip 10.0.0.1; } }
    session {
        asn { remote 65001; }
        family {
            ipv4/unicast { prefix { maximum 1000000; } }
            ipv6/unicast { prefix { maximum 200000; } }
        }
    }
}

Every enabled family requires a prefix { maximum }. That is RFC 4486 and Ze refuses to start without it.

Plugin-provided families

The rest ship as bgp-nlri-* plugins. Run ze --plugins to list the ones compiled into your binary.

Family Config name Plugin Encode Decode
IPv4 VPN ipv4/mpls-vpn bgp-nlri-vpn Yes Yes
IPv6 VPN ipv6/mpls-vpn bgp-nlri-vpn Yes Yes
IPv4 FlowSpec ipv4/flow bgp-nlri-flowspec Yes Yes
IPv6 FlowSpec ipv6/flow bgp-nlri-flowspec Yes Yes
IPv4 FlowSpec VPN ipv4/flow-vpn bgp-nlri-flowspec Yes Yes
IPv6 FlowSpec VPN ipv6/flow-vpn bgp-nlri-flowspec Yes Yes
IPv4 MPLS Label ipv4/mpls-label bgp-nlri-labeled Yes Yes
IPv6 MPLS Label ipv6/mpls-label bgp-nlri-labeled Yes Yes
L2VPN EVPN l2vpn/evpn bgp-nlri-evpn Yes Yes
L2VPN VPLS l2vpn/vpls bgp-nlri-vpls Yes Yes
BGP-LS bgp-ls/bgp-ls bgp-nlri-ls No Yes
BGP-LS VPN bgp-ls/bgp-ls-vpn bgp-nlri-ls No Yes
IPv4 MVPN ipv4/mvpn bgp-nlri-mvpn No Yes
IPv6 MVPN ipv6/mvpn bgp-nlri-mvpn No Yes
IPv4 RTC ipv4/rtc bgp-nlri-rtc No Yes
IPv4 MUP ipv4/mup bgp-nlri-mup Yes Yes
IPv6 MUP ipv6/mup bgp-nlri-mup Yes Yes

The "Encode" and "Decode" columns are worth reading carefully. BGP-LS, MVPN, and RTC are decode-only: Ze parses received NLRIs for these families but does not encode them. If you need to send routes in those families, Ze is not the answer.

Enabling a plugin-provided family

All NLRI plugins are internal and loaded automatically. List the family under peer { family { } }.

bgp {
    peer upstream {
        connection { remote { ip 10.0.0.1; } }
        session {
            asn { remote 65001; }
            family {
                ipv4/unicast { prefix { maximum 1000000; } }
                l2vpn/evpn   { prefix { maximum 10000;   } }
            }
        }
    }
}

If the family is listed but the plugin is not loaded, Ze fails to start with an error naming the unknown family. The error is at load time, not at runtime, so you catch it before peering.

Capability negotiation

Ze advertises every enabled family in the Multiprotocol Extensions capability (RFC 4760) during OPEN. The session only negotiates the families both peers advertise. If the local side lists ipv4/unicast and ipv6/unicast and the peer lists only ipv4/unicast, only ipv4/unicast is active.

The peer <name> capabilities command shows the negotiated result after the session is up.

ze# peer upstream capabilities
capabilities {
    four-octet-asn       yes
    route-refresh        yes
    add-path             yes
    graceful-restart     yes
    extended-message     yes
    families [ ipv4/unicast ipv6/unicast ]
}

Prefix limits per family

Every enabled family on every peer has its own prefix { maximum }, and its own optional warning threshold.

family {
    ipv4/unicast  { prefix { maximum 1000000; warning 900000; } }
    ipv6/unicast  { prefix { maximum 200000;  warning 180000; } }
    ipv4/mpls-vpn { prefix { maximum 500; } }
    l2vpn/evpn    { prefix { maximum 10000; } }
}

The warning defaults to 90% of maximum when not set. When the received prefix count crosses the warning threshold upward, the BGP reactor pushes a bgp/prefix-threshold warning onto the operational report bus, which shows up in ze show warnings and on the CLI login banner. When the count crosses the maximum, the session is torn down with NOTIFICATION Cease/MaxPrefixes (subcode 1) unless teardown false is set.

See peers for the full prefix limit reference.

Extended next-hop

RFC 8950 Extended Next Hop lets you advertise IPv4 NLRI with an IPv6 next-hop or vice versa. Ze supports it through the nexthop capability leaf.

capability {
    nexthop {
        ipv4/unicast ipv6;
        ipv4/unicast ipv4;
    }
}

This is what you want when you need IPv4 forwarding over an IPv6-only peering session.

See also

Adapted from main/docs/features/bgp-protocol.md and main/docs/guide/configuration.md.

Home

About

First Steps

Configuration

Operation

Interfaces

Plugins

Plugin Development

Chaos Testing

Blueprints

Development

Reference

Clone this wiki locally