1974_chp4ONLa

Embed Size (px)

Citation preview

  • 8/10/2019 1974_chp4ONLa

    1/8

  • 8/10/2019 1974_chp4ONLa

    2/8

    C HAPTERS UPPLEMENT

    4

    LDP Graceful Restart specifies a mechanism for Label Distribution Protocol (LDP) peers to

    preserve the MPLS forwarding state on the label switching routers (LSRs) when the LDP

    session goes down. When the LDP session goes down, the LDP Graceful Restart enables the

    nonstop forwarding of labeled traffic for the LSPs through the LSRs by using the previously

    learned labels by LDP. The nonstop forwarding of labeled traffic through the affected LDP pee

    can continue until the LDP session is reestablished or the LDP neighbors are declared down

    LDP Graceful Restart

    The LDP Graceful Restart mechanism is described in RFC 3478.

    It is important to note that MPLS LDP Graceful Restart can operate in two modes:

    MPLS LDP Graceful Restart in SSO/NSF mode

    MPLS LDP Graceful Restart in Helper mode

    SSO/NSF mode stands for Stateful Switchover/NonStop Forwarding mode. SSO refers to th

    capability of transparent failover of Layer 2 protocols when a route processor fails. NSF refe

    to the capability to keep forwarding traffic when the active route processor fails and the standb

    route processor takes over. While the IGP adjacencies are rebuilt, the forwarding information

    base/label forwarding information base (FIB/LFIB) remains in place, and the forwarding of

    traffic is not interrupted. Both SSO and NSF are part of the Cisco High Availability initiative

    An LSR that is running MPLS LDP Graceful Restart in SSO/NSF mode is capable of

    forwarding the labeled traffic in the data plane while LDP is restarting in the control plane. A

    LSR that is running LDP Graceful Restart in Helper mode is not capable of forwarding label

    traffic while LDP restarts, but it helps the neighboring LDP router in its LDP Graceful Resta

    When the LDP Graceful Restart feature is enabled on the LSR, a Fault Tolerant (FT) Session

    TLV is sent as an optional parameter in the LDP Initialization message.

    Label Distribution Protocol

  • 8/10/2019 1974_chp4ONLa

    3/8

    659 Chapter 4: Label Distribution Protocol

    Figure 4-1 shows the encoding of the FT Session TLV.

    Figure 4-1 FT Session TLV Encoding

    The FT Flags field is defined in Figure 4-2.

    Figure 4-2 FT Flags Field Encoding

    The flags are as follows:

    R: FT Reconnect flag

    S: Save State flag

    A: All-Label Protection Required

    C: Check-Pointing flag

    L: Learn from Network flag

    NOTE RFC 3479, Fault Tolerance for the Label Distribution Protocol (LDP), defines the

    FT Session TLV.

    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

    1 0 FT Session TLV (0 0503) Length (=12)

    FT Flags

    FT Reconnect Timeout (In Milliseconds)

    Recovery Time (In Milliseconds)

    Reserved

    0 1 2 3

    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5

    R S A C LReserved

    0 1

  • 8/10/2019 1974_chp4ONLa

    4/8

    LDP Graceful Restart

    All other bits in this field are currently reserved and should be set to zero on transmission an

    ignored upon receipt. All flagsexcept the L-flaghave no meaning to MPLS LDP Gracef

    Restart, so they are not explained here. The L flag is the Learn from Network flag. It is set to

    the Fault Recovery procedures of RFC 3478 are to be used to relearn the state from the netw

    The two parameters in the FT Session TLV that are important for Graceful Restart are FT

    Reconnect Timeout and Recovery Time. The FT Reconnect Timeout is the time that the sende

    this parameter would like the receiver to wait before giving up on this LDP neighborship

    completely. The Recovery Time is the time that the LDP peer is willing to keep the MPLS

    forwarding state while the LDP neighborship is restarting. When the LDP session is in restart

    label bindings are preserved but are in a stale state. When the LDP session recovers, the stal

    bindings are recovered or new bindings are learned.

    Figure 4-3 shows the LDP Graceful Restart procedure between two LDP peers.

    Figure 4-3 LDP Graceful Restart Procedure

    Active/Passive Negotiation

    TCP Connection Established

    FTSessionTLV,LearnFlagSet

    FTSessionTLV,

    LearnFlagSet

    Address Messages

    Label Mapping Messages

    LDP Session Breaks

    LDP HellosLDP Session Lost

    Reconnect TimerStarted

    Recovery TimerStarted

    Reconnect TimerStopped

    Recovery TimerStopped

    LDP Session Lost

    Reconnect TimerStarted

    Recovery TimerStarted

    Reconnect TimerStopped

    Recovery TimerStopped

    ReconnectTimer

    RecoveryTimer

    ReconnectTimer

    Recovery

    Timer

  • 8/10/2019 1974_chp4ONLa

    5/8

    661 Chapter 4: Label Distribution Protocol

    In Cisco IOS, the command to enable LDP Graceful Restart is mpls ldp graceful-restart. In

    addition, three timers can be set for LDP Graceful Restart:

    mmmmppppllllssssllllddddppppggggrrrraaaacccceeeeffffuuuullll----rrrreeeessssttttaaaarrrrttttttttiiiimmmmeeeerrrrssssffffoooorrrrwwwwaaaarrrrddddiiiinnnngggg----hhhhoooollllddddiiiinnnnggggsecs

    This command specifies the amount of time that the MPLS forwarding state shouldbe preserved after the control plane restarts. In other words, it is the amount of time

    that the entries in the LFIB (marked as stale in the LIB) that are pointing to an LDP

    peer of which the LDP session is restarting should remain. The value specified can

    be between 30 and 600 seconds; the default is 600 seconds.

    mmmmppppllllssssllllddddppppggggrrrraaaacccceeeeffffuuuullll----rrrreeeessssttttaaaarrrrttttttttiiiimmmmeeeerrrrssssmmmmaaaaxxxx----rrrreeeeccccoooovvvveeeerrrryyyysecs

    This command specifies the amount of time that the stale label bindings should be

    kept on the router after the LDP session has been reestablished. The value specified

    can be between 15 and 600 seconds; the default value is 120 seconds.

    mmmmppppllllssssllllddddppppggggrrrraaaacccceeeeffffuuuullll----rrrreeeessssttttaaaarrrrttttttttiiiimmmmeeeerrrrssssnnnneeeeiiiigggghhhhbbbboooorrrr----lllliiiivvvveeeennnneeeesssssssssecs

    This command specifies the amount of time that the router will wait for the LDP

    session to be re-established. The actual time the router will wait for the re-

    established LDP session is the minimum value of the configured neighbor-liveness

    and the received value of the FT Reconnect Timeout in the FT Session TLV. The

    configured neighbor-liveness is a value between 5 and 300 seconds; the default value

    is 120 seconds. If the router cannot re-establish the LDP session within that time, the

    router deletes all the stale LDP bindings received from that LDP neighbor.

    Example 4-1 shows that LDP label bindings can be marked as stale when LDP Graceful Restart

    is enabled on the LSR. All label bindings from 10.200.254.5 (router madrid) are marked as stale.

    Example 4-1 Stale Label Bindings

    sydney#sssshhhhoooowwwwmmmmppppllllssssllllddddppppbbbbiiiinnnnddddiiiinnnnggggssssddddeeeettttaaaaiiiillll

    lib entry: 0.0.0.0/0, rev 40, chkpt: none

    remote binding: lsr: 10.200.254.5:0, label: imp-null stale

    lib entry: 10.10.100.33/32, rev 38, chkpt: none

    remote binding: lsr: 10.200.254.6:0, label: imp-null

    lib entry: 10.48.70.0/24, rev 39, chkpt: none

    remote binding: lsr: 10.200.254.5:0, label: imp-null stale

    lib entry: 10.200.211.0/24, rev 14, chkpt: none

    local binding: label: 18 (owner LDP)

    Advertised to: 10.200.254.3:0 10.200.254.6:0

    remote binding: lsr: 10.200.254.3:0, label: imp-null

    remote binding: lsr: 10.200.254.6:0, label: 17

    remote binding: lsr: 10.200.254.5:0, label: 17 stale

  • 8/10/2019 1974_chp4ONLa

    6/8

    LDP Graceful Restart

    Example 4-2 shows the Graceful Restart debug information when an LDP neighbor goes do

    and recovers.

    Example 4-2 Example of LDP Graceful Restart: LDP Neighbor Going Down and Recovering

    sydney#ddddeeeebbbbuuuuggggmmmmppppllllssssllllddddppppggggrrrraaaacccceeeeffffuuuullll----rrrreeeessssttttaaaarrrrtttt

    LDP Graceful Restart events debugging is on

    sydney#

    LDP GR: GR session 10.200.254.5:0:: lost

    LDP GR: down nbr 10.200.254.5:0:: created [1 total]

    %LDP-5-GR: GR session 10.200.254.5:0 (inst. 3): interrupted--recovery pending

    LDP GR: GR session 10.200.254.5:0:: bindings retained

    LDP GR: down nbr 10.200.254.5:0:: state change (None -> Reconnect-Wait)

    LDP GR: down nbr 10.200.254.5:0:: reconnect timer started [120000 msecs]

    LDP GR: down nbr 10.200.254.5:0:: added to bindings task queue [1 entries]

    %LDP-5-NBRCHG: LDP Neighbor 10.200.254.5:0 is DOWN

    LDP GR: Tagcon querying for up to 12 bindings update tasks [table 0]

    LDP GR: down nbr 10.200.254.5:0:: requesting bindings MARK for {10.200.254.5:0, 3}LDP GR: down nbr 10.200.254.5:0:: removed from bindings task queue [0 entries]

    LDP GR: Requesting 1 bindings update tasks [0 left in queue]

    sydney#

    sydney#sssshhhhoooowwwwmmmmppppllllssssllllddddppppggggrrrraaaacccceeeeffffuuuullll----rrrreeeessssttttaaaarrrrtttt

    LDP Graceful Restart is enabled

    Neighbor Liveness Timer: 120 seconds

    Max Recovery Time: 120 seconds

    Forwarding State Holding Time: 600 seconds

    Down Neighbor Database (1 records):

    VRF default:

    Peer LDP Ident: 10.200.254.5:0 [inst 3], Local LDP Ident: 10.200.254.4:0 Status: waiting for reconnection (89 seconds left)

    Address list contains 3 addresses:

    10.200.215.2 10.200.254.5 10.200.216.1

    Graceful Restart-enabled Sessions:

    sydney#

    LDP GR: Received FT Sess TLV from 10.200.254.5:0 (fl 0x1, rs 0x0, rconn 120000, rcov 120

    LDP GR: searching for down nbr record (10.200.254.5:0, 10.200.216.1)

    LDP GR: search for down nbr record (10.200.254.5:0, 10.200.216.1) returned 10.200.254

    LDP GR: Added FT Sess TLV (Rconn 120000, Rcov 120000) to INIT msg to 10.200.254.5:0

    LDP GR: GR session 10.200.254.5:0:: allocated instance, 1

    LDP GR: GR session 10.200.254.5:0:: established

    LDP GR: GR session 10.200.254.5:0:: found down nbr 10.200.254.5:0

    LDP GR: down nbr 10.200.254.5:0:: reconnect timer stopped

    LDP GR: down nbr 10.200.254.5:0:: state change (Reconnect-Wait -> Recovering)

    LDP GR: down nbr 10.200.254.5:0:: recovery timer started [120000 msecs]

    %LDP-5-GR: GR session 10.200.254.5:0 (inst. 1): starting graceful recovery

    %LDP-5-NBRCHG: LDP Neighbor 10.200.254.5:0 is UP

    contin

  • 8/10/2019 1974_chp4ONLa

    7/8

    663 Chapter 4: Label Distribution Protocol

    It is easy to see if an LSR is running MPLS LDP Graceful Restart in SSO/NSF mode or in Helper

    mode. An LSR that is running MPLS LDP Graceful Restart in Helper mode does not have the

    command mpls ldp graceful-restart timers forwarding-holding secs. It can also be seen in the

    output of the command show mpls ldp graceful-restart. The LSR that is running MPLS LDP

    Graceful Restart in Helper mode does not display a Forwarding State Holding Time when you

    type the command show mpls ldp graceful-restart. The router that is running MPLS LDP

    Graceful Restart signals its LDP peers that it is in Helper mode by setting the Reconnect Timeout

    %OSPF-5-ADJCHG: Process 1, Nbr 10.200.254.5 on Serial5/0 from LOADING to FULL, Loading Done

    sydney#sssshhhhoooowwwwmmmmppppllllssssllllddddppppggggrrrraaaacccceeeeffffuuuullll----rrrreeeessssttttaaaarrrrtttt

    LDP Graceful Restart is enabled

    Neighbor Liveness Timer: 120 seconds

    Max Recovery Time: 120 seconds

    Forwarding State Holding Time: 600 seconds

    Down Neighbor Database (1 records):

    VRF default:

    Peer LDP Ident: 10.200.254.5:0 [inst 3], Local LDP Ident: 10.200.254.4:0

    Status: recovering (68 seconds left)

    Address list contains 0 addresses:

    Graceful Restart-enabled Sessions:

    VRF default:

    Peer LDP Ident: 10.200.254.5:0, State: estab

    sydney#

    LDP GR: down nbr 10.200.254.5:0:: recovery timer expired

    %LDP-5-GR: GR session 10.200.254.5:0 (inst. 1): completed graceful recovery

    LDP GR: down nbr 10.200.254.5:0:: destroying record [0 left]

    LDP GR: down nbr 10.200.254.5:0:: state change (Recovering -> Delete-Wait)

    LDP GR: down nbr 10.200.254.5:0:: added to bindings task queue [1 entries]

    LDP GR: Tagcon querying for up to 12 bindings update tasks [table 0]

    LDP GR: down nbr 10.200.254.5:0:: requesting bindings DEL for {10.200.254.5:0, 3}

    LDP GR: down nbr 10.200.254.5:0:: removed from bindings task queue [0 entries]

    LDP GR: Requesting 1 bindings update tasks [0 left in queue]

    LDP GR: GR session 10.200.254.5:0:: released instance, 3

    Example 4-2 Example of LDP Graceful Restart: LDP Neighbor Going Down and Recovering (Continued)

  • 8/10/2019 1974_chp4ONLa

    8/8

    LDP Graceful Restart

    to 0. Look at Example 4-3. You can see that the router sydney runs MPLS LDP Graceful Res

    in SSO/NSF mode, and router rome runs it in Helper mode.

    Example 4-3 LDP Graceful Restart: Helper Mode Versus SSO/NSF Mode

    sydney#sssshhhhoooowwwwmmmmppppllllssssllllddddppppggggrrrraaaacccceeeeffffuuuullll----rrrreeeessssttttaaaarrrrtttt

    LDP Graceful Restart is enabled

    Neighbor Liveness Timer: 120 seconds

    Max Recovery Time: 120 seconds

    Forwarding State Holding Time: 600 seconds

    Down Neighbor Database (0 records):

    Graceful Restart-enabled Sessions:

    VRF default:

    Peer LDP Ident: 10.200.254.3:0, State: estab

    Peer LDP Ident: 10.200.254.5:0, State: estab

    sydney(config)#mmmmppppllllssssllllddddppppggggrrrraaaacccceeeeffffuuuullll----rrrreeeessssttttaaaarrrrttttttttiiiimmmmeeeerrrrssss????

    forwarding-holding Forwarding State Holding time max-recovery Max-Recovery time

    neighbor-liveness Neighbor-Liveness time

    rome#sssshhhhoooowwwwmmmmppppllllssssllllddddppppggggrrrraaaacccceeeeffffuuuullll----rrrreeeessssttttaaaarrrrtttt

    LDP Graceful Restart is enabled

    Neighbor Liveness Timer: 120 seconds

    Max Recovery Time: 120 seconds

    Down Neighbor Database (0 records):

    Graceful Restart-enabled Sessions:

    VRF Default-IP-Routing-Table:

    Peer LDP Ident: 10.200.254.4:0, State: estab

    Peer LDP Ident: 10.200.254.2:0, State: estab

    rome#

    rome(config)#mmmmppppllllssssllllddddppppggggrrrraaaacccceeeeffffuuuullll----rrrreeeessssttttaaaarrrrttttttttiiiimmmmeeeerrrrssss????

    max-recovery Max-Recovery time

    neighbor-liveness Neighbor-Liveness time

    rome#

    LDP GR: Added FT Sess TLV (Rconn 0, Rcov 120000) to INIT msg to 10.200.254.4:0