Monday, April 9, 2012

MPLS Forwarding Table


Outgoing label or VC
  • no label means MPLS is not enable on that interface
  • Pop label means MPLS is enabled and MPLS was enabled on directly connected interface.
  • Digit indicates the remote interfaces on which MPLS is enabled

MPLS Applications

  • MPLS change network design 
    • by eliminating the need for an Overlay (full mesh of routers).
  • Performance is improved 
    • because packets are switched instead of routed.
  • QoS can be implemented end to end
    • by having an PE router classify packets & map a value to the Experimental (EXP) field of the MPLS label stack.
  • Traffic Engineering is made possible through label stacking & traffic-engineered tunnels.

MPLS OPERATION


  • Unlabeled packet enter into the service provider network via PE router.
  • PE router add label impose a label to the unlabeled packet & then forward to the P router(also known as LSR) along the Label Switch Path(LSP) in the core network of service provider.
  • In the core network of service provider each P routers forward the packet by swapping the labels along the LSR learned by protocol LDP.
  • At other end when leaving service provider network PE router (also known as Edge-LSR) pops the label by mechanism called Penultimate Hop Popping.
  • Penultimate meaning is "next to last"
  • last hop in the service provider network must
    • look up MPLS label
    • POP MPLS label
    • Look for IPv4 destination
  • PHP avoids extra look up for MPLS label on last hop
  • For this implict NULL label was advertised

MPLS Architecture


  • Labels are bound to routes in the routing table
  • MPLS architecture components:
    • Control plane
    • Forwarding plane
  • CONTROL:
    • Responsible for 
      • binding a label to network routes
        • for this we need routing table
        • to get routing table we need a routing protocol
      • and distribute those bindings among other MPLS enabled routers
        • for this 2 protocols are used
          • TDP
          • LDP
    • Tag Distribution Protocol(TDP):
      • Cisco proprietary protocol
      • used to bind tags to network routes in the routing table.
  • FORWARDING:
    • The routing table is built in the control plane & cached in forwarding plane.
    • Forward Information Base is built by CEF.
    • FIB is a cached version of the ip routing table that eliminates the need for a lookup of routing table.
    • Router compares the packet's destination ip address to the CEF FIB, ignore the ip routing table.
    • CEF optimizes the organization of FIB, so that router easily find the correct FIB entry,
      • resulting in a smaller forwarding delay & high volume of packets per second through a router.
    • For each packet, the router finds the matching FIB entry,
      • then finds the adjacency table entry referenced by the matching FIB entry, 
      • and forward the packet

      •  

Sunday, April 8, 2012

MPLS Header & Label


  • The MPLS header is 4-byte header,
    • located immediately before the IP header
    • also referred as MPLS shim header 
  • MPLS label is actually a 20-bit field in the MPLS header.
  • MPLS Label or MPLS Label Stack (specifically)
  • Fields in MPLS Header are:
    • Label:
      • length is 20-bits,with 
      • identifies the potion of a LSP
    • EXP(Experiment):
      • 3-bits in length
      • Used to map the standard IP packet Type Of Service (TOS) into the Experimental field fro MPLS Class Of Service(COS)
      • only used for experimental purpose only
    • S(Stack bit):
      • MPLS labels are stacked one on other label.
      • to indicate last MPLS header before ip header
    • TTL(Time To Live)
      • The TTl field from the IP TTL is decremented by 1 & then copied into the MPLS label TTL field.
      • When exiting from the MPLS network, MPLS label TTL value is copied back to the IP TTL field
      • If this field is set to 0, the packet will be discarded
      • this field length is 8-bits
  • MPLS label stack Placement:
    • It is placed between Layer 2 header & Layer 3 header.
    • For this some times MPLS labels stack referred as shim header
    • Router forward packets based on the MPLS label header because it comes before the Layer 3 header.
    • In MPLS, ip packets are switched instead of routed.
  • "Labels are bound to routes in the routing table"
  • In label stack, the outer label is used to forward the packet along the LSP, inner label is used to identify the VPN site. 
  • This beneath label called as the VPN label