OSPF Sham Links Lab Tips

  • Without Sham Links – If two CE sites that are in the same OSPF area, in addition to the MPLS, are also connected by another link i.e. R3 is connected to Area 1 in Site 1 and Area 1 in Site 2, then this is known as the BACKDOOR link.
  • Traffic will be preferred over the backdoor link as routes will appear as INTRA-area routes and therefore will not prefer the MPLS link as those routes are seen as INTER-area or External routes (see below).
  • If both CE sites are in the same area, routes via MPLS will still be seen as Inter-Area routes due to the redistribution between MP-BGP and IGP into the VRF.
  • domain-id needs to match on both ends for routes, as per above, to be seen as Inter-Area routes otherwise it will be seen as External routes when redistribution occurs between MP-BGP and IGP.
  • With Sham Links will create a ‘virtual link’ between PE routers so that it is an extension of that area, i.e. say area 1. This now means the MPLS routes are now seen as INTRA area routers and or we need to do to prefer the MPLS link is to potentially manipulate the OSPF Cost (depending on link speed).
  • Building the Sham Link needs two /32 loopback addresses that has to be advertised by BGP inside the vrf.  This loopback must always be part of the vrf (ip vrf forwarding VRFNAME).
Click here for an excellent short video that explains sham-links and the above very well

MPLS Lab Tips

  • Router ID for BGP, LDP and OSPF should ALL match and be routable form the P routers..
  • As a best practice and to be on the safe side, always set your loopbacks for MPLS to /32 (especially in ospf using ip ospf network type point-to-point).
  • If using TDP be sure to include mpls label protocol tdp under the interface as well.
  • Can use mpls ldp discovery transport-address interface/ip to specify the source peering address which by default will be the highest loopback address.
  • mpls ldp router-id loopback 0 force is important otherwise higher loopback will reset the session.
  • RD keeps the routing table unique (overlapping subnets etc).
  • Route-Target assigns an import and export tag through use of dynamic routing e.g. BGP using extended community. You then use redistribute-connected under the address-family ipv4 unicast  VRF BGP process to bring those routes into that VRF domain. Don’t forget to activate the neighbour with neighbour x.x.x.x activate and add send-community both under the VPNV4 process / address-family vpnv4 unicast process.
  • Troubleshooting pings – Check mpls is enabled on all interface and the LDP/TDP relationship is formed on each interface and that show mpls fowarding-table shows a label or pop for the next hop.

MPLS Routing Protocols Lab Tips


  • Under the main EIGRP routing process you must do the following
  • – router eigrp 100
  • – address-family ipv4 vrf R4TEST
  • – autonomous-system 45 (puts it under a new AS)

MPLS Crib Notes

These are my ‘crib notes’ that I’ve made to serve as a last minute refresher. Please forgive the grammer / spelling as I did not develop these notes with publishing in mind


*** Theory ***

  • Nutshell – Tags packets so fewer layer 3 / route-table router lookups are needed. Can run in frame mode or cell (ATM) mode
  • Edge LSR (Entry / Exit points) – Performs routing lookup, assigns label and then sends to LSR. At the exit edge LSR a label lookup is done, only to realise there is no further label so the label is popped and then an IP look up is done to send the packet on its way.  These routers should be powerful. Also handles labelled and non-labelled networks
    • PHP – Instead of the exit edge LSR doing 2 lookups, we can make it more efficient by it requesting the downstream neighbour to pop the label instead so that it only has to do IP Lookup
  • LSR – Uses the label put on by edge LSR to route to next hop. No need to do route lookup. Does label lookup then a label swap
  • Label – Locally significant and identifies FEC. It is inserted between the L2 and L3 layer (aka 2.5). Local significance means multiple interfaces on the same router can use same label values. Label has 4 fields.
    • Label (20bits)
    • Experimental / CoS (3 bits) – Code of service
    • TTL (8 bits) – Time to Live
    • BOS (Bottom of stack, 1 bit) –
  • FEC – Forward Equivalent Class – Group of packets that is forward to the same next hop ip address & assigned the same level of treatment (QoS etc). Or is forwarded based on following;  Interface, IP Prec or DSCP, Src IP, Src or Dst port etc
  • Label Stack – Packet with more than 1 label. Typically used in MPLS VPNs to form encapsulations
  • pre-process – Label is binded to each route prefix. This is then shared to downstream MPLS routers using LDP, TDP , RVSP etc.
  • Process – E-LSR performs IP Lookup then assigns label (push). LSR looks up label table, swaps label to match downstream router and then forwards (swap). Exit E-LSR will remove (pop) label and send to customer. If a LSR has 2 potential next hops, the LSR will perform a label lookup in its LFIB that resides in the data plane. It will see what the upstream router has assigned as it label value and then place that value instead of it own when sending (swap)
    • Dropped packets – If a labelled packet comes in and has no entry in the FLIB. Exception is
      • Interim Packet Propagation – Time between a labelled packet arriving and time that the LSR has an entry in the FLIB for that label. In this case packet uses CEF. If not entry in FIB, then packet is finally dropped
  • Control Plane – Takes care of routing table. Label bindings are exchanged. Label binding allows LSR1 to know what label LSR2 is expecting. The control plane also has routing protocols.
    • LIB – Stores binding between local labels and FEC. Built via LDP/TDP. Sends these binding to neighbour
    • Routing Protocols
    • LDP UDP 646 (Industry and most popular) – Interface can run both LDP and TDP.
    • TDP TCP 711 (Cisco – being phased out) – Carries label information between LSR’s
    • RSVP – Reserve bandwidth for end-to-end for traffic engineering
  • Data / forwarding Plane – Handles forwarding of the traffic. Forwards by labels or address. It is a copy of the routing table but just in a different format
    • FIB – Has route table like information and is built via IGP
      • Distributed CEF – Uses multiple routers for CEF!
  • LFIB – Built by both IGP and LDP/TDP and performs the actual forwarding of labelled packets

  • LSP – Label Switch Path – The path the packet takes
  • Configuration – Must have CEF enabled. MTU should be changed to 1512. Enable MPLS via interface using  mpls ip
  • Before MPLS VPNS
    • Peer to peer – Client sends routes to ISP Edge router and that router shares it with all the other ISP routers. E.g. customer to edge is IGP. Then route redistribution into BGP to share with other routers
      • Bad – Can cause routing loops and have customers with overlapping subnets
  • Overlay – Provides VC but no routing services e.g. Frame Relay

  • MPLS VPNS – Allows MPLS for multiple customer s sharing the same ISP routers
    • VRF – Virtual Router & Forwarding Table – 1 Route table instance per customer = avoids overlapping subnets from different customers.
    • RD – Route Distinguisher – Unique 64 but attached to IP (vpnv4 prefix) & uses MPBGP on PE routers. So any overlapping subnets will have a unique prefix which mitigates this problem
    • BGP – Has attribute called RT. Route Target assigned the vpnv4 prefix

  • MTU – Must set to following otherwise could be seen as jumbo or giant frame which are frames that are dropped or fragmented.
    • PPPoE                                   = 1492
    • .1Q                                         = 1496
    • Ethernet                              = 1500
    • MPLS                                     = 1504
    • MPLS VPN                           = 1508 (As two labels are used)
    • MPLS VPNS + TE               =1512
    • Good practice for MPLS = 1512