MPLS encapsulation failed

The setup I have is pretty basic. RTR3 and RTR4 have a directly connected interface that I assigned to a vrf and have redistributed into MBGP.

132.1.33.0 VPN34 (RTR3)  <OSPF Area 0>  (RTR4) VPN34 132.1.255.0

After redistributing the vrf into MBGP, I can see each side learning the prefix as expected.
 
RTR3#show ip route vrf VPN34 | beg 132
     132.1.0.0/24 is subnetted, 2 subnets
B       132.1.255.0 [200/0] via 150.1.4.4, 00:25:37
C       132.1.33.0 is directly connected, FastEthernet0/1

RTR4#show ip route vrf VPN34 | beg 132
     132.1.0.0/24 is subnetted, 2 subnets
C       132.1.255.0 is directly connected, FastEthernet0/1
B       132.1.33.0 [200/0] via 150.1.3.3, 00:26:01

Now, I try to ping the learned prefix like so:

RTR3#ping vrf VPN34 ip 132.1.255.4

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 132.1.255.4, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
RTR3#

Didn't work. So I look on the other side while generating a ping to see what is going on.

RTR4#debug mpls packets
MPLS packet debugging is on
RTR4#debug ip packet
IP packet debugging is on

MPLS: Se0/0/0: recvd: CoS=0, TTL=255, Label(s)=38
IP: tableid=1, s=132.1.33.3 (Serial0/0/0), d=132.1.255.4 (FastEthernet0/1), routed via RIB
IP: s=132.1.33.3 (Serial0/0/0), d=132.1.255.4, len 100, rcvd 4
IP: tableid=1, s=132.1.255.4 (local), d=132.1.33.3 (Serial0/0/0), routed via FIB
IP: s=132.1.255.4 (local), d=132.1.33.3 (Serial0/0/0), len 100, sending
IP: s=132.1.255.4 (local), d=132.1.33.3 (Serial0/0/0), len 100, MPLS encapsulation failed

So, I am getting an MPLS encapsulation failed message. Maybe this means RTR4 doesn't have a label for the destination prefix?

RTR4#show mpls forwarding-table 132.1.33.0
Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop   
tag    tag or VC   or Tunnel Id      switched   interface       

So, there is no label for prefix 132.1.33.0. I guess this is the cause of the MPLS encapsulation failed message, but the question is why is there no label for this prefix?

Although I don't know what I am doing, I tried configuring a static binding for the destination prefix like so:

RTR4#show mpls label range
Downstream Generic label region: Min/Max label: 16/100
Range for static labels: Min/Max Number: 101/150


RTR4#show run | inc ^mpls static
mpls static binding ipv4 vrf VPN34 132.1.33.0 255.255.255.0 101

But it still does not show up in the forwarding table:
RTR4#show mpls forwarding-table 132.1.33.0 24
Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop   
tag    tag or VC   or Tunnel Id      switched   interface  

Comments

  • do you enable ip cef?

    i think there is no labeling because of no ip cef command on your router.

  • CEF is enabled. The prefix causing the MPLS enc failed message is in the CEF table 132.1.33.0/24.

    RTR4#show ip cef vrf VPN34
    Prefix              Next Hop             Interface
    0.0.0.0/0           drop                 Null0 (default route handler entry)
    0.0.0.0/32          receive
    132.1.33.0/24       132.1.0.2            Serial0/0/0
    132.1.255.0/24      attached             FastEthernet0/1
    132.1.255.0/32      receive
    132.1.255.4/32      receive
    132.1.255.255/32    receive
    224.0.0.0/4         drop
    224.0.0.0/24        receive
    255.255.255.255/32  receive

    Labels are being generated for other routes as seen here:

    RTR4#show mpls forwarding-table
    Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop   
    tag    tag or VC   or Tunnel Id      switched   interface             
    16     Untagged    132.1.0.1/32      0          Se0/0/0    132.1.0.1   
    17     Untagged    132.1.0.2/32      0          Se0/0/0    132.1.0.2   
    18     Untagged    132.1.0.3/32      0          Se0/0/0    132.1.0.3   
    19     Untagged    150.1.1.1/32      0          Se0/0/0    132.1.0.1   
    20     Pop tag     132.1.3.0/24      0          Se0/0/0    132.1.0.3   
    21     Untagged    132.1.17.0/24     0          Se0/0/0    132.1.0.1   
    22     Untagged    30.1.0.0/16       0          Se0/0/0    132.1.0.1   
    23     Untagged    30.3.0.0/16       0          Se0/0/0    132.1.0.1   
    24     Untagged    54.1.2.0/24       0          Se0/0/0    132.1.0.2   
    25     Untagged    132.1.5.0/24      0          Se0/0/0    132.1.0.2   
    26     Untagged    132.1.8.0/24      0          Se0/0/0    132.1.0.1   
    27     Untagged    132.1.23.0/24     0          Se0/0/0    132.1.0.2   
    28     Untagged    132.1.26.0/24     0          Se0/0/0    132.1.0.2   
    29     Untagged    132.1.35.0/24     0          Se0/0/0    132.1.0.2   
    30     Untagged    150.1.2.0/24      0          Se0/0/0    132.1.0.2   
    31     Untagged    150.1.3.3/32      0          Se0/0/0    132.1.0.2   
    32     Untagged    150.1.5.0/24      0          Se0/0/0    132.1.0.2   
    33     Untagged    150.1.6.0/24      0          Se0/0/0    132.1.0.2   
    34     Untagged    150.1.7.0/24      0          Se0/0/0    132.1.0.1   
    35     Untagged    150.1.8.0/24      0          Se0/0/0    132.1.0.1   
    36     Untagged    200.0.0.0/22      0          Se0/0/0    132.1.0.2   
    Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop   
    tag    tag or VC   or Tunnel Id      switched   interface             
    37     Untagged    204.12.1.0/24     0          Se0/0/0    132.1.0.1   
    38     Aggregate   132.1.255.0/24[V] 1560

  • I updated the topology a little by inserting another router in between RTR3 and RTR4

    132.1.33.0 VPN34 (RTR3)  <OSPF Area 0> (RTR2) <OSPF Area 0>  (RTR4) VPN34 132.1.255.0

    It works with this configuration. I am wondering if it has something to do with penultimate hop popping? I don't know. Have to look into this further.

  • is there no filtering for ldp binding?

    can you how me the output of command "show mpls ldp binding"?

     

  • Well, it turns out to be nothing about MPLS labels. The MBGP session between RTR3 and RTR4 was asymmetric. From RTR3 to RTR4 the session was direct, but from RTR4 to RTR3 the session transited a non MPLS enabled router. If I could attach the topology it would be much easier to explain.

    I still am scratching my head about the behavior of MPLS and the encapsulation failed message. Well, not confused about the failed message, just why there is no label for the destination network that's all.

    Anyways, thanks for the help ccie20259.

     

     

Sign In or Register to comment.