Static Routes Label Binding
In this post we will be discussing the label binding for static routes and the forwarding of labeled packets destined to these destinations.
IP routing protocols build the IP routing table, and each LSR assigns a label to every destination in its IP routing table independently (Independent LSP Control - Connected, static or learned dynamically via IGP) , afterwards the LSRs announce their assigned labels to all other LSRs (Unsolicited Downstream Label Distribution), then every LSR receives the label binding information from the downstream LSRs and store it in the LIB table (Liberal Label Retention Mode), then each LSR picks up one or more labels (according to the routing table - best path) from the LIB to build the MFI and the FIB data structures which are finally used by the LSRs to forward labeled packets.
The label allocation for static routes and how the labeled packets destined to this destinations are treated differs according to the outgoing interface type and according to how was the static route configured (using outgoing interface or using next-hop), and finally also the allocation methodology will differ according to whether the outgoing interface is MPLS enabled or not - MPLS is required generally for inter-AS scenarios, or when LDP is enabled on the interface (normal IPv4 over MPLS).
Part1 - Static Routes Label Binding on Multi-Access Interfaces
In this part we will discuss the label binding procedures for the below cases:
A- Static route pointing to the outgoing interface
B- Static route pointing to the Next-Hop IP address
C- Static route pointing to the outgoing interface with MPLS enabled
D- Static route pointing to the Next-hop IP address while MPLS is enabled
A) Static route pointing to the outgoing interface
The LSR consider any static route pointing to outgoing multi-access interface as directly connected route, by default the LSR running Cisco IOS assigns the implicit NULL label (Label 3) to its connected and summarized prefixes, therefor a static route pointing to outgoing multi-access interface advertised to all upstream LSRs with Label 3 thus requesting the upstream LSR to perform a pop operation, so any packets received on the PHP router with one label in the label stack the PHP router will remove the the label header and perform routing lookup based on th destination address in the Layer 3 header (IPv4 packets), but if the packet received on the PHP router with 2 labels in the label stack (e.g MPLS VPN / MPLS AToM) the PHP router will POP the TOP label and send the packet out to the downstream LSR with only one label in the label stack.
Configuration example for a static route pointing to Fastethernet interface.
! interface FastEthernet0/0 ip address 145.1.1.1 255.255.255.252 ! ip route 140.1.255.2 255.255.255.255 FastEthernet0/0 ! Downstream-LSR#show mpls ip bind 140.1.255.2 32 140.1.255.2/32 in label: imp-null Upstream-LSR#show mpls forwarding-table 140.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 22 Pop Label 140.1.255.2/32 0 Gi2/0 150.1.2.1
Configuration example for a static route pointing to Serial interface.
! interface Serial4/0 ip address 145.1.3.1 255.255.255.252 encapsulation frame-relay frame-relay map ip 140.1.255.2 16 frame-relay interface-dlci 16 frame-relay intf-type dce ! ip route 140.1.255.2 255.255.255.255 Serial4/0 ! Downstream-LSR#show mpls ip binding 140.1.255.2 32 140.1.255.2/32 in label: imp-null out label: 25 lsr: 150.255.255.1:0 Upstream-LSR#show mpls forwarding-table 140.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 25 Pop Label 140.1.255.2/32 0 Gi2/0 150.1.2.1
B) Static route pointing to the Next-Hop IP address
In this part we will discuss the label binding procedures for the static routes using the outgoing interface IP address in the next-hop attribute. a static route pointing to the next-hop IP address across multi-access interface has an outgoing label of "No Label" so the MPLS header of the labeled packets destined to this networks will removed before sending these packets out to the next-hop (the next hop router will receive IPv4 traffic)
Configuration example for a static route pointing to Next-Hop IP address (FastEthernet Interface)
! interface FastEthernet0/0 ip address 145.1.1.1 255.255.255.252 ! ip route 145.1.255.2 255.255.255.255 145.1.1.2 ! Downstream-LSR#show mpls forwarding-table 140.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 16 No Label 140.1.255.2/32 0 Fa0/0 145.1.1.2 Upstream-LSR#show mpls forwarding-table 140.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 22 16 140.1.255.2/32 0 Gi2/0 150.1.2.1
Configuration example for a static route pointing to Next-Hop IP address (Serial interface)
! interface Serial4/0 ip address 145.1.3.1 255.255.255.252 encapsulation frame-relay frame-relay map ip 140.1.255.2 16 frame-relay interface-dlci 16 frame-relay intf-type dce ! ip route 145.1.255.2 255.255.255.255 145.1.3.2 ! Downstream-LSR#show mpls forwarding-table 145.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 22 No Label 145.1.255.2/32 0 Se4/0 145.1.3.2 Upstream-LSR#show mpls forwarding-table 145.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 27 22 145.1.255.2/32 0 Gi2/0 150.1.2.1
C) Static route pointing to the outgoing interface with MPLS enabled
in this part we will discuss how the label allocation and forwarding treatment will be changed when the outgoing interface of the egress LSR is MPLS enabled, MPLS enabled meaning the interface have MPLS BGP Forwarding (Inter-AS application) or MPLS IP (Multi MPLS applications)
Configuration example for a static route pointing to Fastethernet interface with MPLS Enabled
! interface FastEthernet0/0 ip address 145.1.1.1 255.255.255.252 mpls bgp forwarding ! ip route 140.1.255.2 255.255.255.255 FastEthernet0/0 ! Downstream-LSR#show mpls ip bind 140.1.255.2 32 140.1.255.2/32 in label: imp-null Upstream-LSR#show mpls forwarding-table 140.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 22 Pop Label 140.1.255.2/32 0 Gi2/0 150.1.2.1 ! interface FastEthernet0/0 ip address 145.1.1.1 255.255.255.252 mpls ip ! ip route 140.1.255.2 255.255.255.255 FastEthernet0/0 ! Downstream-LSR#show mpls ip bind 140.1.255.2 32 140.1.255.2/32 in label: imp-null Upstream-LSR#show mpls forwarding-table 140.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 22 Pop Label 140.1.255.2/32 0 Gi2/0 150.1.2.1
Configuration example for a static route pointing to Serial interface with MPLS Enabled
! interface Serial4/0 ip address 145.1.3.1 255.255.255.252 encapsulation frame-relay frame-relay map ip 140.1.255.2 16 broadcast frame-relay map ip 145.1.3.2 16 broadcast frame-relay intf-type dce mpls bgp forwarding ! ip route 140.1.255.2 255.255.255.255 Serial4/0 ! Downstream-LSR#show mpls ip binding 140.1.255.2 32 140.1.255.2/32 in label: imp-null out label: 25 lsr: 150.255.255.1:0 Upstream-LSR#show mpls forwarding-table 140.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 25 Pop Label 140.1.255.2/32 0 Gi2/0 150.1.2.1 ! interface Serial4/0 ip address 145.1.3.1 255.255.255.252 encapsulation frame-relay frame-relay map ip 140.1.255.2 16 broadcast frame-relay map ip 145.1.3.2 16 broadcast frame-relay intf-type dce mpls ip ! ip route 140.1.255.2 255.255.255.255 Serial4/0 ! Downstream-LSR#show mpls ip binding 140.1.255.2 32 140.1.255.2/32 in label: imp-null out label: 25 lsr: 150.255.255.1:0 Upstream-LSR#show mpls forwarding-table 140.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 25 Pop Label 140.1.255.2/32 0 Gi2/0 150.1.2.1
D) Static route pointing to the Next-hop IP address while MPLS is enabled
In this part we will discuss the label binding procedures for the static routes using the outgoing interface IP address in the next-hop attribute while MPLS is enabled, a static route pointing to the next-hop IP address across multi-access interface has an outgoing label of "POP label"
Configuration example for a static route pointing to the Fastethernet Next-Hop IP Address ( with MPLS Enabled)
!interface FastEthernet0/0 ip address 145.1.1.1 255.255.255.252 mpls ip ! ip route 140.1.255.2 255.255.255.255 145.1.1.2 ! Downstream-LSR#show mpls forwarding-table 140.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 22 Pop Label 140.1.255.2/32 0 Fa0/0 145.1.1.2 Upstream-LSR#show mpls forwarding-table 140.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 25 22 140.1.255.2/32 0 Gi2/0 150.1.2.1 ! interface FastEthernet0/0 ip address 145.1.1.1 255.255.255.252 mpls bgp forwarding ! ip route 140.1.255.2 255.255.255.255 145.1.1.2 ! ASBR-AS1#show mpls forwarding-table 140.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 22 No Label 140.1.255.2/32 0 Fa0/0 145.1.1.2
As you notice above while using mpls bgp forwarding the outgoing label still "No label" so the labeled packets will be sent out this interface as IPv4
packets, this can introduced data plan problem in Inter-AS option 2C since the traffic will leave the ASBR unlabeled, so i this case we can use MPLS static
binding as a work around for this issue.
! interface FastEthernet0/0 ip address 145.1.1.1 255.255.255.252 mpls bgp forwarding ! ip route 140.1.255.2 255.255.255.255 145.1.1.2 ! mpls static binding ipv4 1.1.1.1 255.255.255.255 output 145.1.1.1 implicit-null ! ASBR-AS1#show mpls forwarding-table 140.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 22 POP Label 140.1.255.2/32 0 Fa0/0 145.1.1.2
Configuration example for a static route pointing to the serial Next-Hop IP Address ( with MPLS Enabled)
In the first case the serial interface has MPLS BGP Forwarding enabled but the route still have an outgoing label of "No label" so in point-to-point model
is it's no applicable to enable MPLS IP on the interface, it's recommend to configure the static route pointing to the outgoing interface rather than the
next-hop ip address.
Not Recommended
! interface Serial4/0 ip address 145.1.3.1 255.255.255.252 encapsulation frame-relay frame-relay map ip 140.1.255.2 16 broadcast frame-relay map ip 145.1.3.2 16 broadcast frame-relay intf-type dce mpls bgp forwarding ! ip route 140.1.255.2 255.255.255.255 145.1.3.2 ! Downstream-LSR#show mpls ip binding 140.1.255.2 32 140.1.255.2/32 in label: imp-null out label: 25 lsr: 150.255.255.1:0 Upstream-LSR#show mpls forwarding-table 140.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 25 No Label 140.1.255.2/32 0 Gi2/0 150.1.2.1
The Recommend solution
! interface Serial4/0 ip address 145.1.3.1 255.255.255.252 encapsulation frame-relay frame-relay map ip 140.1.255.2 16 broadcast frame-relay map ip 145.1.3.2 16 broadcast frame-relay intf-type dce mpls ip ! ip route 140.1.255.2 255.255.255.255 145.1.3.2 ! Downstream-LSR#show mpls ip binding 140.1.255.2 32 140.1.255.2/32 in label: imp-null out label: 25 lsr: 150.255.255.1:0 Upstream-LSR#show mpls forwarding-table 140.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 25 Pop Label 140.1.255.2/32 0 Gi2/0 150.1.2.1
Part2 - Static Routes Label Binding on point-to-Point Interfaces
in this part we will discuss the label binding procedures for the below cases.
A- Static route pointing to the outgoing interface
B- Static route pointing to the Next-Hop Ip address
C- Static route pointing to the outgoing interface with MPLS enabled
D- Static route pointing to the Next-hop IP address while MPLS is enabled
A) Static route pointing to the outgoing interface
a static route pointing to physical interface (point-to-point interface/sub-interface of ATM/Serial/Hssi..etc) by default has an outgoing label of "No Label" and local label equal to the locally generated label, the LSR will also advertise the local generated label to the upstream LSRs, therefor the upstream LSR will swap the labled packets rather than remove the TOP label.
! interface ATM5/0.1 point-to-point ip address 145.1.4.1 255.255.255.252 pvc 0/1 oam-pvc manage encapsulation aal5snap ! ip route 140.1.255.2 255.255.255.255 atm5/0.1 ! Downstream-LSR#show mpls forwarding-table 140.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 16 No Label 140.1.255.2/32 0 AT5/0.1 point2point Upstream-LSR#show mpls forwarding-table 140.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 22 16 140.1.255.2/32 0 Gi2/0 150.1.2.1
B) Static route pointing to the Next-Hop IP address
a static route pointing to physical interface (point-to-point interface/sub-interface of ATM/Serial/Hssi..etc) by default has an outgoing label of
"No Label" and local label equal to the locally generated label, the LSR will also advertise the local generated label to the upstream LSRs, therefor
the upstream LSR will swap the labled packets rather than remove the TOP label.
! interface ATM5/0.1 point-to-point ip address 145.1.4.1 255.255.255.252 pvc 0/1 oam-pvc manage encapsulation aal5snap ! ip route 145.1.255.2 255.255.255.255 145.1.4.2 ! interface Serial4/0.17 point-to-point ip address 145.1.17.1 255.255.255.252 frame-relay interface-dlci 17 ! ip route 145.1.255.2 255.255.255.255 145.1.17.2 ! Downstream-LSR#show mpls forwarding-table 145.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 22 No Label 145.1.255.2/32 0 AT5/0.1 point2point No Label 145.1.255.2/32 0 Se4/0.17 point2point Upstream-LSR#show mpls forwarding-table 145.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 27 22 145.1.255.2/32 0 Gi2/0 150.1.2.1
C) Static route pointing to the outgoing interface with MPLS enabled
! interface ATM5/0.1 point-to-point ip address 145.1.4.1 255.255.255.252 pvc 0/1 oam-pvc manage encapsulation aal5snap mpls bgp forwarding ! ip route 145.1.255.2 255.255.255.255 ATM5/0.1 ! interface Serial4/0.17 point-to-point ip address 145.1.17.1 255.255.255.252 frame-relay interface-dlci 17 mpls bgp forwarding ! ip route 145.1.255.2 255.255.255.255 serial4/0.17 ! ASBR-AS1#show mpls forwarding-table 140.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 22 Pop Label 140.1.255.2/32 0 AT5/0.1 point2point Pop Label 140.1.255.2/32 0 Se4/0.17 point2point ! interface ATM5/0.1 point-to-point ip address 145.1.4.1 255.255.255.252 pvc 0/1 oam-pvc manage encapsulation aal5snap mpls ip ! ip route 145.1.255.2 255.255.255.255 ATM5/0.1 ! interface Serial4/0.17 point-to-point ip address 145.1.17.1 255.255.255.252 frame-relay interface-dlci 17 mpls ip ! ip route 145.1.255.2 255.255.255.255 serial4/0.17 ! ASBR-AS1#show mpls forwarding-table 140.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 22 Pop Label 140.1.255.2/32 0 AT5/0.1 point2point Pop Label 140.1.255.2/32 0 Se4/0.17 point2point
D) Static route pointing to the Next-hop IP address while MPLS is enabled
in this part we will discuss how the label allocation and forwarding treatment will be changed when the outgoing interface of the egress LSR is MPLS enabled,
MPLS enabled meaning the interface have MPLS BGP Forwarding (Inter-AS application) or MPLS IP (Multi MPLS applications)
! interface ATM5/0.1 point-to-point ip address 145.1.4.1 255.255.255.252 pvc 0/1 oam-pvc manage encapsulation aal5snap mpls bgp forwarding ! ip route 145.1.255.2 255.255.255.255 145.1.4.2 ! interface Serial4/0.17 point-to-point ip address 145.1.17.1 255.255.255.252 frame-relay interface-dlci 17 mpls bgp forwarding ! ip route 145.1.255.2 255.255.255.255 145.1.17.2 ! Downstream-LSR#show mpls forwarding-table 145.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 22 No Label 145.1.255.2/32 0 AT5/0.1 point2point No Label 145.1.255.2/32 0 Se4/0.17 point2point Upstream-LSR#show mpls forwarding-table 145.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 27 22 145.1.255.2/32 0 Gi2/0 150.1.2.1 ! interface ATM5/0.1 point-to-point ip address 145.1.4.1 255.255.255.252 pvc 0/1 oam-pvc manage encapsulation aal5snap mpls ip ! ip route 145.1.255.2 255.255.255.255 145.1.4.2 ! interface Serial4/0.17 point-to-point ip address 145.1.17.1 255.255.255.252 frame-relay interface-dlci 17 mpls ip ! ip route 145.1.255.2 255.255.255.255 145.1.17.2 ! ASBR-AS1#show mpls forwarding-table 140.1.255.2 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 22 Pop Label 140.1.255.2/32 0 AT5/0.1 point2point Pop Label 140.1.255.2/32 0 Se4/0.17 point2point
Mounir Mohamed, CCIE#19573