Friday, February 15, 2019

MPLS Terminologies: LSR, LSP, FEC, LDP, RIB, LFIB, CEF

A label switch router (LSR) is a router that supports MPLS. It is capable of understanding MPLS labels and of receiving and transmitting a labeled packet on a data link.

A label switched path (LSP) is a sequence of LSRs that switch a labeled packet through an MPLS network or part of an MPLS network. Basically, the LSP is the path through the MPLS network or a part of it that packets take.

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.

Label Distribution Protocol (LDP) is label distribution protocol that distribute the labels for IGP prefixes. TDP, which predates LDP, was the first protocol for label distribution developed and implemented by Cisco. However, TDP is proprietary to Cisco. The IETF later formalized LDP.

The routing table (sometimes called the routing instance base, or RIB) determines what the next hop of the IPv4 prefix is.

The Label Forwarding Instance Base (LFIB) is the table used to forward labeled packets. It is populated with the incoming and outgoing labels for the LSPs.

In Cisco IOS, Cisco Express Forwarding (CEF) switching is the only IP switching mode that you can use to label packets. Other IP switching modes, such as fast switching, cannot be used, because the fast switching cache does not hold information on labels.


Here's a nice link explaining MPLS basic operation.


R2-P1#show mpls ?   
  discovery         Information about LSP discovery
  flow              MPLS netflow information
  forwarding-table  Show the Label Forwarding Table
  interfaces        Per-interface MPLS forwarding information
  ip                MPLS IP information
  l2transport       MPLS circuit transport info
  label             Label information
  ldp               Label Distribution Protocol information
  memory            Memory usage information
  oam               OAM information
  static            Show MPLS static information
  traffic-eng       Traffic engineering information

R2-P1#show mpls ldp ?
  backoff           LDP session setup backoff table
  bindings          Show the LDP Label Information Base (LIB)
  capabilities      Display LDP Capabilities information
  discovery         Display sources for locally generated LDP Discovery Hello
                    PDUs
  graceful-restart  Show Graceful Restart summary
  igp               IGP-related info
  neighbor          Display LDP neighbor information
  parameters        Display LDP configuration parameters

R2-P1#show mpls ldp neighbor
    Peer LDP Ident: 10.1.1.1:0; Local LDP Ident 10.2.2.2:0
        TCP connection: 10.1.1.1.646 - 10.2.2.2.59213
        State: Oper; Msgs sent/rcvd: 5235/5214; Downstream
        Up time: 3d04h
        LDP discovery sources:
          FastEthernet0/0, Src IP addr: 10.12.0.1
        Addresses bound to peer LDP Ident:
          10.12.0.1       10.1.1.1       
    Peer LDP Ident: 10.3.3.3:0; Local LDP Ident 10.2.2.2:0
        TCP connection: 10.3.3.3.24330 - 10.2.2.2.646
        State: Oper; Msgs sent/rcvd: 3250/3253; Downstream
        Up time: 1d23h
        LDP discovery sources:
          FastEthernet1/1, Src IP addr: 10.23.0.3
        Addresses bound to peer LDP Ident:
          10.34.0.3       10.23.0.3       10.3.3.3       


R2-P1#show mpls ldp binding 10.5.5.5 32
  lib entry: 10.5.5.5/32, rev 8
        local binding:  label: 202
        remote binding: lsr: 10.1.1.1:0, label: 102
        remote binding: lsr: 10.3.3.3:0, label: 317


R2-P1#show ip route 10.5.5.5     // R2-P2 CHOOSES R3-P2 TO REACH 10.5.5.5/32 (UNIDIRECTIONAL LSP)
Routing entry for 10.5.5.5/32
  Known via "ospf 1", distance 110, metric 4, type intra area
  Last update from 10.23.0.3 on FastEthernet1/1, 3d04h ago
  Routing Descriptor Blocks:
  * 10.23.0.3, from 10.5.5.5, 3d04h ago, via FastEthernet1/1
      Route metric is 4, traffic share count is 1


R2-P1#show mpls forwarding-table 10.5.5.5
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop   
Label      Label      or Tunnel Id     Switched      interface             
202        317        10.5.5.5/32      0             Fa1/1      10.23.0.3


R2-P1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R2-P1(config)#ip route 10.5.5.5 255.255.255.255 10.12.0.1     // BREAK/TEST LSP TO HOP R1
R2-P1(config)#
R2-P1(config)#do show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 11 subnets, 2 masks
O        10.1.1.1/32 [110/2] via 10.12.0.1, 3d04h, FastEthernet0/0
C        10.2.2.2/32 is directly connected, Loopback0
O        10.3.3.3/32 [110/2] via 10.23.0.3, 3d04h, FastEthernet1/1
O        10.4.4.4/32 [110/3] via 10.23.0.3, 3d04h, FastEthernet1/1
S        10.5.5.5/32 [1/0] via 10.12.0.1
C        10.12.0.0/24 is directly connected, FastEthernet0/0
L        10.12.0.2/32 is directly connected, FastEthernet0/0
C        10.23.0.0/24 is directly connected, FastEthernet1/1
L        10.23.0.2/32 is directly connected, FastEthernet1/1
O        10.34.0.0/24 [110/2] via 10.23.0.3, 3d04h, FastEthernet1/1
O        10.45.0.0/24 [110/3] via 10.23.0.3, 3d04h, FastEthernet1/1


R2-P1(config)#do show mpls forwarding-table 10.5.5.5    
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop   
Label      Label      or Tunnel Id     Switched      interface             
202        102        10.5.5.5/32      0             Fa0/0      10.12.0.1


R2-P1(config)#do ping 10.5.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.5.5.5, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R2-P1(config)#
R2-P1(config)#do show mpls forwarding-table 10.5.5.5
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop   
Label      Label      or Tunnel Id     Switched      interface             
202        102        10.5.5.5/32      193040        Fa0/0      10.12.0.1     // BYTES INCREASED DUE TO A PING LOOP (AND TTL EXPIRED)


R2-P1(config)#no ip route 10.5.5.5 255.255.255.255 10.12.0.1
R2-P1(config)#end
R2-P1#
R2-P1#show ip route 10.5.5.5            
*Nov 14 16:33:23.384: %SYS-5-CONFIG_I: Configured from console by console
R2-P1#show mpls forwarding-table 10.5.5.5
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop   
Label      Label      or Tunnel Id     Switched      interface             
202        317        10.5.5.5/32      0             Fa1/1      10.23.0.3  

R2-P1#ping 10.5.5.5                     
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.5.5.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/28/32 ms



Define MPLS jargons: RIB, LIB, FIB, LFIB, CEF, LDP


R2-P1#show ip ospf 1 ?
  <0-4294967295>       OSPF area ID as a decimal number
  A.B.C.D              OSPF area ID in IP address format
  border-routers       Border and Boundary Router Information
  database             Database summary
  events               OSPF event information
  flood-list           Link state flood list
  interface            Interface information
  max-metric           Max-metric origination information
  mpls                 MPLS related information
  neighbor             Neighbor list
  nsf                  Non-stop forwarding state information
  request-list         Link state request list
  retransmission-list  Link state retransmission list
  rib                  Routing Information Base (RIB)
  sham-links           Sham link information
  statistics           Various OSPF Statistics
  summary-address      Summary-address redistribution Information
  timers               OSPF timers information
  topology-info        Topology Info
  traffic              Traffic related statistics
  virtual-links        Virtual link information
  |                    Output modifiers
  <cr>   

R2-P1#show ip ospf 1 rib

            OSPF Router with ID (10.2.2.2) (Process ID 1)


                Base Topology (MTID 0)

OSPF local RIB
Codes: * - Best, > - Installed in global RIB

*>  10.1.1.1/32, Intra, cost 2, area 0
      via 10.12.0.1, FastEthernet0/0
*   10.2.2.2/32, Intra, cost 1, area 0, Connected     // DIRECTLY CONNECTED INTERFACE
      via 10.2.2.2, Loopback0
*>  10.3.3.3/32, Intra, cost 2, area 0
      via 10.23.0.3, FastEthernet1/1
*>  10.4.4.4/32, Intra, cost 3, area 0
      via 10.23.0.3, FastEthernet1/1
*>  10.5.5.5/32, Intra, cost 4, area 0
      via 10.23.0.3, FastEthernet1/1
*   10.12.0.0/24, Intra, cost 1, area 0, Connected      // DIRECTLY CONNECTED INTERFACE
      via 10.12.0.2, FastEthernet0/0
*   10.23.0.0/24, Intra, cost 1, area 0, Connected     // DIRECTLY CONNECTED INTERFACE
      via 10.23.0.2, FastEthernet1/1
*>  10.34.0.0/24, Intra, cost 2, area 0
      via 10.23.0.3, FastEthernet1/1
*>  10.45.0.0/24, Intra, cost 3, area 0
      via 10.23.0.3, FastEthernet1/1



R2-P1#show ip route ospf 
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 11 subnets, 2 masks
O        10.1.1.1/32 [110/2] via 10.12.0.1, 03:49:17, FastEthernet0/0
O        10.3.3.3/32 [110/2] via 10.23.0.3, 03:48:15, FastEthernet1/1
O        10.4.4.4/32 [110/3] via 10.23.0.3, 03:46:55, FastEthernet1/1
O        10.5.5.5/32 [110/4] via 10.23.0.3, 03:45:49, FastEthernet1/1
O        10.34.0.0/24 [110/2] via 10.23.0.3, 03:48:15, FastEthernet1/1
O        10.45.0.0/24 [110/3] via 10.23.0.3, 03:46:55, FastEthernet1/1



R2-P1#show ip route     
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 11 subnets, 2 masks
O        10.1.1.1/32 [110/2] via 10.12.0.1, 03:49:32, FastEthernet0/0
C        10.2.2.2/32 is directly connected, Loopback0         // DIRECTLY CONNECTED INTERFACE
O        10.3.3.3/32 [110/2] via 10.23.0.3, 03:48:30, FastEthernet1/1
O        10.4.4.4/32 [110/3] via 10.23.0.3, 03:47:10, FastEthernet1/1
O        10.5.5.5/32 [110/4] via 10.23.0.3, 03:46:04, FastEthernet1/1
C        10.12.0.0/24 is directly connected, FastEthernet0/0        // DIRECTLY CONNECTED INTERFACE
L        10.12.0.2/32 is directly connected, FastEthernet0/0
C        10.23.0.0/24 is directly connected, FastEthernet1/1       // DIRECTLY CONNECTED INTERFACE
L        10.23.0.2/32 is directly connected, FastEthernet1/1     
O        10.34.0.0/24 [110/2] via 10.23.0.3, 03:48:30, FastEthernet1/1
O        10.45.0.0/24 [110/3] via 10.23.0.3, 03:47:10, FastEthernet1/1


R2-P1#show mpls ldp ?              
  backoff           LDP session setup backoff table
  bindings          Show the LDP Label Information Base (LIB)
  capabilities      Display LDP Capabilities information
  discovery         Display sources for locally generated LDP Discovery Hello
                    PDUs
  graceful-restart  Show Graceful Restart summary
  igp               IGP-related info
  neighbor          Display LDP neighbor information
  parameters        Display LDP configuration parameters

R2-P1#show mpls ldp bindings      // LIB
  lib entry: 10.1.1.1/32, rev 2
        local binding:  label: 200
        remote binding: lsr: 10.3.3.3:0, label: 301
        remote binding: lsr: 10.1.1.1:0, label: imp-null
  lib entry: 10.2.2.2/32, rev 4
        local binding:  label: imp-null
        remote binding: lsr: 10.3.3.3:0, label: 300
        remote binding: lsr: 10.1.1.1:0, label: 100
  lib entry: 10.3.3.3/32, rev 6
        local binding:  label: 201
        remote binding: lsr: 10.3.3.3:0, label: imp-null
        remote binding: lsr: 10.1.1.1:0, label: 102
  lib entry: 10.4.4.4/32, rev 14
        local binding:  label: 203
        remote binding: lsr: 10.3.3.3:0, label: 303
        remote binding: lsr: 10.1.1.1:0, label: 104
  lib entry: 10.5.5.5/32, rev 18
        local binding:  label: 205
        remote binding: lsr: 10.1.1.1:0, label: 106
        remote binding: lsr: 10.3.3.3:0, label: 305
  lib entry: 10.12.0.0/24, rev 8
        local binding:  label: imp-null
        remote binding: lsr: 10.3.3.3:0, label: 302
        remote binding: lsr: 10.1.1.1:0, label: imp-null
  lib entry: 10.23.0.0/24, rev 10
        local binding:  label: imp-null
        remote binding: lsr: 10.3.3.3:0, label: imp-null
        remote binding: lsr: 10.1.1.1:0, label: 101
  lib entry: 10.34.0.0/24, rev 12
        local binding:  label: 202
        remote binding: lsr: 10.3.3.3:0, label: imp-null
        remote binding: lsr: 10.1.1.1:0, label: 103
  lib entry: 10.45.0.0/24, rev 16
        local binding:  label: 204
        remote binding: lsr: 10.3.3.3:0, label: 304
        remote binding: lsr: 10.1.1.1:0, label: 105


R2-P1#show mpls forwarding-table      // LFIB
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop   
Label      Label      or Tunnel Id     Switched      interface             
200        Pop Label  10.1.1.1/32      0             Fa0/0      10.12.0.1  
201        Pop Label  10.3.3.3/32      0             Fa1/1      10.23.0.3  
202        Pop Label  10.34.0.0/24     0             Fa1/1      10.23.0.3  
203        303        10.4.4.4/32      0             Fa1/1      10.23.0.3  
204        304        10.45.0.0/24     0             Fa1/1      10.23.0.3  
205        305        10.5.5.5/32      540           Fa1/1      10.23.0.3 


R2-P1#show ip cef 10.5.5.5 ?
  A.B.C.D   prefix mask
  checksum  Display FIB entry checksums
  detail    Display full information
  internal  Display internal data structures
  platform  Display platform specific data structures
  |         Output modifiers
  <cr>

R2-P1#show ip cef 10.5.5.5 detail
10.5.5.5/32, epoch 0
  local label info: global/205
  nexthop 10.23.0.3 FastEthernet1/1 label 305



LDP Router ID
  • used as transport IP address for Hello message
  • IP should be reachable by LDP neighbor (LSR)

  1. Manually configured
  2. Highest Loopback IP
  3. Highest IP on active interface


R1-PE1#traceroute 10.5.5.5
Type escape sequence to abort.
Tracing the route to 10.5.5.5
VRF info: (vrf in name/id, vrf out name/id)
  1 10.12.0.2 [MPLS: Label 205 Exp 0] 116 msec 116 msec 68 msec
  2 10.23.0.3 [MPLS: Label 305 Exp 0] 64 msec 60 msec 40 msec
  3 10.34.0.4 [MPLS: Label 405 Exp 0] 56 msec 44 msec 12 msec
  4 10.45.0.5 92 msec 72 msec 60 msec


R3-P2#show mpls ldp ?
  backoff           LDP session setup backoff table
  bindings          Show the LDP Label Information Base (LIB)
  capabilities      Display LDP Capabilities information
  discovery         Display sources for locally generated LDP Discovery Hello
                    PDUs
  graceful-restart  Show Graceful Restart summary
  igp               IGP-related info
  neighbor          Display LDP neighbor information
  parameters        Display LDP configuration parameters

R3-P2#show mpls ldp discovery ?
  all     Display discovery information in all VRFs
  detail  Display detailed LDP discovery information
  vrf     VRF Routing/Forwarding instance information
  |       Output modifiers
  <cr>

R3-P2#show mpls ldp discovery detail
 Local LDP Identifier:
    10.3.3.3:0       // LDP ID <LDP ROUTER ID>:<LOCAL LABEL SPACE ID>; :0 INDICATES PLATFORM-WIDE LABEL-SPACE
    Discovery Sources:
    Interfaces:
        FastEthernet1/0 (ldp): xmit/recv
            Enabled: Interface config
            Hello interval: 5000 ms; Transport IP addr: 10.3.3.3
            LDP Id: 10.4.4.4:0
              Src IP addr: 10.34.0.4; Transport IP addr: 10.4.4.4
              Hold time: 15 sec; Proposed local/peer: 15/15 sec
              Reachable via 10.4.4.4/32
              Password: not required, none, in use
            Clients: IPv4
        FastEthernet1/1 (ldp): xmit/recv
            Enabled: Interface config
            Hello interval: 5000 ms; Transport IP addr: 10.3.3.3
            LDP Id: 10.2.2.2:0
              Src IP addr: 10.23.0.2; Transport IP addr: 10.2.2.2
              Hold time: 15 sec; Proposed local/peer: 15/15 sec
              Reachable via 10.2.2.2/32
              Password: not required, none, in use
            Clients: IPv4


R3-P2#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  administratively down down   
FastEthernet1/0            10.34.0.3       YES manual up                    up     
FastEthernet1/1            10.23.0.3       YES manual up                    up     
Loopback0                  10.3.3.3        YES manual up                    up     
R3-P2#
R3-P2#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R3-P2(config)#mpls ldp ?
  advertise-labels  Label advertisements
  backoff           Set LDP session backoff parameters
  discovery         LDP discovery
  explicit-null     Advertise Explicit Null label in place of Implicit Null
  graceful-restart  Configure LDP Graceful Restart
  holdtime          LDP session holdtime
  igp               Configure IGP-related LDP parameters
  logging           Enable LDP logging
  loop-detection    Enable LDP Loop Detection
  maxhops           Limit hop count for LDP LSP setup
  neighbor          Configure neighbor parameters
  password          Configure LDP MD5 password
  router-id         Select interface to prefer for LDP identifier address
  session           Configure session parameters
  tcp               Set TCP parameters for LDP

R3-P2(config)#mpls ldp router-id ?
  Async              Async interface
  Auto-Template      Auto-Template interface
  BVI                Bridge-Group Virtual Interface
  CDMA-Ix            CDMA Ix interface
  CTunnel            CTunnel interface
  Dialer             Dialer interface
  FastEthernet       FastEthernet IEEE 802.3
  GMPLS              MPLS interface
  Group-Async        Async Group interface
  LISP               Locator/ID Separation Protocol Virtual Interface
  LongReachEthernet  Long-Reach Ethernet interface
  Loopback           Loopback interface
  MFR                Multilink Frame Relay bundle interface
  Multilink          Multilink-group interface
  Null               Null interface
  Port-channel       Ethernet Channel of interfaces
  Tunnel             Tunnel interface
  Vif                PGM Multicast Host interface
  Virtual-PPP        Virtual PPP interface
  Virtual-Template   Virtual Template interface
  Virtual-TokenRing  Virtual TokenRing
  vmi                Virtual Multipoint Interface
         
R3-P2(config)#mpls ldp router-id FastEthernet1/1 ?
  force  Forcibly change the LDP router id
  <cr>

R3-P2(config)#mpls ldp router-id FastEthernet1/1 force     // CHANGE LDP ROUTER-ID; IT WILL TEMPORARILY BREAK LSP
R3-P2(config)#
*Nov 20 10:43:33.553: %TDP-5-INFO: default: TDP ID removed
*Nov 20 10:43:33.565: %LDP-5-NBRCHG: LDP Neighbor 10.2.2.2:0 (1) is DOWN (LDP Router ID changed)
*Nov 20 10:43:33.569: %LDP-5-NBRCHG: LDP Neighbor 10.4.4.4:0 (2) is DOWN (LDP Router ID changed)
R3-P2(config)#
*Nov 20 10:43:34.709: %LDP-5-NBRCHG: LDP Neighbor 10.2.2.2:0 (3) is UP
*Nov 20 10:43:35.345: %LDP-5-NBRCHG: LDP Neighbor 10.4.4.4:0 (4) is UP


R1-PE1#traceroute 10.5.5.5     // LSP IS RE-ESTABLISHED
Type escape sequence to abort.
Tracing the route to 10.5.5.5
VRF info: (vrf in name/id, vrf out name/id)
  1 10.12.0.2 [MPLS: Label 205 Exp 0] 96 msec 44 msec 64 msec
  2 10.23.0.3 [MPLS: Label 305 Exp 0] 64 msec 56 msec 60 msec
  3 10.34.0.4 [MPLS: Label 405 Exp 0] 60 msec 44 msec 44 msec
  4 10.45.0.5 44 msec 64 msec 60 msec


R3-P2(config)#do show mpls ldp discovery detail      // NEW LDP ROUTER-ID IS REACHABLE BY LDP NEIGHBORS
 Local LDP Identifier:
    10.23.0.3:0
    Discovery Sources:
    Interfaces:
        FastEthernet1/0 (ldp): xmit/recv
            Enabled: Interface config
            Hello interval: 5000 ms; Transport IP addr: 10.23.0.3
            LDP Id: 10.4.4.4:0
              Src IP addr: 10.34.0.4; Transport IP addr: 10.4.4.4
              Hold time: 15 sec; Proposed local/peer: 15/15 sec
              Reachable via 10.4.4.4/32
              Password: not required, none, in use
            Clients: IPv4
        FastEthernet1/1 (ldp): xmit/recv
            Enabled: Interface config
            Hello interval: 5000 ms; Transport IP addr: 10.23.0.3
            LDP Id: 10.2.2.2:0
              Src IP addr: 10.23.0.2; Transport IP addr: 10.2.2.2
              Hold time: 15 sec; Proposed local/peer: 15/15 sec
              Reachable via 10.2.2.2/32
              Password: not required, none, in use
            Clients: IPv4


R3-P2(config)#interface loopback99
R3-P2(config-if)#
*Nov 20 10:47:37.785: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback99, changed state to up
R3-P2(config-if)#ip address 10.9.9.9 255.255.255.255
R3-P2(config-if)#
R3-P2(config-if)#do show ip ospf interface brief       // LOOPBACK99 IS NOT PARTICIPATING IN OSPF 1
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     0               10.3.3.3/32        1     LOOP  0/0
Fa1/1        1     0               10.23.0.3/24       1     BDR   1/1
Fa1/0        1     0               10.34.0.3/24       1     DR    1/1


R3-P2(config-if)#mpls ldp router-id loopback99 force    
R3-P2(config)#
*Nov 20 10:49:21.289: %TDP-5-INFO: default: TDP ID removed
*Nov 20 10:49:21.293: %LDP-5-NBRCHG: LDP Neighbor 10.2.2.2:0 (3) is DOWN (LDP Router ID changed)   
*Nov 20 10:49:21.301: %LDP-5-NBRCHG: LDP Neighbor 10.4.4.4:0 (4) is DOWN (LDP Router ID changed)
R3-P2(config)#
R3-P2(config)#do show mpls ldp discovery detail      // LDP NEIGHBORS DIDN'T ESTABLISH SINCE LOOPBACK99 IS NOT REACHABLE VIA OSPF
 Local LDP Identifier:
    10.9.9.9:0
    Discovery Sources:
    Interfaces:
        FastEthernet1/0 (ldp): xmit/recv
            Enabled: Interface config
            Hello interval: 5000 ms; Transport IP addr: 10.9.9.9
            LDP Id: 10.4.4.4:0
              Src IP addr: 10.34.0.4; Transport IP addr: 10.4.4.4
              Hold time: 15 sec; Proposed local/peer: 15/15 sec
              Reachable via 10.4.4.4/32
              Password: not required, none, in use
            Clients: IPv4
        FastEthernet1/1 (ldp): xmit/recv
            Enabled: Interface config
            Hello interval: 5000 ms; Transport IP addr: 10.9.9.9
            LDP Id: 10.2.2.2:0
              Src IP addr: 10.23.0.2; Transport IP addr: 10.2.2.2
              Hold time: 15 sec; Proposed local/peer: 15/15 sec
              Reachable via 10.2.2.2/32
              Password: not required, none, in use
            Clients: IPv4


R1-PE1#traceroute 10.5.5.5
Type escape sequence to abort.
Tracing the route to 10.5.5.5
VRF info: (vrf in name/id, vrf out name/id)
  1 10.12.0.2 [MPLS: Label 205 Exp 0] 20 msec 16 msec 16 msec
  2 10.23.0.3 20 msec 44 msec 28 msec     // NATIVE IP (NO MPLS LABEL)
  3 10.34.0.4 64 msec 48 msec 52 msec
  4 10.45.0.5 64 msec 60 msec 48 msec


R2-P1#show mpls forwarding-table 10.5.5.5
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop   
Label      Label      or Tunnel Id     Switched      interface             
205        No Label   10.5.5.5/32      378           Fa1/1      10.23.0.3       // NO LDP NEIGHBOR R3
R2-P1#
R2-P1#show ip cef 10.5.5.5
10.5.5.5/32
  nexthop 10.23.0.3 FastEthernet1/1



R3-P2(config)#interface f1/1
R3-P2(config-if)#mpls ?
  accounting   Enable MPLS accounting on this interface
  bgp          MPLS BGP commands
  ip           Configure dynamic MPLS forwarding for IP
  l2transport  Layer 2 packet over MPLS config commands
  label        Label properties
  ldp          Configure Label Distribution Protocol (LDP) parameters
  mtu          Set MPLS Maximum Transmission Unit
  netflow      Configure Egress Netflow Accounting
  traffic-eng  Configure Traffic Engineering parameters

R3-P2(config-if)#mpls ldp ?
  discovery  Configure interface LDP Discovery parameters
  igp        Configure IGP-related parameters

R3-P2(config-if)#mpls ldp discovery ?
  transport-address  Specify interface LDP transport address

R3-P2(config-if)#mpls ldp discovery transport-address ?
  A.B.C.D    IP address to use for LDP transport address
  interface  Use interface address for LDP transport address

R3-P2(config-if)#mpls ldp discovery transport-address interface     // USE INTERFACE F1/1 AS TRANSPORT ADDRESS
R3-P2(config-if)#
R3-P2(config-if)#interface f1/0
R3-P2(config-if)#mpls ldp discovery transport-address interface
R3-P2(config-if)#
R3-P2(config-if)#
*Nov 20 10:56:02.025: %LDP-5-NBRCHG: LDP Neighbor 10.2.2.2:0 (1) is UP
R3-P2(config-if)#
*Nov 20 10:56:07.537: %LDP-5-NBRCHG: LDP Neighbor 10.4.4.4:0 (2) is UP


R3-P2(config-if)#do show mpls ldp discovery detail            
 Local LDP Identifier:
    10.9.9.9:0
    Discovery Sources:
    Interfaces:
        FastEthernet1/0 (ldp): xmit/recv
            Enabled: Interface config
            Hello interval: 5000 ms; Transport IP addr: 10.34.0.3      // THE INTERFACE IP IS USED AS TRANSPORT ADDRESS
            LDP Id: 10.4.4.4:0
              Src IP addr: 10.34.0.4; Transport IP addr: 10.4.4.4
              Hold time: 15 sec; Proposed local/peer: 15/15 sec
              Reachable via 10.4.4.4/32
              Password: not required, none, in use
            Clients: IPv4
        FastEthernet1/1 (ldp): xmit/recv
            Enabled: Interface config
            Hello interval: 5000 ms; Transport IP addr: 10.23.0.3
            LDP Id: 10.2.2.2:0
              Src IP addr: 10.23.0.2; Transport IP addr: 10.2.2.2
              Hold time: 15 sec; Proposed local/peer: 15/15 sec
              Reachable via 10.2.2.2/32
              Password: not required, none, in use
            Clients: IPv4



R3-P2(config)#no mpls ip     // PERFORM WIRESHARK CAPTURE ON R3 F1/1
R3-P2(config)#
*Nov 20 11:01:18.397: %LDP-5-NBRCHG: LDP Neighbor 10.2.2.2:0 (1) is DOWN (LDP unconfigured globally)
*Nov 20 11:01:18.401: %LDP-5-NBRCHG: LDP Neighbor 10.4.4.4:0 (2) is DOWN (LDP unconfigured globally)


MPLS USES TCP DESTINATION PORT 646



R3-P2(config)#mpls ip
R3-P2(config)#
*Nov 20 11:02:02.857: %LDP-5-NBRCHG: LDP Neighbor 10.4.4.4:0 (1) is UP
*Nov 20 11:02:02.869: %LDP-5-NBRCHG: LDP Neighbor 10.2.2.2:0 (2) is UP