Configuring MPLS

This chapter provides information about how MPLS functions on SR Linux and examples of common configuration tasks.

MPLS label manager

SR Linux features an MPLS label manager process that shares the MPLS label space among client applications that require MPLS labels; these applications include static MPLS forwarding and LDP.

For a protocol such as LDP to become operational, it must be configured with a reference to a predefined range of labels, called a label block. A label block configuration includes a start-label value and an end-label value. When the label block is made available to an application, the application can use any label in the range between the start-label and end-label, inclusive of those values.

The MPLS label manager ensures there is no configuration overlap between the labels of two different label blocks.

Static and dynamic label blocks

A label block can be static or dynamic:

  • A static label block is provided by the MPLS label manager to a client application when it is expected that the client application specifies the exact label value it wants to use with every label request.

  • A dynamic label block is provided by the MPLS label manager to a client application when it is expected that the client application requests the next available label when it needs a new entry.

A label block can be configured as shared or dedicated. When a label block is configured to be shared, it allows the label block to be made available to multiple protocols. If a label block is not configured as shared, it is reserved for the exclusive use of one protocol.

The label block used by LDP must be configured as a dynamic, non-shared label block. For static MPLS routes, it is necessary to configure a static label block and reference the static label block in the static MPLS configuration.

Configuring label blocks

To configure a static or dynamic label block, you specify the start and end label for the range.

The following example configures a static and dynamic label block.

--{ + candidate shared default }--[  ]--
# info with-context system mpls
    system {
        mpls {
            label-ranges {
                static s1 {
                    start-label 10001
                    end-label 11000
                }
                dynamic d1 {
                    start-label 11001
                    end-label 12000
                }
            }
        }
    }

Displaying label block information

Use the info from state command to display information about the configured label blocks.

--{ + candidate shared default }--[  ]--
# info from state with-context system mpls label-ranges
    system {
        mpls {
            label-ranges {
                static s1 {
                    shared true
                    start-label 10001
                    end-label 11000
                    allocated-labels 0
                    free-labels 1000
                    status ready
                }
                dynamic d1 {
                    start-label 11001
                    end-label 12000
                    allocated-labels 0
                    free-labels 1000
                    status ready
                }
            }
        }
    }

Static MPLS forwarding using next-hop-groups

Statically configured MPLS forwarding entries allow MPLS-labeled packets to be forwarded along a specific path that may differ from the normal shortest path provided by the underlay routing protocol.

Static next-hop-groups used by IPv4 and IPv6 static routes of the default network-instance support MPLS next hops. An MPLS next-hop has a next-hop IP address and a list of MPLS labels (currently limited to 1). When an IP packet matches a static route pointing to a next-hop-group with MPLS next-hops, the packet is MPLS encapsulated according to the selected next-hop.

Static MPLS routes are supported in the default network-instance. Static MPLS routes control the way that transit LSRs, penultimate LSRs, and egress LERs handle received MPLS packets. Each static MPLS route matches a particular label value and causes that label value to be popped from the label stack when it appears as the top label in any received MPLS packet, on any interface. If the static MPLS route points to a next-hop-group with MPLS next-hops, the packet is forwarded to the selected next-hop with a swap operation; ECMP is supported if there are multiple MPLS next-hops. When the pushed-mpls-label-stack parameter for the MPLS next-hop specifies the IPv4 or IPv6 IMPLICIT_NULL label value, no new label is pushed and a PHP pop-and-forward operation is performed.

Configuring an ingress LER

To configure an ingress LER, you specify the label to push to MPLS-encapsulated packets.

The following example shows the default network-instance configured for an ingress LER, specifying the label to push to MPLS-encapsulated packets. In this example, multiple next-hops (ECMP) are specified in a next-hop group.

--{ + candidate shared default }--[  ]--
# info with-context network-instance default next-hop-groups group srva_tora_ipv4
    network-instance default {
        next-hop-groups {
            group srva_tora_ipv4 {
                nexthop 0 {
                    ip-address 192.13.1.3
                    resolve false
                    pushed-mpls-label-stack [
                        544334
                    ]
                }
                nexthop 2 {
                    ip-address 192.13.1.3
                    resolve false
                    pushed-mpls-label-stack [
                        205679
                    ]
                }
            }
        }
    }

Configuring a transit LSR

To configure a transit LSR with an explicit swap operation, you specify a label block for MPLS and a next-hop to use for label-swap operations.

Specify a static label block for MPLS

The following example shows the default network-instance configured as a transit LSR in the label switched path.

This example configures MPLS to use a static label block named s2. The static label block is configured with a start-label value and an end-label value. See Configuring label blocks for an example of a static label block configuration.

The example configures incoming MPLS transit traffic with label 1000 to use the next-hops in next-hop-group nhop_group_1 for label-swap operations.

--{ + candidate shared default }--[  ]--
# info with-context network-instance default mpls
    network-instance default {
        mpls {
            static-label-block s2
            static-entry 1000 preference 100 {
                operation swap
                next-hop-group nhop_group_1
            }
        }
    }

Specify next-hop for MPLS

The following example specifies the MPLS next-hop for nhop_group_1. Only one MPLS next-hop is supported per next-hop-group. In this example, the label for outgoing traffic to MPLS next-hop 192.35.1.5 is swapped to 1001.

--{ + candidate shared default }--[  ]--
# info with-context network-instance default next-hop-groups group nhop_group_1
    network-instance default {
        next-hop-groups {
            group nhop_group_1 {
                nexthop 0 {
                    ip-address 192.35.1.5
                    resolve false
                    pushed-mpls-label-stack [
                        1001
                    ]
                }
            }
        }
    }

Configuring PHP

To configure PHP, you configure MPLS to pop the label for outgoing traffic for a next-hop.

The following example shows the default network-instance configured to perform PHP for the LSR. In this example, the setting for pushed-mpls-label-stack is IMPLICIT_NULL, which causes the label for outgoing traffic to MPLS next-hop 192.35.1.1 to be popped.

--{ + candidate shared default }--[  ]--
# info with-context network-instance default next-hop-groups group nhop_group_2
    network-instance default {
        next-hop-groups {
            group nhop_group_2 {
                nexthop 0 {
                    ip-address 192.35.1.1
                    resolve false
                    pushed-mpls-label-stack [
                        IMPLICIT_NULL
                    ]
                }
            }
        }
    }

Static MPLS forwarding using static LSP egress entries

Note: Static LSP entries are supported only on 7250 IXR Gen 3 platforms.
Note: Nokia recommends to configure only one static MPLS forwarding mechanism (next-hop groups or static LSP egress entries) at the same time.

To configure static MPLS forwarding, you can configure static LSP entries associating an incoming label with an IPv4 or IPv6 next-hop address and network instance. The static incoming label entries are supported only on egress LERs, defining a pop-and-forward operation.

  • The static LSP creates a pop-and-forward ILM entry: the top label stack entry is removed and the packet is forwarded out the selected next hop with its remaining MPLS label stack entries (if any), its IP headers, and its payload.
  • The outgoing packet can be an IPv4 unicast, IPv6 unicast, or IPv4 multicast packet with one or more labels.
  • The static LSP is created in the default network instance and the outgoing interface is an IP interface that must be in a different (non-default) IP-VRF network instance. The static LSP configuration must reference the IP-VRF network instance containing the outgoing IP interface. Because different IP VRFs can have overlapping IP addresses, specifying an IP address on its own is insufficient to determine the egress IP interface.
  • The next-hop IP address of the static LSP can specify only a direct next hop.

Route resolution

Together, the configured ip-address and network-instance identify a single outgoing interface for the direct next hop. Routes are resolved as follows:

  • No restrictions exist on the type of routes used to resolve the next-hop IP address.
  • Route resolution is limited to one level. If the route that resolves the next-hop IP address has an indirect next hop, the next hop is considered down.
  • Full ECMP route resolution is not supported. If the route that resolves the next-hop IP address is an ECMP route with multiple direct next hops, SR Linux deterministically selects just one of those next hops to program the ILM entry.
  • If all the next hops are unresolved, a static LSP becomes inactive and is deprogrammed from the MPLS ILM table. This is visible using the info from state command, which displays the LSP oper-state as down and the oper-down-reason as next-hops-unresolved.

Label allocation

Labels for static LSP entries are allocated from a dedicated static label block, specified using the network-instance mpls static-label-block command. If the static label block is not configured, static LSP incoming labels are allocated from the default label block (default range of 16 to 1048575).

  • The default label block is a non-shared static label range automatically created by the label manager if the system has no user-configured dynamic or static label block configured under system mpls label-ranges. The default label block is not visible in the running configuration or in state.
  • If a dynamic or static label block is present under system mpls label-ranges, you must specify a static label range for the static LSP entries to use under network-instance mpls static-label-block; otherwise, the configuration of static LSPs is blocked.
  • SR Linux supports the configuration of multiple static LSPs with the same incoming-label, but only one ILM for that label is installed. Assuming all next hops are resolvable, static LSPs with identical incoming-label get sorted by name (in ascending order) and only the first one is installed. The other next hops display oper-down-reason label-unavailable in info from state.
  • If the MPLS incoming-labels resource is exhausted, static LSPs that cannot be programmed as ILM entries are inactive. In this case, the oper-state of the LSP in info from state is shown as down with an oper-down-reason of resource-allocation-failed.

MPLS packet datapath behavior

After popping the top label, if the exposed packet is still an MPLS packet with one or more labels:

  • The MPLS TTL in the new top label is decremented by 1.
  • The destination MAC address of the transmitted packet is found from the ARP/ND entry for the static LSP next hop.

IPv4/IPv6 unicast or IPv4 multicast datapath behavior

After popping the top label, if the exposed packet is an IPv4/IPv6 unicast or IPv4 multicast packet:

  • The MPLS TTL is not copied to the IP TTL (no TTL propagation).
  • The IPv4 DSCP or IPv6 traffic class is not modified.
  • The IP TTL is decremented by one when the packet is forwarded.
  • When the payload-type is set to unicast, the destination MAC address of the transmitted IPv4/IPv6 packet is found from the ARP/ND entry for the static LSP next hop.

  • When the payload-type is set to multicast, the destination MAC address of the transmitted IPv4/IPv6 packet is derived from the IP multicast address in the IP header destination address field; for example, if the destination address carries the group address 239.1.1.1, the destination MAC address is 01-00-5E-01-01-01.

Configuring static egress LSPs

To configure static egress LSPs, use the network-instance default mpls lsps static-lsp command. The incoming-label must specify a valid MPLS label from within the network-instance mpls static-label-block or the default label block.

If the incoming label of a static LSP is already in use by another static LSP, the new LSP status is inactive and shown in info from state as oper-state down with an oper-down-reason of label-unavailable.

Define label block for static LSP entries

The following example specifies a static label block to use for the static LSPs. The mpls static-label-block command references a static label block configured under system mpls label-ranges.

--{ candidate shared default }--[  ]--
# info with-context network-instance default mpls static-label-block
    network-instance default {
        mpls {
            static-label-block static-egress-lsp-block-1
        }
    }

Configure static LSP entries

The following example configures a static LSP entry for unicast traffic.

--{ candidate shared default }--[  ]--
# info with-context network-instance default mpls lsps
    network-instance default {
        mpls {
            lsps {
                static-lsp static-lsp-1 {
                    payload-type unicast
                    egress {
                        incoming-label 17001
                        network-instance ip-vrf-1
                        pipe-mode true
                        next-hop 10 {
                            ip-address 10.20.20.1
                        }
                    }
                }
            }
        }
    }

The static egress LSP parameters are as follows:

  • payload-type — specifies the payload type: unicast (default) or multicast.
  • egress incoming-label — specifies a valid and available MPLS label value from the configured static label block or the default label block.
  • egress network-instance — specifies a locally configured IP-VRF network instance. Each next-hop IP address is resolved to a routed subinterface in the specified network instance. Because different IP VRFs can have overlapping IP addresses, ip-address on its own is insufficient to determine the egress IP interface.
  • egress pipe-mode — controls the QoS classification and marking of packets matching the MPLS ILM entry. When set to true, packets matching the static LSP ILM entry are classified and marked based on the traffic-class/EXP value of the label-stack entry that is popped. No copying of these fields to the IP header is performed. A setting of false (implying uniform mode) is not supported.
  • egress next-hop index — specifies an index value for the next hop. A maximum of one next hop is supported.
  • egress next-hop ip-address — specifies an IPv4 or IPv6 address. IPv4 addresses can be global or link-local, while IPv6 addresses can be global-unicast or a link-local address with zone (for example: fe80::1234%ethernet-1/1.1). A pop-and-forward operation is performed to the specified IP address. That is, the top label stack entry is removed and the packet is forwarded out the selected next hop with its remaining MPLS label stack entries (if any), its IP headers, and its payload.

Configuring static egress LSP traffic-class classification

To classify traffic entering the static egress LSP, you can use the qos classifiers static-mpls-lsp-egress command to bind an MPLS traffic-class classification policy (defined by the mpls-traffic-class-policy command) to all static egress LSPs.

The static-mpls-lsp-egress classification policy affects all ingress MPLS packets that are matched by an MPLS ILM entry with either of the following two operations:

  • pop-xconnect-unicast
  • pop-xconnect-multicast

Every static MPLS LSP configured under the network-instance mpls lsps static-lsp egress context creates one of these two types of ILM entries. No other method of creating MPLS ILMs (configuration or signaling protocol) can create these types of ILMs.

If an MPLS packet that matches a static egress LSP entry arrives on a subinterface that has an mpls-traffic-class-policy applied directly (through configuration of qos interfaces interface input classifiers mpls-traffic-class-policy), the packet classification is based on the static-mpls-lsp-egress policy, if one exists. If no static-mpls-lsp-egress policy is defined, the system does not fall back to the MPLS traffic-class policy defined for the subinterface. Instead, the packets are classified by the default MPLS traffic-class classifier policy, which maps each MPLS TC value one-to-one to the forwarding class of the same index: TC 0 to fc0, TC 1 to fc1, and so on through TC 7 to fc7. A drop probability of low is applied to all classes.

Configure static egress LSP traffic-class classification

The following example configures an MPLS traffic class policy mapping a traffic class to a specific forwarding class and drop probability and binds that policy to all static egress LSPs.

--{ candidate shared default }--[  ]--
# info with-context qos classifiers static-mpls-lsp-egress MPLS_POLICY
qos {
    classifiers {
        static-mpls-lsp-egress MPLS_POLICY
        mpls-traffic-class-policy MPLS_POLICY {
            traffic-class 2 {
                forwarding-class AF3
                drop-probability low
            }
        }
    }
}

Per-interface MPLS reception control

Note: Per-interface MPLS reception control is supported only on 7250 IXR Gen 3 platforms.

Per-interface MPLS reception control allows a node to accept and forward ingress MPLS packets on core-facing routed subinterfaces while blocking MPLS packet reception on customer-facing routed subinterfaces. This feature is supported in the default network-instance and in ip-vrf network-instances using the network-instance interface mpls forward-received-packets command.

The setting applies only to ingress MPLS packets received on the routed subinterface. It does not affect the transmission of egress MPLS packets from the subinterface.

In a default network-instance, the implicit default value of the network-instance interface mpls forward-received-packets is true. In a network-instance of type ip-vrf, the implicit default value is false, and true is not supported.

In the default network-instance, you can control MPLS packet reception at the network-instance level using the network-instance mpls-forwarding forward-received-packets command.

When you configure per-interface reception control for a subinterface, the network-instance level setting is overridden for that subinterface, as follows:

  • If the per-interface reception control network-instance interface mpls forward-received-packets is set, that value applies and overrides the network-instance setting for that subinterface.
  • If it is not set, the subinterface uses the network-instance mpls-forwarding forward-received-packets setting at the network-instance level.

When MPLS is enabled on a routed subinterface, Ethernet-MPLS packets received on that subinterface are forwarded according to Incoming Label Map (ILM) lookup. When MPLS is disabled on a routed subinterface, Ethernet-MPLS packets received on that subinterface are discarded and counted in both interface subinterface statistics in-discarded-packets and interface subinterface mpls statistics in-discarded-packets.

The network-instance interface mpls forward-received-packets setting does not prevent configuring a static LSP with a next-hop on a subinterface for which MPLS reception is disabled. Also, it does not prevent a subinterface with MPLS reception disabled from being used as an LDP, RSVP-TE, or SR-MPLS interface. The setting does not affect control-plane signaling protocols.

For configuration examples, see Enabling MPLS on a routed subinterface.

Enabling MPLS on a routed subinterface

You can enable or disable ingress MPLS packet reception on a routed subinterface in a network-instance of type default or ip-vrf using the network-instance interface mpls forward-received-packets command. For more information, see Per-interface MPLS reception control.

In the default network-instance, the implicit default for network-instance interface mpls forward-received-packets is true, so ingress MPLS packets are accepted and forwarded on routed subinterfaces.

To disable MPLS packet reception on a customer-facing subinterface without changing other subinterfaces, set forward-received-packets to false for that subinterface under the network-instance interface mpls context.

Disable MPLS reception on a customer-facing subinterface

The following example disables ingress MPLS packet reception on subinterface ethernet-1/1.1 in the default network-instance.

--{ + candidate shared default }--[  ]--
# info with-context network-instance default interface ethernet-1/1.1 mpls
    network-instance default {
        interface ethernet-1/1.1 {
            mpls {
                forward-received-packets false
            }
        }
    }

Enable MPLS reception on a routed subinterface

The following example enables ingress MPLS packet reception on subinterface ethernet-1/2.1 in the default network-instance.

--{ + candidate shared default }--[  ]--
# info with-context network-instance default interface ethernet-1/2.1 mpls
    network-instance default {
        interface ethernet-1/2.1 {
            mpls {
                forward-received-packets true
            }
        }
    }

Display MPLS discard counters for a subinterface

When MPLS reception is disabled on a routed subinterface, Ethernet-MPLS packets received on that subinterface are dropped. Use the info from state with-context command to display the subinterface and the MPLS discard counters.

--{ + candidate shared default }--[  ]--
# info from state with-context interface ethernet-1/1 subinterface 1 statistics in-discarded-packets
    interface ethernet-1/1 {
        subinterface 1 {
            statistics {
                in-discarded-packets 12
            }
        }
    }
--{ + candidate shared default }--[  ]--
# info from state with-context interface ethernet-1/1 subinterface 1 mpls statistics in-discarded-packets
    interface ethernet-1/1 {
        subinterface 1 {
            mpls {
                statistics {
                    in-discarded-packets 0
                }
            }
        }
    }

ACLs and MPLS traffic

How MPLS traffic is handled by SR Linux ACLs lists how traffic along an MPLS datapath is evaluated by each type of ACL that can be configured on SR Linux. See the SR Linux ACL and Traffic Steering Guide for information about configuring ACLs on SR Linux.

Table 1. How MPLS traffic is handled by SR Linux ACLs

MPLS datapath

Evaluated by ingress ACL rules?

Evaluated by egress ACL rules?

Evaluated by CPU QoS entries?

Evaluated by IP CPM filter rules?

Evaluated by IP capture filter rules?

IP → MPLS (LER)

Yes

No

N/A

N/A

Yes

MPLS → MPLS (LSR)

Yes

No

N/A

N/A

No

MPLS → term (label TTL expiry)

Yes

N/A

No

No

No

MPLS → IP (PHP)

Yes

Yes

N/A

N/A

No

MPLS → IP (UHP)

Yes

Yes

N/A

N/A

Yes

MPLS → IP → term (IP address is local)

Yes

N/A

Yes

Yes

Yes

MPLS MTU

The MPLS MTU defines the maximum-sized MPLS packet that can be transmitted from a routed subinterface, including the size of the transmitted label stack (4 bytes * number of label stack entries). If an MPLS packet containing any payload exceeds this size, the packet is dropped.

SR Linux supports a system-wide default MPLS MTU value. If you configure a default MPLS MTU value, that value is programmed as the operational MPLS MTU on all IP interfaces of the system. The supported range for the default MPLS MTU is 1284 to 9496 bytes; default 1508 bytes.

In addition to the system-wide default MPLS MTU, you can configure a subinterface-level MPLS MTU, which applies to subinterfaces of type routed. The supported range for the subinterface-level MPLS MTU is 1284-9496 bytes. If no MPLS MTU is configured for a subinterface, the default MTU value is taken from the system-wide default MPLS MTU.

Each 7250 IXR IMM supports a maximum of four different MPLS MTU values. If a line card already has four different MPLS MTU values, and a fifth MPLS MTU value is configured for a subinterface on the same line card, the subinterface is brought down with the reason mpls-mtu-resource-exceeded.

Configuring the MPLS MTU

You can configure a system-wide default MPLS MTU value, and you can configure a subinterface-level MPLS MTU that applies to subinterfaces of type routed. The supported range for the MPLS MTU is 1284 to 9496 bytes; default 1508 bytes. If no MPLS MTU is configured for a subinterface, the default MPLS MTU value is taken from the system-wide MPLS MTU.

Configure a system-wide default MPLS MTU value

--{ + candidate shared default }--[  ]--
# info with-context system mtu
    system {
        mtu {
            default-mpls-mtu 4096
        }
    }

Configure an MPLS MTU for a routed subinterface

--{ + candidate shared default }--[  ]--
# info with-context interface ethernet-1/1 subinterface 1
    interface ethernet-1/1 {
        subinterface 1 {
            type routed
            admin-state enable
            mpls-mtu 4096
            ipv4 {
                admin-state enable
                address 192.168.11.1/30 {
                }
            }
            ipv6 {
                admin-state enable
                address 2001:1::192:168:11:1/126 {
                }
            }
        }
    }

Displaying MPLS MTU information

Use the info from state command to display MPLS MTU information.

Display the system-wide default MPLS MTU value

--{ + candidate shared default }--[  ]--
# info from state with-context system mtu default-mpls-mtu
    system {
        mtu {
            default-mpls-mtu 4096
        }
    }

Display the MPLS MTU for a subinterface

--{ + candidate shared default }--[  ]--
# info from state with-context interface ethernet-1/1 subinterface 1 mpls-mtu
    interface ethernet-1/1 {
        subinterface 1 {
            mpls-mtu 4096
        }
    }

TTL propagation and TTL expiry

SR Linux supports the Uniform model for TTL propagation as described RFC 3032 and RFC 3443. The Uniform model makes all the nodes that an LSP traverses visible to nodes outside the tunnel.

ICMP extensions for MPLS

Note: This feature is supported on 7250 IXR devices.

SR Linux MPLS support includes ICMP extensions for transit LSRs and egress LERs.

The ICMP extensions, defined in RFC 4950, are by default always enabled.

ICMP extensions for transit LSRs

When a transit LSR receives an MPLS packet that cannot be forwarded (for example, the label TTL has expired or the egress subinterface MPLS MTU was exceeded), the packet is extracted to the CPM, which attempts to find an IP packet under the remaining label stack. If an IP packet is found, the CPM generates the appropriate error message, such as time-exceeded, destination-unreachable, or parameter-problem.

For time-exceeded and destination-unreachable messages only, the CPM generates a multipath ICMPv4/ICMPv6 time-exceeded message with the label stack object of RFC 4950. This object encodes the entire MPLS label stack as it was received by the LSR that sends the ICMP message and at least 128 bytes of the original datagram (zero padded to this length if necessary).

Configuring ICMP tunneling

ICMP tunneling is disabled by default. You can enable it for transit LSRs; on egress LERs, the setting for the icmp-tunneling option is not relevant.

If the icmp-tunneling option is disabled, all ICMP messages (including but not limited to multipath ICMP messages constructed according to RFC 4950) are injected into the default network instance for forwarding back to the source. The attempt to find a route to the source may be unsuccessful however.

If the icmp-tunneling option is enabled, all ICMP messages (including but not limited to multipath ICMP messages constructed according to RFC 4950) are injected in the forward direction of the LSP (that is, by re-adding the received label stack, resetting the MPLS TTL in all label stack entries to 255, and performing an ILM lookup on the top label). The source address of the ICMP message is an IP address of the LSR.

The following example enables ICMP tunneling for a transit LSR.

--{ + candidate shared default }--[  ]--
# info with-context network-instance default
    network-instance default {
        mpls {
            icmp-tunneling true
        }
    }

ICMP extensions for egress LERs

If the egress LER receives an MPLS packet that cannot be forwarded (for example, the label TTL has expired, the IP TTL has expired, or the egress subinterface IP MTU was exceeded) the packet is extracted to the CPM with an indication of the network-instance associated with the last popped label. The CPM generates the appropriate ICMP error message, such as time-exceeded, destination-unreachable, and so on.

For time-exceeded and destination-unreachable messages only, the CPM generates a multipath ICMPv4/ICMPv6 time-exceeded message with the label stack object of RFC4950. This object encodes the entire MPLS label stack as it was received by the egress LER and at least 128 bytes of the original datagram (zero padded to this length if necessary).

All ICMP messages (including but not limited to multipath ICMP messages constructed according to RFC 4950) are injected into the network instance associated with the last popped label for forwarding back to the source.

If the egress LER receives an MPLS packet, pops the remaining label stack, and finds an IP packet that must be forwarded to a host address on a local subnet, the packet may be queued if there is no ARP entry for the host address. If ARP cannot learn the MAC address of the host after about 3 seconds, the egress LER sends a destination-unreachable/host-unreachable message back to the source.

Label values

A packet traveling along an LSP is identified by its label, the 20-bit unsigned integer. The range is 0 to 1 048 575. Label values 0 to 31 are reserved and are defined as follows:

  • A value of 0 represents the IPv4 explicit null label. It indicates that the label stack must be popped, and the packet forwarding must be based on the IPv4 header.

  • A value of 1 represents the router alert label. The label value is legal anywhere in the label stack except at the bottom. When a received packet contains this label value at the top of the label stack, it is delivered to a local software module for processing. Packet forwarding is determined by the label beneath it in the stack. However, if the packet is further forwarded, the router alert label is pushed back onto the label stack before forwarding. The use of this label is analogous to the use of the router alert option in IP packets. Because this label cannot typically occur at the bottom of the stack, it is not associated with a specific network layer protocol.

    Note: The router alert label can occur at the bottom of the stack when some operations, administration, and management (OAM) tools are used.
  • A value of 3 represents the implicit null label. It is a label that a Label Switching Router (LSR) can assign and distribute, but which does not appear in the encapsulation. When an LSR would otherwise replace the label at the top of the stack with a new label, but the new label is implicit null, the LSR pops the stack instead of doing the replacement. Although this value may never appear in the encapsulation, it needs to be specified in the LDP protocol, so a value is reserved.

  • A value of 7 represents the Entropy Label Indicator (ELI) which precedes the actual Entropy Label (EL) that carries the entropy value of the packet in the label stack.

  • Values 4 to 6 and 8 to 31 are reserved for future use.

The router uses labels for MPLS, LDP, BGP Label Unicast, Segment Routing, as well as packet-based services such as VLL and VPLS.

To enable SR-MPLS features on SR Linux nodes, you must allocate a label range to the Segment Routing Global Block (SRGB). Other applications that require labels, such as LDP, can then be configured with a dynamic label block.

Configuring null label for static tunnels

For dynamic tunnels, SR Linux nodes honor reception of null label advertisement, meaning that the nodes push a null label when transmitting (or with implicit null, skip the push of the outermost tunnel label). However, SR Linux nodes do not support advertisement of null labels with dynamic tunnels.

For static tunnels, SR Linux supports the push of null labels using the nexthop pushed-mpls-label-stack command.

Note: Null labels are supported on 7250 IXR platforms.

To enable IPV4_EXPLICIT_NULL, IPV6_EXPLICIT_NULL, or IMPLICIT_NULL for a next-hop group, use the pushed-mpls-label-stack command.

The explicit null label option indicates that the label stack must be popped, and the packet forwarding must be based on the IP header.

The implicit null label option allows an egress LER to receive MPLS packets from the previous hop without the outer LSP label. The operation of the previous hop is referred to as penultimate hop popping (PHP). This option is signaled by the egress LER to the previous hop during the FEC signaling by the LDP control protocol.

In addition, the egress LER can be configured to receive MPLS packets with the implicit null label on a static LSP. LDP must be shut down before changing the implicit null configuration option.

Enable IPv4 explicit null label for next-hop group

The following example enables IPv4 explicit null labels for next-hop group null-group.

--{ candidate shared default }--[  ]--
# info network-instance default next-hop-groups group null-group
    network-instance default {
        next-hop-groups {
            group null-group {
                nexthop 1 {
                    resolve false
                    pushed-mpls-label-stack [
                        IPV4_EXPLICIT_NULL
                    ]
                }
            }
        }
    }

MPLS ECMP

The following sections describe MPLS ECMP options for SR Linux.

MPLS LSR ECMP (7250 IXR platforms)

SR Linux supports two options to perform MPLS ECMP packet hashing:

  • LSR label-only hash (default)
  • LSR label hash with Ethernet or IP headers (with L4 and TEID)

LSR label-only hash

By default, MPLS packet hashing at an LSR is based on the whole label stack, along with the incoming port and system IP address. With this label-only hash option, the system hashes the packet using up to 14 labels in the MPLS stack.

The system uses the net result to select which LSP next-hop to send the packet to using a modulo operation of the hash result with the number of next-hops.

This same result feeds to a second round of hashing if there is a LAG on the egress port where the selected LSP has its NHLFE programmed.

LSR label hash with Ethernet or IP headers (with L4 and TEID)

With the LSR label hash option with Ethernet or IP headers (with L4 and TEID), the datapath performs Ethernet speculation after the bottom of the label stack or when the maximum label stack depth is reached. Regardless of the outcome of the Ethernet speculation, the system also attempts IPv4/IPv6 speculation by checking the first nibble after the bottom of the label stack to include the following in the hash:
  • source and destination IP address
  • UDP/TCP source and destination ports
  • GPRS tunneling protocol (GTP) tunnel endpoint identifier (TEID) when the UDP or TCP port is 2123 or 2152

If Ethernet header speculation is successful, source and destination MAC are included in the hash along with up to two VLANs.

Configuring MPLS ECMP hashing options

To configure MPLS ECMP hashing options on an LSR, use the system load-balancing lsr-profile command.

Enable the label-only hash option

The following example enables the label-only hash option on an LSR.

--{ candidate shared default }--[  ]--
# system load-balancing lsr-profile label-stack

Enable the LSR label hash option with Ethernet or IP headers (with L4 and TEID)

The following example enables the LSR label option with Ethernet or IP headers (with L4 and TEID) on an LSR.

--{ candidate shared default }--[  ]--
# system load-balancing lsr-profile label-eth-or-ip-l4-teid

Show reports for MPLS tunnel tables

You can issue a show command to display information about MPLS tunnel table entries. You can adjust the output of the report to filter by address type, encapsulation type, tunnel type, and destination prefix.

The following is an example of output from the show report.

--{ * candidate shared default }--[  ]--
# show network-instance default tunnel-table all
---------------------------------------------------------------------------------------------------
IPv4 tunnel table of network-instance "base"
--------------------------------------------------------------------------------------------------------
+-------------+-------+-------------+-----------+-----+--------+------+----------------+----------+
| IPv4 Prefix | Encap | Tunnel Type | Tunnel ID | FIB | Metric | Pref | Next-hop (Type)| Next-hop |
|             | Type  |             |           |     |        |      |                |          |
+=============+=======+=============+===========+=====+========+======+================+==========+
| 1.1.1.3/32  | mpls  | ldp         | 65629     | Y   | 2000   | 9    | 1.3.2.3 (mpls) | lag1.1   |
|             |       |             |           |     |        |      | 1.3.3.3 (mpls) | lag1.2   |
|             |       |             |           |     |        |      | 1.3.4.3 (mpls) | lag1.3   |
|             |       |             |           |     |        |      | 1.3.5.3 (mpls) | lag1.4   |
| 1.1.1.4/32  | mpls  | ldp         | 65631     | Y   | 2006   | 9    | 1.7.1.4 (mpls) | lag7.1   |
|             |       |             |           |     |        |      | 1.7.2.4 (mpls) | lag7.2   |
|             |       |             |           |     |        |      | 1.7.3.4 (mpls) | lag7.3   |
|             |       |             |           |     |        |      | 1.7.4.4 (mpls) | lag7.4   |
| 1.1.1.5/32  | mpls  | ldp         | 65630     | Y   | 2007   | 9    | 1.8.2.5 (mpls) | lag8.1   |
|             |       |             |           |     |        |      | 1.8.3.5 (mpls) | lag8.2   |
|             |       |             |           |     |        |      | 1.8.4.5 (mpls) | lag8.3   |
|             |       |             |           |     |        |      | 1.8.5.5 (mpls) | lag8.4   |
+-------------+-------+-------------+-----------+-----+--------+------+----------------+----------+

TTM preferences for supported tunnel types

The following table summarizes the TTM preferences for all supported tunnel types on the 7250 IXR systems.
Table 2. TTM preferences for supported tunnel types
Tunnel type TTM preference
Uncolored SR-MPLS TE-Policy 8
LDP 9
SR-ISIS 11
BGP (LU) 12
Colored SR-MPLS TE-Policy 14