Guide

MPLS

Ze can act as a Linux MPLS label-switching router (LSR). BGP labeled-unicast routes (RFC 8277) received from peers are programmed into the kernel MPLS FIB as label-push entries, so Ze forwards labeled traffic without VPP.

Enabling MPLS

MPLS label processing is per-interface. Enable it on each interface that should accept labeled packets:

interface {
    ethernet eth0 {
        unit 0 {
            mpls {
                enable true
            }
        }
    }
}

This sets net.mpls.conf.eth0.input=1. The global label-table size is governed by the net.mpls.platform_labels sysctl (configure it via the sysctl {} block; it defaults to off, which disables MPLS entirely).

The Linux kernel must have the mpls_router and mpls_iptunnel modules loaded. ze doctor warns (doctor-mpls-unavailable) when they are missing.

Inspecting the forwarding table

ze show mpls forwarding              # all installed MPLS entries
ze show mpls forwarding limit 500    # cap the response size

Each row reports the incoming label (in-label), the operation (swap or pop), any outgoing out-labels, the next-hop, and the egress device. The data is read directly from the kernel AF_MPLS routing table.

Metrics

Label distribution

Two label-distribution protocols are available (both experimental):

LDP configuration

ldp {
    lsr-id 10.0.0.1
    transport-address 10.0.0.1
    interfaces eth0
    interfaces eth1
}

Inspect LDP state with show ldp neighbor (session state, transport address) and show ldp binding (FEC-to-label bindings). A label binding learned from a neighbor programs an ingress push entry in the kernel MPLS FIB toward that neighbor.