Saturday, 1 February 2020

MPLS Configuration (Cloud)


To Configure MPLS on MPLS Cloud. On Cisco Routers by default the protocol is LDP(exception some older IOS have TDP)
To Enable the LDP protocol.

R1(config)#mpls label protocol ldp               Like this configure on R1, R2, R3 and R3.
R2(config)#mpls label protocol ldp     
R3(config)#mpls label protocol ldp    
R4(config)#mpls label protocol ldp    

We enabled the MPLS Label protocol as LDP (Label Distribution Protocol). But still we are not forming the LDP neighbor with other LDP Peer's.
Because we didn't enable MPLS on interface. Ok Lets enable MPLS on R1 and R2 interface (i.e) inside the MPLS cloud.

R1(config)#interface s1/2
R1(config-if)#mpls ip

R2(config)#int s1/0
R2(config-if)#mpls ip

That’s it we configured the MPLS on R1 and R2 interface. See very simple isn't??  Lets verify the MPLS LDP neighborship


R1#sh mpls ldp discovery detail
 Local LDP Identifier:
    1.1.1.1:0
    Discovery Sources:
    Interfaces:
        Serial1/2 (ldp): xmit/recv
            Enabled: Interface config
            Hello interval: 5000 ms; Transport IP addr: 1.1.1.1
            LDP Id: 2.2.2.2:0; no route to transport addr
              Src IP addr: 10.0.0.2; Transport IP addr: 2.2.2.2
              Hold time: 15 sec; Proposed local/peer: 15/15 sec
R1#sh mpls ldp discovery
 Local LDP Identifier:
    1.1.1.1:0
    Discovery Sources:
    Interfaces:
        Serial1/2 (ldp): xmit/recv
            LDP Id: 2.2.2.2:0; no route

By Default LDP take the LDP Identifier same as OSPF protocol.
1.Rouer-id manually configured
2.Highest Loopback address
3.Highest Physical address

Here for R1 the LDP-Id is 1.1.1.1:0 and For R2 LDP-Id is 2.2.2.2:0

Note:
By Default the LDP take LDP-Id as the transport address to form LDP session between the LDP peers. Hence R1 and R2 have no idea for each other loopback address they can't form neighborship with each other.

R1#sh ip route 2.2.2.2
% Network not in table


To solve this issues we can do 2 things
1.       Change the LDP-Id as reachable so that transport address will be used.
2.       Change the transport address as the serial interface ip.
3.       Give the route for each other loopback address.

Method 1:

R1(config)#mpls ldp router-id serial 1/2 force                 [This Force keyword to change the router-id  immediately ]
R2(config)#mpls ldp router-id serial 1/0 force















R2#*Dec 12 01:06:33.479: %LDP-5-NBRCHG: LDP Neighbor 10.0.0.1:0 (1) is UP

R2#sh mpls ldp discovery detail
 Local LDP Identifier:
    10.0.0.2:0
    Discovery Sources:
    Interfaces:
        Serial1/0 (ldp): xmit/recv
            Enabled: Interface config
            Hello interval: 5000 ms; Transport IP addr: 10.0.0.2
            LDP Id: 10.0.0.1:0; no host route to transport addr
              Src IP addr: 10.0.0.1; Transport IP addr: 10.0.0.1
              Hold time: 15 sec; Proposed local/peer: 15/15 sec
              Reachable via 10.0.0.0/30

No Host Route Is not a problem but this is because LDP peer i.e transport address should have /32.
To solve this we should have /32 (Host route) to each other routing table.

R1(config)#ip route 10.0.0.2 255.255.255.255 s1/2
R2(config)#ip route 10.0.0.1 255.255.255.255 s1/0

R1#sh ip route 10.0.0.0
S       10.0.0.2/32 is directly connected, Serial1/2
C       10.0.0.0/30 is directly connected, Serial1/2

R1#sh mpls ldp discovery detail
 Local LDP Identifier:
    10.0.0.1:0
    Discovery Sources:
    Interfaces:
        Serial1/2 (ldp): xmit/recv
            Enabled: Interface config
            Hello interval: 5000 ms; Transport IP addr: 10.0.0.1
            LDP Id: 10.0.0.2:0
              Src IP addr: 10.0.0.2; Transport IP addr: 10.0.0.2
              Hold time: 15 sec; Proposed local/peer: 15/15 sec
              Reachable via 10.0.0.2/32

By Default the LDP hello and Hold timer is 5/15 sec  respectively.
We can change this parameter

R1(config)#mpls ldp discovery hello holdtime 20
R1(config)#do sh mpl ldp di de | in Hold
              Hold time: 20 sec; Proposed local/peer: 20/20 sec

R1#sh mpls ldp discovery detail
 Local LDP Identifier:
    10.0.0.1:0
    Discovery Sources:
    Interfaces:
        Serial1/2 (ldp): xmit/recv
            Enabled: Interface config
            Hello interval: 5000 ms; Transport IP addr: 10.0.0.1
            LDP Id: 10.0.0.2:0; no host route to transport addr
              Src IP addr: 10.0.0.2; Transport IP addr: 10.0.0.2
              Hold time: 15 sec; Proposed local/peer: 15/15 sec
              Reachable via 10.0.0.0/30
R1#sh mpls ldp discovery
 Local LDP Identifier:
    10.0.0.1:0
    Discovery Sources:
    Interfaces:
        Serial1/2 (ldp): xmit/recv
            LDP Id: 10.0.0.2:0; no host route

R2#sh mpls ldp discovery
 Local LDP Identifier:
    10.0.0.2:0
    Discovery Sources:
    Interfaces:
        Serial1/0 (ldp): xmit/recv
            LDP Id: 10.0.0.1:0; no host route

R1#sh mpls ldp discovery
 Local LDP Identifier:
    10.0.0.1:0
    Discovery Sources:
    Interfaces:
        Serial1/2 (ldp): xmit/recv
            LDP Id: 10.0.0.2:0



Other show commands to see more details about the LDP peer.
R1#sh mpls ldp parameters
R1#sh mpls ldp neighbor 10.0.0.2
R1#sh mpls ldp neighbor 10.0.0.2 detail

No comments:

Post a Comment