Skip to main content
Version: 7.26

MPLS

MPLS (Multiprotocol Label Switching) forwards packets by a label attached to the packet instead of by the destination address in the IP header. The forwarding decision (outgoing interface and next-hop router) is a lookup of the label, which is simpler than a routing lookup (the longest matching prefix).

A router that label-switches a packet does not process its network layer header. Firewall rules and queues that work on IP packets do not see label-switched packets: a filter rule in the forward chain of a transit router does not match a packet that the router receives and sends with a label, and a simple queue does not count it. Apply IP-based actions, such as filtering and NAT, at the edges of the MPLS network, where packets enter or leave it. The ingress is the better place: traffic you drop there does not cross the MPLS backbone. MPLS packets can be marked by their EXP bits and queued with a queue tree, see EXP bit and MPLS queuing.

Label switched paths​

A label switched path (LSP) carries packets from one edge of the MPLS network to the other. RouterOS builds LSPs in two ways:

  • LDP distributes labels for active routes. A labeled packet takes the same path that an unlabeled packet takes along the routing table. When a router routes an unlabeled packet along a route for which it has a label from the next hop, it adds that label and sends the packet to the next hop. When a router receives a packet with a label it assigned to a route, it replaces the label with the label of the next hop for that route and sends the packet on. By default, the egress router advertises the implicit null label, and the last router before the egress removes the label (penultimate hop popping). With use-explicit-null=yes on the egress router, and on TE tunnels, the packet keeps a label (explicit null, label 0) up to the egress router.
  • Traffic engineering tunnels (RSVP-TE) set up an LSP along an explicit path or along a path that the head-end router calculates from link constraints, such as available bandwidth (CSPF).

Services run on top of the LSPs: VPLS carries Ethernet segments between sites, and MPLS IP VPNs carry the routes of customer VRFs, see VRF.

MPLS adds protocols and concepts to routed and bridged networks. Learn the MPLS concepts before you use MPLS in a production network, for example from these sources:

info

MPLS is not supported on SMIPS devices (hAP lite, hAP lite TC and hAP mini).

MPLS menus​

MenuPurpose
/mpls/settingsDynamic label range and TTL propagation.
/mpls/interfaceMPLS MTU of an interface.
/mpls/forwarding-tableLabel switching entries of LDP, VPLS, VPN and TE.
/mpls/ldpLDP instances, interfaces, neighbors, label mappings and filters, see LDP.
/mpls/traffic-engRSVP-TE interfaces, paths, tunnels and flows, see Traffic engineering.
/mpls/manglePacket marks and EXP rewrite, see EXP bit and MPLS queuing.
/interface/vplsLDP-signalled and dynamic VPLS interfaces, see VPLS.
/routing/bgp/vplsBGP-signalled VPLS, see VPLS.

Label and TTL settings​

Dynamic labels come from dynamic-label-range in /mpls/settings, 16-1048575 by default. Labels 0 to 15 are reserved. If you configure static labels, change the range so that it does not include them.

With propagate-ttl=yes (the default), the router copies the IP TTL into the label when it adds one, and a traceroute shows each router of the LSP. With propagate-ttl=no on the ingress router, the routers inside the MPLS network do not appear in a traceroute that starts there.

Supported features​

RouterOS supports the following MPLS features:

  • MPLS switching with penultimate hop popping.
  • Static local and remote label bindings for IPv4 and IPv6.
  • Label Distribution Protocol (RFC 3036, RFC 5036 and RFC 7552) for IPv4 and IPv6:
    • Downstream unsolicited label advertisement.
    • Independent label distribution control.
    • Liberal label retention.
    • Targeted sessions.
    • Optional loop detection.
    • ECMP.
  • Virtual Private LAN Service (VPLS):
    • VPLS LDP signaling (RFC 4762).
    • Cisco-style static VPLS pseudowires (RFC 4447 FEC type 0x80).
    • VPLS pseudowire fragmentation and reassembly (RFC 4623).
    • VPLS MP-BGP autodiscovery and signaling (RFC 4761).
    • Cisco VPLS BGP-based autodiscovery (draft-ietf-l2vpn-signaling-08).
    • Several import and export route targets for BGP-based VPLS (RFC 4761 and draft-ietf-l2vpn-signaling-08).
  • RSVP-TE tunnels:
    • Tunnel head-end.
    • Explicit paths.
    • OSPF extensions for TE tunnels.
    • CSPF path selection.
    • VPLS and MPLS IP VPN traffic over TE tunnels.
    • Ingress rate limit and automatic adjustment of the reserved bandwidth of a tunnel.
    • Bandwidth settings in bits per second.
  • MP-BGP based MPLS IP VPN, with per-prefix and per-VRF label allocation.
  • OSPF and RIP as CE-PE protocols.
  • Ping and traceroute in a VRF.
  • Control over TTL propagation.
  • Per-VRF BGP redistribution settings.

Unsupported features​

RouterOS does not support these MPLS features:

  • LDP: downstream on-demand label advertisement, ordered label distribution control and conservative label retention.
  • Traffic engineering: fast reroute, link protection and node protection.
  • BGP as a label distribution protocol (labeled unicast).