Skip to content

MPLS configuration

Multiprotocol Label Switching (MPLS) is a technique allowing for simplified forwarding. It uses labels in contrast to IP addresses, which can be set on the ingress of an MPLS network, allowing core forwarders to handle smaller sets of label forwarding tables instead of large IP forwarding tables. MPLS operates between IP and Ethernet, leading to it being known as a Layer 2.5 protocol.

Configuring MPLS

On a router that runs MPLS, which interfaces that should use MPLS must be specified. On core routers, this is typically all interfaces. On border routers, on the other hand, only "inward-facing" interfaces should communicate MPLS.

To enable MPLS on a VyOS router, simply define MPLS interfaces: ´´´ set protocol mpls interface ethX ´´´

MPLS LDP

In order to not be required to configure all your labels manually, routers have mechanisms to automatically assign and distribute labels in the MPLS network. This can either be done through the use of OSPF, or more simply through the use of MPLS Label Distribution Protocol (LDP). To enable LDP on a VyOS router, use: ´´´ set protocol mpls ldp interface ethX set protocol mpls ldp router-id x.x.x.x (A Loopback) set protocol mpls ldp disovery transport-ipv4-address x.x.x.x (A loopback) ´´´