Thursday, June 4, 2015

MPLS LDP session protection

MPLS LDP Session Protection

A common problem in networks is flapping links,
The impact is pretty severe though, because the routing protocol and LDP can take time to rebuild the neighborship. LDP has to rebuild the LDP session and must exchange the label bindings again.

To avoid having to rebuild the LDP session
altogether, you can protect it. When the LDP session between two directly connected LSRs is protected, a targeted LDP session is built between the two LSRs. When the directly connected link does go down between the two LSRs, the targeted LDP session is kept up as long as an alternative path exists between the two LSRs.

The global command to enable LDP Session Protection is this:

mpls ldp session protection [vrf vpn-name] [for acl] [duration seconds]


The access list (acl) you can configure lets you specify the LDP peers that should be protected.




For the protection to work, need to enable it on both the LSRs(at least on one)

need to enable it on both the LSRs




mpls ldp discovery targeted-hello accept


********************************
Before applying the config 


R1#sh mpls ldp neighbor fa1/1 detail
    Peer LDP Ident: 3.3.3.3:0; Local LDP Ident 192.168.0.1:0
        TCP connection: 3.3.3.3.646 - 192.168.0.1.48353
        Password: not required, none, in use
        State: Oper; Msgs sent/rcvd: 15/18; Downstream; Last TIB rev sent 63
        Up time: 00:01:55; UID: 10; Peer Id 1;
        LDP discovery sources:
          FastEthernet1/1; Src IP addr: 13.0.0.3
            holdtime: 15000 ms, hello interval: 5000 ms
        Addresses bound to peer LDP Ident:
          172.16.0.3      3.3.3.3         33.33.33.33     13.0.0.3
        Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab

 Now configuration must be done on all routers

R1


access-list 5 permit 2.2.2.2
access-list 5 permit 3.3.3.3
mpls ldp session protection for 5
mpls ldp discovery targeted-hello accept

R2
access-list 5 permit 192.168.0.1
access-list 5 permit 3.3.3.3
mpls ldp session protection for 5
mpls ldp discovery targeted-hello accept

R3

access-list 5 permit 2.2.2.2
access-list 5 permit 1.1.1.1
mpls ldp session protection for 5
mpls ldp discovery targeted-hello accept




Show commands

R1#sh mpls ldp neighbor fa1/1 detail

    Peer LDP Ident: 3.3.3.3:0; Local LDP Ident 192.168.0.1:0
        TCP connection: 3.3.3.3.646 - 192.168.0.1.40131
        Password: not required, none, in use
        State: Oper; Msgs sent/rcvd: 13/16; Downstream; Last TIB rev sent 67
        Up time: 00:00:27; UID: 26; Peer Id 1;
        LDP discovery sources:
          FastEthernet1/1; Src IP addr: 13.0.0.3
            holdtime: 15000 ms, hello interval: 5000 ms
          Targeted Hello 192.168.0.1 -> 3.3.3.3, active;
            holdtime: infinite, hello interval: 10000 ms
        Addresses bound to peer LDP Ident:
          172.16.0.3      3.3.3.3         33.33.33.33     13.0.0.3
        Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab
        Clients: Dir Adj Client
        LDP Session Protection enabled, state: Ready
            acl: 5, duration: 86400 seconds


Now flap the int fa1/1


R1(config-if)#
R1(config-if)#shut
R1(config-if)#
*Jun  4 11:06:22.729: %LDP-5-SP: 3.3.3.3:0: session hold up initiated


R1#sh mpls ldp neighbor 3.3.3.3 detail
    Peer LDP Ident: 3.3.3.3:0; Local LDP Ident 192.168.0.1:0
        TCP connection: 3.3.3.3.646 - 192.168.0.1.37230
        Password: not required, none, in use
        State: Oper; Msgs sent/rcvd: 14/13; Downstream; Last TIB rev sent 71
        Up time: 00:00:37; UID: 57; Peer Id 1;
        LDP discovery sources:
          Targeted Hello 192.168.0.1 -> 3.3.3.3, active;
            holdtime: infinite, hello interval: 10000 ms
        Addresses bound to peer LDP Ident:
          172.16.0.3      3.3.3.3         33.33.33.33     13.0.0.3
        Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab
        Clients: Dir Adj Client
        LDP Session Protection enabled, state: Protecting
            acl: 5, duration: 86400 seconds
            holdup time remaining: 86395 seconds

 see the state is protecting
R1(config)#int fa1/1
R1(config-if)#no shut
R1(config-if)#

*Jun  4 11:06:44.857: %LDP-5-SP: 3.3.3.3:0: session recovery succeede


No comments:

Post a Comment