MPLS Fundamentals: 1 – Architecture

  • Ingress LSRs —Ingress LSRs receive a packet that is not labeled yet, insert a label (stack) in front of the packet, and send it on a data link. One that is doing imposition is an ingress LSR
  • Egress LSRs—Egress LSRs receive labeled packets, remove the label(s), and send them on a data link. Ingress and egress LSRs are edge LSRs. One that does disposition is an egress LSR.

A Forwarding Equivalence Class (FEC) is a group or flow of packets that are forwarded along the same path and are treated the same with regard to the forwarding treatment.

The same FEC have the same label. However, not all packets that have the same label belong to the same FEC, because their EXP values might differ; the forwarding treatment could be different, and they could belong to a different FEC. The router that decides which packets belong to which FEC is the ingress LSR. This is logical because the ingress LSR classifies and labels the packets.

All packets with a destination IP address for which the IP lookup in the routing table recourses to the same BGP next-hop address will be mapped to the same FEC.

Labels are local to each pair of adjacent routers.

The implementation for distance vector routing protocols (such as EIGRP) is straightforward, because each router originates a prefix from its routing table. The router then just binds a label to that prefix.

For link state routing protocols, a separate protocol is preferred to distribute the labels.

BGP is a routing protocol that can carry prefixes and distribute labels at the same time.

These received bindings become remote bindings. The neighbors then store these remote and local bindings in a special table, the label information base (LIB).

You can have one label per prefix or one label per prefix per interface, but the LSR gets more than one remote binding because it usually has more than one adjacent LSR.

The routing table (sometimes called the routing instance base, or RIB) determines what the next hop of the IPv4 prefix is. The LSR chooses the remote binding received from the downstream LSR, which is the next hop in the routing table for that prefix. It uses this information to set up its label forwarding information base (LFIB) where the label from the local binding serves as the incoming label and the label from the one remote binding chosen via the routing table serves as the outgoing label.

LDP does not bind labels to BGP IPv4 prefixes.

All these remote bindings are found in the LIB. The LFIB chooses only one of the possible outgoing labels from all the possible remote bindings in the LIB and installs it in the LFIB. The remote label chosen depends on which path is the best path found in the routing table.

It is the egress LSR that created the label binding for that FEC, and it knows what that FEC is.

  • Independent LSP Control mode: In this control mode, each LSR creates a local binding for a particular FEC as soon as it recognizes the FEC. Usually, this means that the prefix for the FEC is in its routing table.
  • Ordered LSP Control mode: an LSR only creates a local binding for a FEC if it recognizes that it is the egress LSR for the FEC or if the LSR has received a label binding from the next hop for this FEC.

If the LSR were running in Independent LSP Control mode, it would assign a local binding for each IGP prefix in the routing table. If the LSR were running in Ordered LSP Control mode, this LSR would only assign a local label binding for the IGP prefixes that are marked as connected in its routing table and also for the IGP prefixes for which it has already received a label binding from the next-hop router (as noted in the routing table). Cisco IOS uses Independent LSP Control mode. ATM switches that are running Cisco IOS use Ordered LSP Control mode by default.

The label stack sits in front of the transported packet. If the transported packet is an IP packet, the label stack is behind the Layer 2 header but before the IP header.

An ordered sequence of LSRs is a label switched path (LSP). A Forwarding Equivalence Class (FEC) is a group or flow of packets that receive the same forwarding treatment throughout the MPLS network. The FEC is thus determined by the label stack and the EXP bits in the label.

The LIB is the table that stores the label bindings, whereas the LFIB is the lookup table that forwards labeled packets.

Share this!

MPLS Fundamentals: 3 – LDP

Basic MPLS LDP Configuration group IP multicast address. The UDP port used for LDP is 646.

LDP Discovery

show mpls ldp discovery detail
show mpls ldp discovery detail
show mpls interfaces
show mpls interfaces

LDP discovery timers manipulation

mpls ldp discovery {hello {holdtime | interval } seconds

The default value for holdtime is 15 seconds for link Hello messages, and the default value for interval is 5 seconds.
If the two LDP peers have different LDP Hold times configured, the smaller of the two values is used as the Hold time for that LDP discovery source.

Cisco IOS might overwrite the configured LDP Hello interval. It will choose a smaller LDP Hello interval than configured so that it can send at least three LDP Hellos before the Hold time expires. (At least nine Hellos are sent in the case of a targeted LDP session)

Continue reading “MPLS Fundamentals: 3 – LDP”

Share this!

IPExpert CoD: MPLS & LDP

This post contains my notes from an old version of IPX Class on Demand by Joe Astorino.

# hiding MPLS topology by just incrementing TTL 1 time when reaching the CE
router(config)# no ip mpls propagate-ttl

MPLS MTU is automatically decreased on LAN interfaces and increased on WAN interfaces.

Default mpls mtu is 1512 which supports 3 labels; MPLS MTU can be set by mpls mtu x

LDP router-id should be routable on network.

Connected routes are advertised as implicit-null label for PHP on upstream router

router(config)# mpls ldp neighbor ip labels accept acl
router(config)# mpls ldp tcp pak-priority //Kinda like setting QoS for LDP
#Like "ip accounting"
router(config-if)# mpls accounting experimental input/output
router(config-if)# mpls netflow egress
router# show mpls ldp binding // LIB
router# show mpls forwarding table // LFIB
router# show ip route // RIB
router# show ip cef ip detail //FIB

To clear LIB:

router(config)# no mpls ip
router(config)# mpls ip

PHP is the default.

Share this!

MPLS Building Blocks

IP routers make forwarding decision based on IP packet header, and local CEF and FIB table.
MPLS routers make forwarding decision based on the MPLS label and the LFIB .
MPLS is great technology these days not because it forwards the packets faster , but because of applications and solutions we can provide for our customers like MPLS VPN’s .


MPLS uses the IP routing information to determine the direction and next hop to forward a labeled packet .

Does this before the first packet even arrives.

Continue reading “MPLS Building Blocks”

Share this!