idnits 2.17.1 draft-ietf-mpls-ldp-state-02.txt: ** The Abstract section seems to be numbered Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents -- however, there's a paragraph with a matching beginning. Boilerplate error? ** The document is more than 15 pages and seems to lack a Table of Contents. == No 'Intended status' indicated for this document; assuming Proposed Standard == The page length should not exceed 58 lines per page, but there was 75 longer pages, the longest (page 2) being 60 lines == It seems as if not all pages are separated by form feeds - found 0 form feeds but 76 pages Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an Introduction section. ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** The abstract seems to contain references ([4]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == Line 199 has weird spacing: '...Control block...' == Line 205 has weird spacing: '...E, and it...' == Line 1452 has weird spacing: '... _Block for U...' == Line 3152 has weird spacing: '...(FEC is being...' == Line 3353 has weird spacing: '...from an upstr...' -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (October 1999) is 8960 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Missing reference section? '4' on line 3377 looks like a reference -- Missing reference section? '3' on line 94 looks like a reference -- Missing reference section? '5' on line 114 looks like a reference -- Missing reference section? '1' on line 124 looks like a reference -- Missing reference section? '2' on line 1626 looks like a reference Summary: 8 errors (**), 0 flaws (~~), 9 warnings (==), 7 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 MPLS Working Group Christophe Boscher 3 Internet Draft Pierrick Cheval 4 Expiration Date: April 2000 Alcatel France 6 Liwen Wu 7 Cisco 9 Eric Gray 10 Lucent 12 October 1999 14 LDP State Machine 15 draft-ietf-mpls-ldp-state-02.txt 17 Status of this Memo 19 This document is an Internet-Draft and is in full conformance with 20 all provisions of Section 10 of RFC2026. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF), its areas, and its working groups. Note that other 24 groups may also distribute working documents as Internet- Drafts. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 The list of current Internet-Drafts can be accessed at 32 http://www.ietf.org/ietf/1id-abstracts.txt 34 The list of Internet-Draft Shadow Directories can be accessed at 35 http://www.ietf.org/shadow.html. 37 Distribution of this memo is unlimited. 39 Copyright Notice 41 Copyright (C) The Internet Society (1998). All Rights Reserved. 43 1. Abstract 45 In the current LDP specification [4], there is no state machine 46 specified for processing the LDP messages. We think that defining a 47 common state machine is very important for interoperability between 48 different ldp implementations. 50 This document provides state machine tables for ATM switch LSRs. We 51 begin in section 2 by defining a list of terminologies. Then in 52 section 3, we propose two sets of state machine tables for ATM switch 53 LSRs which use downstream-on-demand mode, one method can be used for 54 non-vc merge-able ATM LSRs, while the other one can be used for the 55 vc-merge-able ATM LSRs. In section 4, we provides a state machine 56 for downstream mode ATM LSR. 58 We focus on the LDP state machines and the associated control blocks. 59 We not describe the "LDP controller" which is in charge of LDP 60 session initialization, address mapping messages management, routing 61 interface, etc. Specifically, the LDP specification [4] defines the 62 state machine for session management. 64 Even though the state machines in this document are specific for 65 ATM-LSR, they can be easily adapted for other types of LSRs. 67 2. Terminologies 69 - LDP-REQUEST: LDP Label Request message 71 - LDP-MAPPING: LDP Label Mapping message 73 - LDP-WITHDRAW: LDP Label Withdraw message 75 - LDP-RELEASE: LDP Label Release message 77 - LDP-ABORT: LDP Abort message used to abort a LSP setup. 79 - LDP-NAK: LDP Notification message used to reject an LDP message. 81 3. State Machine for Downstream-on-Demand Mode 83 In this draft, we provide two sets of state machines: one for the ATM 84 LSR which does not have VC-merge capability, and the other one for 85 the ATM LSR which does have VC-merge capability. 87 State machine descriptions are given in terms of control blocks, 88 states, events, response actions and state transitions. Control 89 blocks contain the information that is required to support handling 90 of events. A control block may also contain any additional 91 information that is required either of any specific implementation or 92 in support of other required functions. In every case, additional 93 information required to support the procedures defined in the LDP 94 specification [4] or management objects defined in the LDP MIB [3] 95 would be stored in a specific LDP implementation - either as part of 96 the control block structure or in some other way. 98 The state machines cover both independent LSP control and ordered LSP 99 control. 101 Loop detection and loop prevention message will be processed as 102 specified in [4]. The impact of loop detection and loop prevention 103 messages on state transitions is left for further study. 105 3.0 An LSR's Behavior in the Case of a Next Hop Change 107 When there is a topology change and an LSR detects a new better next 108 hop for an LSP, it may behave in 2 different ways: 110 1) It tries to do a "local repair". This means that it extends the 111 LSP through the new next hop, releases the old path from this LSR 112 forward and then splices into this newly extended LSP. 114 2) If the LSP is created with the "pinned" option (CR-LDP[5]), the 115 LSR ignores the new next hop change, and the LSP stays unchanged. The 116 LSR may decide to send an LDP-MAPPING which contains the attribute 117 about this New Next Hop (NH) change. 119 3.1. ATM Switch LSR with NO VC-merge 121 In an MPLS domain where some ATM LSRs do not have VC-merge 122 capability, downstream-on-demand mode is required for these ATM LSRs 123 [1]. Also, "conservative label retention mode" is required in this 124 case [1]. 126 For each LSP, there are 2 kinds of state machines involves: 128 1) the LSP Control Block and its state machine which can be used to 129 handle normal LSP setup. It is created when the LSR receives a new 130 LDP Request and it is deleted when the LSP of this request is torn 131 down. 133 2) the Next Hop Trigger Control Block and its state machine which is 134 used to handle switching over to a better LSP through a different 135 next hop. It is created when the LSR decides to switch over to a 136 better next hop and it is deleted when the LSR finishes switching 137 over to the better next hop. This state machine uses a timer (and 138 has corresponding states) to ensure that switch over occurs in a 139 timely fashion. 141 3.1.1 LSP Control Block 143 For each LSP, an LSP_Control_Block is defined which may contain the 144 following information: 146 - Upstream Label Request ID (assigned by the upstream LSR), which 147 is the 'Message Id' in the Label Request Message received from the 148 upstream LSR. 150 - Downstream Label Request ID (assigned by this LSR itself), which 151 is 'Message Id' in the Label Request Message sent to the downstream 152 LSR. 154 - Upstream LDP Identifier 156 - Downstream LDP Identifier 158 - State 160 - FEC 162 - Upstream Label (assigned by this LSR) 164 - Downstream Label (assigned by the downstream LSR) 166 - Trigger Control Block Pointer, (Only used at the ingress LSR of a 167 LSP)which points to the control block that triggers setting up this 168 LSP or tearing down this LSP. 170 - Next Hop Control Block Pointer, which points to the control block 171 which is used for switching over to a better LSP. 173 The following index combinations can be used to locate a unique 174 LSP_Control_Block: 176 - Downstream Label and Downstream LDP Identifier, or 178 - Upstream Label and Upstream LDP Identifier, or 180 - Downstream Label Request ID and Downstream LDP Identifier 182 - Upstream Label Request ID and Upstream LDP Identifier 184 Here is the relationship between different control blocks, the detail 185 definition of Next Hop Trigger Block is described in section 3.1.6. 187 For example, an LSP which transit through (LSR-A, LSR-B, LSR-C, LSR- 188 D): 190 LSR-A ----> LSR-B ---> LSR-C ---> LSR-D 192 The control blocks in LSR-A are: 194 +-----------------------+ 195 | Trigger Control Block | 196 | (e.g, by config) | 197 +-----------------------+ 198 ^ 199 |(Trigger Control block pointer) | 200 | 201 +-----------------------+ 202 | LSP Control Block | 203 +-----------------------+ 205 When LSR-B detects a better next hop to LSR-D through LSR-E, and it 206 decides to switch over to it, so control blocks in LSR-B are: 208 +-----------------------+ 209 | LSP Control Block | 210 | (original LSP) | 211 +-----------------------+ 212 (LSP ^ | 213 Control | | (Next Hop Control Block Pointer) 214 Block | | 215 Pointer) | v 216 +--------------------------------+ 217 | Next Hop Trigger Control Block | 218 +--------------------------------+ 219 ^ | 220 (Trigger | | (New Next Hop LSP 221 Control | | Control Block Pointer) 222 Block | | 223 Pointer)| | 224 | v 225 +------------------------+ 226 | LSP Control Block | 227 | (for LSP: LSR-B, LSR-E,| 228 | LSR-D) | 229 +------------------------+ 231 3.1.2 States 233 This section describes the various states that are used in the state 234 machine for the ATM non VC-merge LSR. 236 -- IDLE 238 This is the initial LSP state, when the LSP_Control_Block is created. 240 -- RESPONSE_AWAITED 242 This state means that the LSR has received and processed an LDP- 243 REQUEST from an upstream LSR, or it has received an internal set up 244 request. It has sent a new LDP-REQUEST towards a downstream LSR. The 245 LSR is waiting for the LDP-MAPPING from the downstream LSR. 247 -- ESTABLISHED 249 This state means that the LSR has received the LDP-MAPPING from the 250 downstream LSR and the LSP is up and operational. 252 -- RELEASE_AWAITED 254 This state means that the LSR has sent a LDP-WITHDRAW upstream and is 255 waiting for the LDP-RELEASE before freeing up the label resource. 257 3.1.3 Events 259 -- LDP Request 261 The LSR receives an LDP-REQUEST from an upstream LSR. 263 -- LDP Mapping 265 The LSR receives an LDP-MAPPING from a downstream LSR. 267 -- LDP Release 269 The LSR receives an LDP-RELEASE from an upstream LSR. 271 -- LDP Withdraw 273 The LSR receives an LDP-WITHDRAW from a downstream LSR. 275 -- LDP Upstream Abort 277 The LSR receives an LDP-ABORT from an upstream LSR. 279 -- LDP Downstream NAK The LSR receives an LDP-NAK (notification) from 280 an downstream LSR. 282 -- Upstream Lost 283 The LSR loses its LDP session with an upstream LDP peer. 285 -- Downstream Lost 287 The LSR loses its LDP session with a downstream LDP peer. 289 -- Internal SetUp 291 For some reason, e.g. a configuration request of a traffic 292 engineering tunnel, or recognizing a new FEC could trigger an 293 Internal SetUp event to set up a new LSP from this node. 295 -- Internal Destroy 297 The LSR send an Internal Destroy event to tear down an LSP. 299 -- Internal Cross-Connect 301 The LSR send an Internal Cross-Connect to splice two LSPs into one 302 LSP. This happens when a LSR switchs over to a better next hop 304 -- Internal New NH 306 The LSR decides to switch over the better next hop. 308 3.1.4 State Transitions 310 The following diagram describes briefly the state transitions. 312 +-------------------+ 313 | | 314 +-------->| IDLE |<--------------+ 315 | | | | 316 | +-------------------+ |(LDP Release) 317 |(LDP Upstream | | 318 | Abort) |(LDP Request) |(LDP Upstream Abort) 319 |(Downstream Lost) |(Internal SetUp) | 320 |(Downstream NAK) | |(LDP Downstream NAK) 321 |(Upstream Lost) v |(Upstream Lost) 322 | +-------------------+ | 323 | | | | 324 +---------| RESPONSE_AWAITED | | 325 | | | 326 +-------------------+ | 327 | | 328 |(LDP Mapping) | 329 | | 330 v | 331 +-------------------+ | 332 | | | 333 | ESTABLISHED |------------>--+ 334 | | | 335 +-------------------+ | 336 | | 337 | | 338 |(LDP Withdraw) | 339 |(Downstream Lost) | 340 | | 341 v | 342 +-------------------+ | 343 | | | 344 | RELEASE_AWAITED |------------>--+ 345 | | 346 +-------------------+ 348 3.1.5 State Machine 350 3.1.5.1 State -- "IDLE" 352 State: IDLE 353 Event: LDP Request 355 New State: Depends upon the action routine 357 Actions: 359 If this LSR is the LSP Egress or Proxy Egress [2] 361 Then: 362 Choose an upstream label, connect this upstream label to the local 363 IP forwarding module, allocate the resources, send the LDP-MAPPING 364 upstream with the upstream label, and go to the new state 365 `ESTABLISHED'. 367 else 368 Obtain a next hop (or interface) with the FEC specified in the 369 LDP-REQUEST, propagate the LDP-REQUEST, with newly assigned Message 370 ID by this LSR, towards the obtained next hop, and go to the new 371 state `RESPONSE_AWAITED'. 373 If the LSR uses the independent control mode [2], choose an 374 upstream label, connect this upstream label to the local IP 375 forwarding module, and send an LDP-MAPPING upstream with the 376 upstream label. 378 If unable to process the request for any reason, issue an LDP-NAK to 379 the sender with the appropriate error code and delete the control 380 block. 382 State: IDLE 384 Event: LDP Mapping 386 New State: IDLE 388 Actions: 390 Ignore the event. It is an internal implementation error. 392 State: IDLE 394 Event: LDP Release 396 New State: IDLE 398 Actions: 400 Ignore the event. It is an internal implementation error. 402 State: IDLE 404 Event: LDP Withdraw 406 New State: IDLE 408 Actions: 410 Ignore the event. It is an internal implementation error. 412 State: IDLE 414 Event: LDP Upstream Abort 416 New State: IDLE 418 Actions: 420 Ignore the event. It is an internal implementation error. 422 State: IDLE 424 Event: LDP Downstream NAK 426 New State: IDLE 428 Actions: 430 Ignore the event. It is an internal implementation error. 432 State: IDLE 434 Event: Upstream Lost 436 New State: IDLE 438 Actions: 440 Ignore the event. It is an internal implementation error. 442 State: IDLE 444 Event: Downstream Lost 446 New State: IDLE 447 Actions: 449 Ignore the event. It is an internal implementation error. 451 State: IDLE 453 Event: Internal SetUp 455 New State: RESPONSE_AWAITED 457 Actions: 459 Set up the Trigger Control Block pointer, 461 Obtain a next hop (or interface) with the FEC specified in the 462 Internal SetUp message, send a LDP-REQUEST towards the obtained next 463 hop, and go to the new state `RESPONSE_AWAITED'. 465 State: IDLE 467 Event: Internal Destroy 469 New State: IDLE 471 Actions: 473 Ignore. It is an internal implementation error. 475 State: IDLE 477 Event: Internal Cross-Connect 479 New State: IDLE 481 Actions: 483 Ignore. It is an internal implementation error. 485 State: IDLE 487 Event: Internal New NH 489 New State: IDLE 491 Actions: 493 Ignore. It is an internal implementation error. 495 3.1.5.2 State -- "RESPONSE_AWAITED" 497 State: RESPONSE_AWAITED 499 Event: LDP Request 501 New State: RESPONSE_AWAITED 503 Actions: 505 Ignore the event. It is an internal implementation error. A non VC 506 merge ATM LSR must create a new LSP control block for a new LDP 507 request. 509 State: RESPONSE_AWAITED 511 Event: LDP Mapping 513 New State: ESTABLISHED 515 Actions: 517 1) If the LSP is triggered by the local router (Trigger Control Block 518 Pointer is not zero), send event `Internal LSP UP' to the Trigger 519 control block. 521 2) Else If the LSR uses the ordered control mode, choose an upstream 522 label. 524 3) Connect the upstream label to the downstream label. Allocate the 525 resources. Propagate the LDP-MAPPING upstream with the upstream 526 label. 528 If unable to process the message, disconnect the upstream label from 529 the downstream label, free the upstream label, release the resources, 530 send an LDP-RELEASE downstream and an LDP-NAK upstream with status 531 (No Label Resources [4]), and delete the LSP_Control_Block. 533 State: RESPONSE_AWAITED 535 Event: LDP Release 537 New State: IDLE 539 Actions: 541 If the LSR uses the independent control mode, free the upstream 542 label. 544 Send an LDP-ABORT downstream and delete the LSP_Control_Block. 546 Note: This should only occur if the LSR uses the independent control 547 mode. In the ordered control mode, no upstream label mapping will 548 have been sent corresponding to this LSP while waiting for a label 549 mapping from downstream. 551 State: RESPONSE_AWAITED 553 Event: LDP Withdraw 555 New State: RESPONSE_AWAITED 557 Actions: 559 Ignore the event. It's a protocol error from the downstream LSR. 561 State: RESPONSE_AWAITED 563 Event: LDP Upstream Abort 565 New State: IDLE 567 Actions: 569 If the LSR uses the independent control mode, free the upstream 570 label. 572 Send an LDP-ABORT downstream. 574 Delete the LSP_Control_Block. 576 State: RESPONSE_AWAITED 578 Event: LDP Downstream NAK 580 New State: Depends on the action routine 582 Actions: 584 1. If the LSP is triggered by the local router (Trigger Control Block 585 Pointer is not zero), send event `Internal LSP DOWN' to the Trigger 586 control block. 588 2. Else If the LSR uses the independent control mode, send an LDP- 589 WITHDRAW upstream and go to state `RELEASE_AWAITED'. 591 If the LSR uses the ordered control mode, send an LDP-NAK upstream. 592 Then delete the control block. 594 State: RESPONSE_AWAITED 596 Event: Upstream Lost 598 New State: IDLE 600 Actions: 602 If the LSR uses the independent control mode, free the upstream 603 label. 605 Send an LDP-ABORT downstream and delete the LSP_Control_Block. 607 State: RESPONSE_AWAITED 609 Event: Downstream Lost 611 New State: Depends on the action routine 613 Actions: 615 1. If the LSP is triggered by the local router (Trigger Control Block 616 Pointer is not zero), send event `Internal LSP DOWN' to the trigger 617 control block. 619 2. Else, If the LSR uses the independent control mode, free the 620 upstream label and send an LDP-WITHDRAW upstream and go to state 621 `RELEASE_AWAITED'. 623 If the LSR uses the ordered control mode, send an LDP-NAK upstream 624 (with a status `No Route' [4]) and then delete the control block. 626 State: RESPONSE_AWAITED 628 Event: Internal SetUp 630 New State: RESPONSE_AWAITED 632 Actions: 634 Ignore, it is an internal implementation error. 636 State: RESPONSE_AWAITED 638 Event: Internal Destroy 640 New State: IDLE 642 Actions: 644 Send an LDP-ABORT downstream and delete the LSP_Control_Block. 646 State: RESPONSE_AWAITED 648 Event: Internal Cross-Connect 650 New State: RESPONSE_AWAITED 652 Actions: 654 Ignore the event. It is an internal implementation error. 656 State: RESPONSE_AWAITED 658 Event: Internal New NH 660 New State: RESPONSE_AWAITED 662 Actions: 664 Send LDP-ABORT to the old downstream, and send LDP-REQUEST to the new 665 next hop. 667 3.1.5.3 State --"ESTABLISHED" 669 State: ESTABLISHED 671 Event: LDP Request 673 New State: ESTABLISHED 675 Actions: 677 Ignore the event. It's an internal implementation error. For non VC- 678 merge ATM LSR, a new LSP control block is always created for each LDP 679 request. 681 State: ESTABLISHED 683 Event: LDP Mapping 684 New State: ESTABLISHED 686 Actions: 688 Process the LDP-MAPPING, which may contain the new attributes of the 689 label mapping and then propagate the LDP-MAPPING upstream. 691 State: ESTABLISHED 693 Event: LDP Release 695 New State: IDLE 697 Actions: 699 Disconnect the upstream label from the downstream label. 701 Free the upstream label. 703 Free the resources. 705 Send event `Internal Destroy' to the Next Hop Trigger Block if it was 706 in the middle of switching over to the better next hop. 708 Propagate the LDP-RELEASE downstream if the LSR is not the end of LSP 709 and delete the LSP_Control_Block. 711 State: ESTABLISHED 713 Event: LDP Withdraw 715 New State: Depends on the action routine. 717 Actions: 719 1) Free the resources and send LDP-RELEASE downstream. 721 2) If it is independent control mode, set the state to `IDLE', create 722 a internal LDP Request with the information in the LSP_Control_Block, 723 and pass event `LDP Request' to its own state machine. 725 3) Else for the ordered control mode 727 3.1)If the LSP is triggered to be setup by itself (e.g it is the 728 ingress LSR of this LSP), send event `Internal LSP NAK' to the 729 trigger control block and delete the control block 731 3.2) else, if it is triggered by the incoming LDP Request, 732 Disconnect the upstream label from the downstream label. Propagate 733 the LDP-WITHDRAW upstream and go to state `RELEASE_AWAITED'. 735 3.3) If the LSP is in the middle of switching over to a better LSP, 736 send event `Internal Destroy' to the state machine of its New Next 737 Hop LSP Control Block. 739 State: ESTABLISHED 741 Event: LDP Upstream Abort 743 New State: IDLE 745 Actions: 747 Disconnect the upstream label from the downstream label. 749 Free the upstream label. 751 Send event `Internal Destroy' if the LSR was in the middle of 752 switching over to the better next hop. 754 Propagate an LDP-RELEASE downstream and delete the LSP_Control_Block. 756 State: ESTABLISHED 758 Event: LDP Downstream NAK 760 New State: ESTABLISHED 762 Actions: 764 Ignore the event. It is a protocol error from the downstream LSR. 765 The downstream LSR should always LSP-WITHDRAW to tear down the LSP 766 when the LSP is established. 768 State: ESTABLISHED 770 Event: Upstream Lost 772 New State: IDLE 774 Actions: 776 Disconnect the upstream label from the downstream label. 778 Free the upstream label. 780 Send event `Internal Destroy' to the Next Hop Trigger Control Block 781 if it was in the middle of switching over to the better next hop. 783 Free the resources. 785 Propagate an LDP-RELEASE downstream and delete the LSP_Control_Block. 787 State: ESTABLISHED 789 Event: Downstream Lost 791 New State: Depends on the actions 793 Actions: 795 1) If the LSP is triggered by the local router (Trigger Control Block 796 Pointer is not zero), send event `Internal LSP NAK' to the Trigger 797 control block and delete the control block. 799 2) Else, disconnect the upstream label from the downstream label. 800 Propagate an LDP-WITHDRAW upstream and go to `RELEASE_AWAITED' state. 802 3) Send event `Internal Destroy' to the Next Hop Trigger Control 803 Block if it was in the middle of switching over to the better next 804 hop. 806 State: ESTABLISHED 808 Event: Internal Setup 810 New State: ESTABLISHED 812 Actions: 814 Ignore, it is an internal implementation error. 816 State: ESTABLISHED 818 Event: Internal Destroy 820 New State: IDLE 822 Actions: 824 Disconnect the upstream label from the downstream label if it is not 825 the ingress of the LSP. 827 Free the resources. 829 Send an LDP-RELEASE downstream and delete the LSP_Control_Block. 831 State: ESTABLISHED 833 Event: Internal Cross-Connect 835 New State: ESTABLISHED 837 Actions: 839 Connect the upstream label to the downstream label 841 May need to send a new LDP-MAPPING upstream with the attributes from 842 the new next hop. 844 Reset Trigger Control Block Pointer to zero. 846 State: ESTABLISHED 848 Event: Internal New NH 850 New State: ESTABLISHED 852 Actions: 854 1) If the LSR was in the middle of switching over to a better next 855 hop (Next Hop Trigger Control Block Pointer is not zero), it send 856 `Internal New NH' to that control block. 858 2) Else, create a new Next Hop Trigger Control Block, set Next Hop 859 Trigger Control Block pointer which points this control block. And 860 then pass `Internal New NH' to this control block. 862 3.1.5.4 State --"RELEASE_AWAITED" 864 State RELEASE_AWAITED 866 Event LDP Request 868 New State: RELEASE_AWAITED 870 Actions: 872 Ignore the event. It is an internal implementation error. 874 State: RELEASE_AWAITED 876 Event: LDP Mapping 878 New State: RELEASE_AWAITED 880 Actions: 882 It is an protocol error from the downstream LDP peer, but anyway send 883 a LDP-RELEASE downstream. 885 State: RELEASE_AWAITED 887 Event: LDP Release 889 New State: IDLE 891 Actions: 893 1) Free the upstream label 895 2) Delete the control block. 897 State: RELEASE_AWAITED 899 Event: LDP Withdraw 901 New State: RELEASE_AWAITED 903 Actions: 905 It is an protocol error from the downstream LDP peer, but send a 906 LDP-RELEASE anyway. 908 State: RELEASE_AWAITED 910 Event: LDP Upstream NAK 912 New State: IDLE 914 Actions: 916 1) Free the upstream label 918 2) Delete the control block. 920 State: RELEASE_AWAITED 922 Event: LDP Downstream NAK 924 New State: RELEASE_AWAITED 926 Actions: 928 Ignore the event. Continue waiting for the LDP-RELEASE from upstream. 930 State: RELEASE_AWAITED 932 Event: Upstream Lost 934 New State: IDLE 936 Actions: 938 1) Free the upstream label 940 2) Delete the control block. 942 State: RELEASE_AWAITED 944 Event: Downstream Lost 946 New State: RELEASE_AWAITED 948 Actions: 950 Ignore the event. Continue waiting for the LDP-RELEASE from upstream. 952 State: RELEASE_AWAITED 954 Event: Internal SetUp 956 New State: RELEASE_AWAITED 958 Actions: 960 Ignore the event. It is an internal implementation error. 962 State: RELEASE_AWAITED 964 Event: Internal Destroy 965 New State: RELEASE_AWAITED 967 Actions: 969 Ignore the event. It is an internal implementation error. 971 State: RELEASE_AWAITED 973 Event: Internal Cross-Connect 975 New State: RELEASE_AWAITED 977 Actions: 979 Ignore the event. It is an internal implementation error. 981 3.1.6 Handling the Next Hop Change 983 When an LSR detects a better next hop, it may decides to establish a 984 new LSP through this next hop. For example, an LSR is configured as 985 "local repair", or the LSR is configured as "global repair" and it is 986 the ingress end of a LSP. It can then create a Next Hop Trigger 987 Control Block and use the state machine of Next Hop Trigger Control 988 Block to establish a new LSP through the better next hop. 990 3.1.6.1 Next Hop Trigger Control Block 992 -- State 994 -- LSP Control Block Pointer, which points to the original LSP 995 control block. 997 -- New Next Hop LSP Control Block Pointer, which points to the LSP 998 Control Block that is setting up an LSP through the new next hop. 1000 3.1.6.2 States 1002 -- IDLE 1004 This is the initial LSP state, when the Trigger_Control_Block is 1005 created. 1007 -- NEW_NH_RETRY 1009 This is the state where an LSR waits for a retry timer to expire and 1010 then tries to establish an LSP through a new next hop. 1012 -- NEW_NH_RESPONSE_AWAITED 1014 This is the state where an LSR is in the middle of establishing a new 1015 LSP through a new next hop. It has triggered a LSP control block to 1016 send an LDP-REQUEST towards the new next hop and is waiting for the 1017 LDP-MAPPING. 1019 3.1.6.3 Events 1021 -- Internal New NH 1023 The LSR detects there is a new next hop for a FEC. 1025 -- Internal Retry Timeout 1027 The LSP retry timer expires. 1029 -- Internal LSP UP 1031 The LSP to the new Next Hop is UP 1033 -- Internal LSP NAK 1035 The LSP through the new next hop could not get set up 1037 -- Internal Destroy 1039 This event is triggered when the LSR lost the LDP session with its 1040 upstream neighbor. 1042 3.1.6.4 State Transition for next hop change 1044 | 1045 | 1046 | 1047 | Internal New NH 1048 | 1049 v 1050 +---------------------+ 1051 | | Internal destroy 1052 | NEW_NH_RETRY |-------------- 1053 | | | 1054 +---------------------+ | 1055 | | 1056 | | 1057 | (Internal retry timeout) | 1058 | | 1059 v | 1060 +---------------------+ | 1061 | | Internal | 1062 | NEW_NH_RESPONSE | Destroy | 1063 | _AWAITED |-------------| 1064 | | | 1065 +---------------------+ | 1066 | | 1067 | (Internal LSP UP) | 1068 | (Internal LSP NAK) | 1069 v v 1070 the control block is deleted 1072 3.01.3 State Machine 1074 3.01.3.1 State -- "IDLE" 1076 State: IDLE 1078 Event: Internal New NH 1080 New State: NEW_NH_RETRY 1082 Actions: 1084 Start the LSP retry timer and go to the `NEW_NH_RETRY' state. 1086 State: IDLE 1088 Event: Internal retry timeout 1089 New State: IDLE 1091 Actions: 1093 Ignore. It is an internal implementation error. 1095 State: IDLE 1097 Event: Internal LSP UP 1099 New State: IDLE 1101 Actions: 1103 Ignore. It is an internal implementation error. 1105 State: IDLE 1107 Event: Internal LSP NAK 1109 New State: IDLE 1111 Actions: 1113 Ignore. It is an internal implementation error. 1115 State: IDLE 1117 Event: Internal destroy 1119 New State: IDLE 1121 Actions: 1123 Ignore. It is an internal implementation error. 1125 3.01.3.2 State -- "NEW_NH_RETRY" 1127 State: NEW_NH_RETRY 1129 Event: Internal New NH 1131 New State: NEW_NH_RETRY 1133 Actions: 1135 Restart the LSP retry timer. 1137 State: NEW_NH_RETRY 1139 Event: Internal retry timeout 1141 New State: NEW_NH_RESPONSE_AWAITED 1143 Actions: 1145 If the new next hop is the same one as the old next hop, delete the 1146 control block. 1148 Otherwise, create an LSP control block which will try to establish a 1149 new LSP through the new next hop. And send event `Internal Setup' to 1150 its state machine. 1152 State: NEW_NH_RETRY 1154 Event: Internal LSP UP 1156 New State: NEW_NH_RETRY 1158 Actions: 1160 Ignore. It is an internal implementation error. 1162 State: NEW_NH_RETRY 1164 Event: Internal LSP NAK 1166 New State: NEW_NH_RETRY 1168 Actions: 1170 Ignore. It is an internal implementation error. 1172 State: NEW_NH_RETRY 1174 Event: Internal destroy 1176 New State: IDLE 1178 Actions: 1180 Stop the timer and delete the control block. 1182 3.01.3.3 State -- "NEW_NH_RESPONSE_AWAITED" 1183 State: NEW_NH_RESPONSE_AWAITED 1185 Event: Internal New NH 1187 New State: NEW_NH_RETRY 1189 Actions: 1191 Restart the LSP retry timer, send `Internal destroy' to the control 1192 block of the LSP for the new next hop and go to the `NEW_NH_RETRY' 1193 state. 1195 State: NEW_NH_RESPONSE_AWAITED 1197 Event: Internal retry timeout 1199 New State: NEW_NH_RESPONSE_AWAITED 1201 Actions: 1203 Ignore. It is an internal implementation error. 1205 State: NEW_NH_RESPONSE_AWAITED 1207 Event: Internal LSP UP 1209 New State: IDLE 1211 Actions: 1213 Send event `Internal cross-connect' event to the LSP control block of 1214 the new next hop. 1216 Send event `Internal destroy' event to the original LSP control 1217 block. 1219 Then delete the control block. 1221 State: NEW_NH_RESPONSE_AWAITED 1223 Event: Internal LSP NAK 1225 New State: IDLE 1227 Actions: 1229 Delete the control block. 1231 State: NEW_NH_RESPONSE_AWAITED 1233 Event: Internal destroy 1235 New State: IDLE 1237 Actions: 1239 Send event `Internal destroy' the control block for the new LSP 1240 through the new next hop. 1242 3.1.7 LDP Related Message Handling 1244 - If an LSR receives an LDP-REQUEST from an upstream LSR: 1246 a) If this is a duplicate request, discard the message. A duplicate 1247 request means that there is a LSP_Control_Block which has same FEC, 1248 same Upstream Label Request ID and same Upstream LDP Session 1249 Identifier. 1251 b) Otherwise, create a new LSP_Control_Block, store the relevant 1252 information from the message into the control block, then pass the 1253 event `LDP Request' to its state machine. 1255 - If an LSR receives an LDP-MAPPING from a downstream LSR: 1257 a) Extract the 'Label Request Message ID' field and from the LDP- 1258 MAPPING. 1260 b) Find an LSP_Control_Block which has the same Downstream Label 1261 Request ID and the same Downstream LDP Session Identifier. 1263 c) If an LSP_Control_Block is found, pass the event `LDP Mapping' to 1264 its state machine. 1266 d) If there is no matching LSP_Control_Block found, then try to find 1267 an LSP_Control_Block which has the same Downstream Label and the same 1268 Downstream LDP Session Identifier. 1270 e) If an LSP_Control_Block is found, pass the event `LDP Mapping' to 1271 its state machine. 1273 f) Otherwise, ignore the LDP-MAPPING and send a LDP-RELEASE 1274 downstream. 1276 - If an LSR receives an LDP-RELEASE from an upstream LSR: 1278 a) Find an LSP_Control_Block which has the same Upstream Label and 1279 the same Upstream LDP Session Identifier. 1281 b) If an LSP_Control_Block is found, pass the event `LDP Release' to 1282 its state machine. 1284 c) Otherwise, ignore the message. 1286 - If an LSR receives an LDP-WITHDRAW from a downstream LSR: 1288 a) Find an LSP_Control_Block which has the same Downstream Label and 1289 the same Downstream LDP Session Identifier. 1291 b) If an LSP_Control_Block is found, pass the event `LDP Withdraw' to 1292 its state machine. 1294 c) Otherwise, ignore the LDP-WITHDRAW and send a LDP-RELEASE 1295 downstream. 1297 - If an upstream LDP peer is lost: 1299 a) Find all the LSP_Control_Blocks whose upstream LDP peer is that 1300 LSR. 1302 b) Then pass the event `Upstream Lost' to their state machines. 1304 - If a downstream LDP peer is lost: 1306 a) Find all the LSP_Control_Blocks whose downstream LDP peer is that 1307 LSR. 1309 b) Then pass the event `Downstream Lost' to their state machines. 1311 - If the LSR detects a new next hop for an FEC: 1313 For each LSP which needs "local repair", or it needs "global repair" 1314 and it is the ingress of the LSP, pass event "Internal New NH" to its 1315 state machine. 1317 - If an LSR receives an LDP-Abort from an upstream LSR: 1319 a) Extract the LDP Request ID value from the LDP-Abort message. 1321 b) Find an LSP_Control_Block which has the same Upstream Label 1322 Request ID and the same Upstream LDP Session Identifier. 1324 c) If an LSP_Control_Block is found, pass the event `LDP Upstream 1325 Abort' to its state machine. 1327 d) Otherwise, ignore the message. 1329 - If the LSR receives an LDP-NAK from a downstream LSR: 1331 a) Extract the LDP Request ID value from the LDP-NAK. 1333 b) Find an LSP_Control_Block which has the same Downstream Label 1334 Request ID and the same Downstream LDP Session Identifier. 1336 c) If an LSP_Control_Block is found, pass the event `LDP Downstream 1337 NAK' to its state machine. 1339 d) Otherwise, ignore the message. 1341 3.2. ATM Switch LSR with VC-merge 1343 3.2.1 VC-merge 1345 A VC-merge capable LSR can map multiple incoming labels (VPI/VCI) 1346 into one outgoing label. It is possible that this LSR can only merge 1347 a limited number of incoming labels into a single outgoing label. As 1348 described in [2], suppose, for example, that due to some hardware 1349 limitation a node is capable of merging four incoming labels into a 1350 single outgoing label. Suppose however, that this particular node has 1351 six incoming labels arriving at it for a particular FEC. In this 1352 case, this node may merge these into two outgoing labels. 1354 When an upstream LSR has a limited merging capability, it is 1355 difficult for a downstream LSR to know how many labels should be 1356 assigned to each FEC. In this case, downstream-on-demand is 1357 recommended. 1359 3.2.2 Control Block 1361 There are 3 types of control blocks involved: 1362 Upstream_LSP_Control_Block, Downstream_LSP_Control_Block, and Next 1363 Hop Trigger Control Block. 1365 There is one Upstream_LSP_Control_Block for each LDP-REQUEST 1366 received. 1368 There is one Downstream_LSP_Control_Block for each unique LDP-REQUEST 1369 sent to a downstream LSR. There can be multiple 1370 Downstream_LSP_Control_Blocks per FEC in an LSR. This can be the 1371 result of an upstream LSR asking for a label for an FEC. This LSR 1372 must assign a unique upstream label and it can not merge this 1373 upstream label into an existing downstream label for this FEC. 1375 There is one Next Hop Trigger Control Block for each FEC for which a 1376 better next hop has been detected and the LSR has decided to switch 1377 to this better next hop. It could be the result of "local repair" or 1378 "global repair" if the LSR is the ingress LSR of the LSP. 1380 A Downstream_LSP_Control_Block contains a list of pointers to 1381 Upstream_LSP_Control_Blocks or the Next Hop Trigger Control Block. 1382 This means that this LSR has decided to map the multiple labels 1383 listed in the Upstream_LSP_Control_Blocks and the Next Hop Trigger 1384 Control Block into a single label listed in the 1385 Downstream_LSP_Control_Block. 1387 An Upstream_LSP_Control_Block may contain the following information: 1389 - Upstream LDP Session Identifier 1391 - State 1393 - Upstream Label (assigned by this LSR) 1395 - Downstream_LSP_Control_Block pointer 1397 - Upstream LDP Request ID (assigned by the upstream LSR in 1398 downstream-on-demand mode) 1400 - Next_Hop_Trigger_Block pointer 1402 Upstream Label and Upstream LDP Session Identifier can be used to 1403 locate a unique Upstream_LSP_Control_Block. 1405 If an LSR is using downstream-on-demand mode, it can use the Upstream 1406 LDP Request ID and the Upstream LDP Session Identifier to locate a 1407 unique Upstream_LSP_Control_Block. 1409 An Next_Hop_Trigger_LSP_Control_Block may contain the following 1410 information: 1412 - Upstream_LSP_Control_Block pointer, which points to the one 1413 which is needed to switch over to the better next hop 1415 - State 1417 - Downstream_LSP_Control_Block pointer 1419 A Downstream_LSP_Control_Block may contain the following information: 1421 - FEC 1422 - State 1424 - Downstream LDP Session Identifier 1426 - list of pointers to the Upstream_LSP_Control_Blocks or the 1427 Trigger_Control_Blocks which are merged at this LSR for this 1428 FEC 1430 - Downstream Label (assigned by the downstream LSR) 1432 - Downstream Label Request ID (assigned by the LSR itself if 1433 it is using downstream-on-demand mode) 1435 Downstream Label, Downstream LDP Session Identifier can be used to 1436 locate a unique Downstream_LSP_Control_Block. 1438 If an LSR is using downstream-on-demand mode, it can also use the 1439 Downstream Label Request ID and the Downstream LDP Session Identifier 1440 to locate a unique Downstream_LSP_Control_Block. 1442 The following diagram details the relationship between these 2 types 1443 of control blocks: 1445 For example, the LSR has decided to merge 3 LDP-REQUESTs of a FEC 1446 from upstream LSR1, LSR2, LSR3 into one LDP-REQUEST and sent it to a 1447 downstream LSR4. 1449 +---------------------+ 1450 | | 1451 | Upstream_LSP_Control| 1452 | _Block for Upstream|------+ 1453 | LSR1 | | 1454 +---------------------+ | 1455 | 1456 +---------------------+ | 1457 | | | 1458 | Upstream_LSP_Control| | (merged into) 1459 | _Block for Upstream |------+ 1460 | LSR2 | | 1461 +---------------------+ | +------------------------------+ 1462 | | | 1463 +---------------------+ +--->| Downstream_LSP_Control_Block | 1464 | Next_Hop_Trigger_ | | | for Downstream LSR4 | 1465 | LSP_Control_Block |------+ | | 1466 | | +------------------------------+ 1467 +---------------------+ 1469 3.2.3 State Machines for Downstream-on-demand Mode 1471 The following sections describe the state machines used in 1472 downstream-on-demand mode. 1474 3.2.3.1 State of the Upstream_LSP_Control_Block's State Machine 1475 for Downstream-on-demand Mode 1477 -- IDLE 1479 This is the initial LSP state. 1481 -- RESPONSE_AWAITED 1483 This state means that the LSR has received and processed an LDP- 1484 REQUEST from an upstream LSR, and has sent a new LDP-REQUEST towards 1485 a downstream LSR. The LSR is waiting for the LDP-MAPPING from the 1486 downstream LSR. 1488 -- ESTABLISHED 1490 This state means that the LSR has received the LDP-MAPPING from the 1491 downstream LSR and the LSP is up and operational. 1493 -- RELEASE_AWAITED 1495 This state means that the LSR has sent a LDP-WITHDRAW upstream and is 1496 waiting for the LDP-RELEASE before freeing up the label resource. 1498 3.2.3.2 Events of the Upstream_LSP_Control_Block's State Machine 1499 for Downstream-on-demand Mode 1501 -- LDP Request 1503 The LSR receives an LDP-REQUEST from an upstream LSR. 1505 -- Internal Downstream Mapping 1507 This event is sent by one Downstream_LSP_Control_Block's state 1508 machine. This Downstream_LSP_Control_Block is the merged 1509 Downstream_LSP_Control_Block of this Upstream_LSP_Control_Block. The 1510 event is the result of receiving an LDP-MAPPING by the 1511 Downstream_LSP_Control_Block's state machine. 1513 -- LDP Release 1514 The LSR receives an LDP-RELEASE from an upstream LSR. 1516 -- Internal Downstream Withdraw 1518 This event is sent by one Downstream_LSP_Control_Block's state 1519 machine. This Downstream_LSP_Control_Block is the merged 1520 Downstream_LSP_Control_Block of this Upstream_LSP_Control_Block. The 1521 event is the result of receiving an LDP-WITHDRAW by the 1522 Downstream_LSP_Control_Block's state machine. 1524 -- LDP Upstream Abort 1526 The LSR receives an LDP-ABORT from an upstream LSR. 1528 -- Internal Downstream NAK 1530 This event is sent by one Downstream_LSP_Control_Block's state 1531 machine. This Downstream_LSP_Control_Block is the merged 1532 Downstream_LSP_Control_Block of this Upstream_LSP_Control_Block. The 1533 event is the result of receiving an LDP-NAK by the 1534 Downstream_LSP_Control_Block's state machine, or it detects an error. 1536 -- Upstream Lost 1538 The LSR loses the LDP session with its upstream LDP peer. 1540 -- Internal New NH 1542 The LSR detects there is better next hop and decides to establish the 1543 lsp through this better next hop 1545 -- Internal Re-Cross-Connect 1547 This event is used to trigger splicing into a different downstream 1548 LSP. This can happens when it is switched over to a better LSP 1549 through the new next hop. 1551 3.2.3.3 State Transitions of the Upstream_LSP_Control_Block's State 1552 Machine for Downstream-on-demand Mode 1554 +-------------------+ 1555 | | 1556 +-------->| IDLE |<------------+ 1557 | | | | 1558 | +-------------------+ | 1559 |(LDP Abort) | | 1560 |(Internal |(LDP Request) | 1561 | Downstream NAK) | | 1562 |(Upstream Lost) | | 1563 | v | 1564 | +-------------------+ | 1565 | | | | 1566 +---------| RESPONSE_AWAITED | | 1567 | | |(Upstream Lost) 1568 +-------------------+ | 1569 | | 1570 |(Internal Downstream | 1571 | mapping) |(LDP Release) 1572 | | 1573 v | 1574 +-------------------+ | 1575 | | |(LDP Abort) 1576 | ESTABLISHED |------->-----+ 1577 | | | 1578 +-------------------+ | 1579 | | 1580 | | 1581 |(Internal Downstream Withdraw) 1582 |(Internal Downstream NAK) 1583 v 1584 +-------------------+ | 1585 | | | 1586 |RELEASE_AWAITED |------->-----+ 1587 | | 1588 +-------------------+ 1590 3.2.3.4 Upstream_LSP_Control_Block's State Machine 1591 for Downstream-on-demand Mode 1593 3.2.3.4.1 State -- "IDLE" 1594 State: IDLE 1596 Event: LDP Request 1598 New State: Depends upon the action routine. 1600 Actions: 1602 If this LSR is the LSP Egress or Proxy Egress [2], 1604 Then: 1606 choose an upstream label, allocate the resources, connect this 1607 upstream label to the local IP forwarding module, send an LDP- 1608 MAPPING upstream with the upstream label and go to the state 1609 `ESTABLISHED'. 1611 else 1613 Obtain a next hop (or interface). Find a 1614 Downstream_LSP_Control_Block which has the same FEC and the same 1615 next hop and also is able to merge more input labels. If not found, 1616 create a new Downstream_LSP_Control_Block with the state `IDLE'. 1618 If the state of the Downstream_LSP_Control_Block is `ESTABLISHED', 1619 choose an upstream label, connect the upstream label with the 1620 downstream label and send an LDP-MAPPING upstream with the upstream 1621 label, and go to the state `ESTABLISHED'. 1623 If the state of Downstream_LSP_Control_Block is not `ESTABLISHED', 1624 set the state of the Upstream_LSP_Control_Block to 1625 `RESPONSE_AWAITED'. If the LSR use the independent control mode 1626 [2], choose an upstream label, and send an LDP-MAPPING upstream. 1628 Pass the event `Internal AddUpstream' to the 1629 Downstream_LSP_Control_Block's state machine. 1631 If unable to process the request for any reason, issue an LDP-NAK to 1632 the sender with the appropriate error code and delete the control 1633 block. 1635 State: IDLE 1637 Event: Internal Downstream Mapping 1639 New State: IDLE 1641 Actions: 1643 Ignore the event. It is an internal implementation error. 1645 State: IDLE 1647 Event: LDP Release 1649 New State: IDLE 1651 Actions: 1653 Ignore the event. It is an internal implementation error. 1655 State: IDLE 1657 Event: Internal Downstream Withdraw 1659 New State: IDLE 1661 Actions: 1663 Ignore the event. It is an internal implementation error. 1665 State: IDLE 1667 Event: LDP Upstream Abort 1669 New State: IDLE 1671 Actions: 1673 Ignore the event. It is an internal implementation error. 1675 State: IDLE 1677 Event: Internal Downstream NAK 1679 New State: IDLE 1681 Actions: 1683 Ignore the event. It is an internal implementation error. 1685 State: IDLE 1687 Event: Upstream Lost 1689 New State: IDLE 1690 Actions: 1692 Ignore the event. It is an internal implementation error. 1694 State: IDLE 1696 Event: Internal Re-Cross-Connect 1698 New State: IDLE 1700 Actions: 1702 Ignore the event. It is an internal implementation error. 1704 State: IDLE 1706 Event: Internal New NH 1708 New State: IDLE 1710 Actions: 1712 Ignore the event. It is an internal implementation error. 1714 3.2.3.4.2 State -- "RESPONSE_AWAITED" 1716 State: RESPONSE_AWAITED 1718 Event: LDP Request 1720 New State: RESPONSE_AWAITED 1722 Actions: 1724 Ignore the event. It is an internal implementation error. 1726 State: RESPONSE_AWAITED 1728 Event: Internal Downstream Mapping 1730 New State: Depends on the action routine 1732 Actions: 1734 If the LSR uses the ordered control mode, assign an upstream label. 1736 Connect the upstream label to the downstream label and allocate the 1737 resources. 1739 Send an LDP-MAPPING upstream with the upstream label. 1741 Then go to the state `ESTABLISHED'. 1743 If unable to process the message for any reason, issue an LDP-NAK 1744 upstream and an LDP-RELEASE downstream and delete the control block. 1746 State: RESPONSE_AWAITED 1748 Event: LDP Release 1750 New State: RESPONSE_AWAITED 1752 Actions 1754 Ignore the event. It is an protocol error from the upstream peer. 1756 State: RESPONSE_AWAITED 1758 Event: Internal Downstream Withdraw 1760 New State: RESPONSE_AWAITED 1762 Actions 1764 Ignore the event. It is an internal implementation error. 1766 State: RESPONSE_AWAITED 1768 Event: LDP Upstream Abort 1770 New State: IDLE 1772 Actions 1774 If the LSR uses the independent control mode, free the upstream label 1775 and the resources. 1777 Send the event `Internal DeleteUpstream' to its 1778 Downstream_LSP_Control_Block's state machine. 1780 Delete the control block. 1782 State: RESPONSE_AWAITED 1783 Event: Internal Downstream NAK 1785 New State: IDLE 1787 Actions: 1789 If the LSR uses the independent control mode, free the upstream label 1790 and the resources. Then, send an LDP-WITHDRAW upstream. 1792 If the LSR uses the ordered control mode, propagate the LDP-NAK 1793 upstream. 1795 Delete the control block. 1797 State: RESPONSE_AWAITED 1799 Event: Upstream Lost 1801 New State: IDLE 1803 Actions 1805 If the LSR uses the independent control mode, free the upstream label 1806 and the resources. 1808 Send the event `Internal DeleteUpstream' to its 1809 Downstream_LSP_Control_Block's state machine. 1811 Delete the control block. 1813 State: RESPONSE_AWAITED 1815 Event: Internal Re-Cross-Connect 1817 New State: RESPONSE_AWAITED 1819 Actions: 1821 Ignore the event. It is an internal implementation error. 1823 State: RESPONSE_AWAITED 1825 Event: Internal New NH 1827 New State: depends on the actions 1829 Actions: 1831 Send event `Internal DeleteUpstream' to its old downstream control 1832 block. 1834 Find a Downstream_LSP_Control_Block which has the same FEC and the 1835 same next hop and also is able to merge more input labels. If not 1836 found, create a new Downstream_LSP_Control_Block with the state 1837 `IDLE'. 1839 If the state of the Downstream_LSP_Control_Block is `ESTABLISHED', 1840 choose an upstream label, connect the upstream label with the 1841 downstream label and send an LDP-MAPPING upstream with the upstream 1842 label, and go to the state `ESTABLISHED'. 1844 If the state of Downstream_LSP_Control_Block is not `ESTABLISHED', 1845 set the state of the Upstream_LSP_Control_Block to 1846 `RESPONSE_AWAITED'. 1848 Pass the event `Internal AddUpstream' to the new 1849 Downstream_LSP_Control_Block's state machine. 1851 3.2.3.4.3 State -- "ESTABLISHED" 1853 State: ESTABLISHED 1855 Event: LDP Request 1857 New State: ESTABLISHED 1859 Actions 1861 Ignore the event. It is an internal implementation error. 1863 State: ESTABLISHED 1865 Event: Internal Downstream Mapping 1867 New State: ESTABLISHED 1869 Actions 1871 Process the new attributes of the mapping and then propagate the 1872 LDP-MAPPING upstream. 1874 State: ESTABLISHED 1876 Event: LDP Release 1877 New State: IDLE 1879 Actions 1881 Disconnect the upstream label from the downstream label, free the 1882 upstream label and resources. 1884 Send the event `Internal DeleteUpstream' to its 1885 Downstream_LSP_Control_Block's state machine. 1887 Send the event `Internal Destroy' to the Next_Hop_Trigger_Block's 1888 state machine if the LSR was in the middle of switching over to the 1889 better next hop. 1891 Delete the control block. 1893 State: ESTABLISHED 1895 Event: Internal Downstream Withdraw 1897 New State: Depends on the action routine 1899 Actions 1901 If it uses independent mode, set its state to `IDLE' and create a 1902 internal `LDP Request' and send to its own state machine. 1904 Else 1905 Disconnect the upstream label from the downstream label. 1907 Propagate the LDP-WITHDRAW upstream and go to state 1908 `RELEASE_AWAITED'. 1910 Send the event `Internal Destroy' to the Next_Hop_Trigger_Block's 1911 state machine if the LSR was in the middle of switching over to the 1912 better next hop. 1914 State: ESTABLISHED 1916 Event: LDP Upstream Abort 1918 New State: IDLE 1920 Actions 1922 Disconnect the upstream label from the downstream label, free the 1923 upstream label and the resources. 1925 Send the event `Internal DeleteUpstream' to its 1926 Downstream_LSP_Control_Block's state machine. 1928 Send the event `Internal Destroy' to the Next_Hop_Trigger_Block's 1929 state machine if the LSR was in the middle of switching over to the 1930 better next hop. 1932 Delete the control block. 1934 State: ESTABLISHED 1936 Event: Internal Downstream NAK 1938 New State: Depends on the actions 1940 Actions: 1942 If it uses independent mode, set its state to `IDLE' and create a 1943 internal `LDP Request' and send to its own state machine. 1945 Else 1946 Disconnect the upstream label from the downstream label 1948 Send an LDP-WITHDRAW upstream and go to state `RELEASE_AWAITED'. 1950 Send the event `Internal Destroy' to the Next_Hop_Trigger_Block's 1951 state machine if the LSR was in the middle of switching over to the 1952 better next hop. 1954 State: ESTABLISHED 1956 Event: Upstream Lost 1958 New State: IDLE 1960 Actions: 1962 Disconnect the upstream label from the downstream label, free the 1963 upstream label and the resources. 1965 Send the event `Internal DeleteUpstream' to its 1966 Downstream_LSP_Control_Block's state machine. 1968 Send the event `Internal Destroy' to the Next_Hop_Trigger_Block's 1969 state machine if the LSR was in the middle of switching over to the 1970 better next hop. 1972 Delete the control block. 1974 State: ESTABLISH 1976 Event: Internal Re-Cross-Connect 1978 New State: ESTABLISH 1980 Actions: 1982 Reconnect the upstream label to the new downstream label. 1984 Send the event `Internal DeleteUpstream' to its old 1985 Downstream_LSP_Control_Block's state machine. 1987 State: ESTABLISH 1989 Event: Internal New NH 1991 New State: ESTABLISH 1993 Actions: 1995 Create a new Next_Hop_Trigger_Control_Block and pass event `Internal 1996 New NH' to its state machine. 1998 3.2.3.4.4 State -- "RELEASE_AWAITED" 2000 State: RELEASE_AWAITED 2002 Event: LDP Request 2004 New State: RELEASE_AWAITED 2006 Actions: 2008 Ignore the event. It is a protocol error from the upstream LSR. 2010 State: RELEASE_AWAITED 2012 Event: Internal Downstream Mapping 2014 New State: RELEASE_AWAITED 2016 Actions: 2018 Ignore the event. It is an internal implementation error. 2020 State: RELEASE_AWAITED 2021 Event: LDP Release 2023 New State: IDLE 2025 Actions: 2027 Free the upstream label resource and delete the control block. 2029 State: RELEASE_AWAITED 2031 Event: Internal Downstream Withdraw 2033 New State: RELEASE_AWAITED 2035 Actions: 2037 Ignore the event. It is a protocol error from the downstream LSR. 2039 State: RELEASE_AWAITED 2041 Event: LDP Upstream Abort 2043 New State: IDLE 2045 Actions: 2047 Free the upstream label resource and delete the control block. 2049 State: RELEASE_AWAITED 2051 Event: Internal Downstream NAK 2053 New State: RELEASE_AWAITED 2055 Actions: 2057 Ignore the event. And continue waiting for the LDP-RELEASE. 2059 State: RELEASE_AWAITED 2061 Event: Upstream Lost 2063 New State: IDLE 2065 Actions: 2067 Free the upstream label resource and delete the control block. 2069 State: RELEASE_AWAITED 2071 Event: Internal New NH 2073 New State: RELEASE_AWAITED 2075 Actions: 2077 Ignore the event. And continue waiting for the LDP-RELEASE. 2079 State: RELEASE_AWAITED 2081 Event: Internal Re-Cross-Connect 2083 New State: RELEASE_AWAITED 2085 Actions: 2087 Ignore the event. It is an internal implementation error. 2089 3.2.3.5 State of the Downstream_LSP_Control_Block's State Machine 2090 for Downstream-on-demand Mode 2092 -- IDLE 2094 This is the initial LSP state. 2096 -- RESPONSE_AWAITED 2098 This state means that the LSR has received an LDP-REQUEST from an 2099 upstream LSR, has processed the LDP-REQUEST, and has sent a new LDP- 2100 REQUEST towards a downstream LSR. The LSR is waiting for the LDP- 2101 MAPPING from the downstream LSR. 2103 -- ESTABLISHED 2105 This state means that the LSR has received the LDP-MAPPING from the 2106 downstream LSR and the LSP is up and operational. 2108 3.2.3.6 Events of the Downstream_LSP_Control_Block's State Machine 2109 for Downstream-on-demand Mode 2111 -- Internal AddUpstream 2113 This event is sent by an Upstream_LSP_Control_Block's state machine 2114 when it is created. 2116 -- Internal DeleteUpstream 2118 This event is sent by an Upstream_LSP_Control_Block's state machine 2119 when it is deleted. 2121 -- LDP Mapping 2123 The LSR receives an LDP-MAPPING from a downstream LSR. 2125 -- LDP Withdraw 2127 The LSR receives an LDP-WITHDRAW from a downstream LSR. 2129 -- LDP Downstream NAK 2131 The LSR receives an LDP-NAK from a downstream LSR. 2133 -- Downstream Lost 2135 The LSR loses the LDP session with its downstream LSR. 2137 3.2.3.7 State Transitions of the Downstream_LSP_Control_Block's 2138 State Machine for Downstream-on-demand mode 2140 +-------------------+ 2141 | | 2142 | IDLE |<--------------+ 2143 | | |(last Internal 2144 +-------------------+ | DeleteUpstream) 2145 | |(LDP Withdraw) 2146 |(1st Internal AddUpstream)| 2147 | |(LDP Downstream 2148 v | NAK) 2149 +-------------------+ |(Downstream 2150 | | | Lost) 2151 | RESPONSE_AWAITED |---------->----^ 2152 | | | 2153 +-------------------+ | 2154 | | 2155 |(LDP Mapping) | 2156 | | 2157 v | 2158 +-------------------+ | 2159 | | | 2160 | ESTABLISHED |-------->------^ 2161 | | 2162 +-------------------+ 2164 3.2.3.8 Downstream_LSP_Control_Block's State Machine for 2165 Downstream-on-demand Mode. 2167 3.2.3.8.1 State -- "IDLE" 2169 State: IDLE 2171 Event: Internal AddUpstream 2173 New State: RESPONSE_AWAITED 2175 Actions 2177 Initialize the list of pointers in the Upstream_LSP_Control_Block to 2178 contain the newly added upstream pointer. 2180 Send a new LDP-REQUEST downstream and go to the state 2181 `RESPONSE_AWAITED'. 2183 State: IDLE 2185 Event: Internal DeleteUpstream 2187 New State: IDLE 2189 Actions 2191 Ignore the event. It is an internal implementation error. 2193 State: IDLE 2195 Event: LDP Mapping 2197 New State: IDLE 2199 Actions 2201 Ignore the event. It is an internal implementation error. 2203 State: IDLE 2205 Event: LDP Withdraw 2207 New State: IDLE 2209 Actions 2211 Ignore the event. It is an internal implementation error. 2213 State: IDLE 2215 Event: LDP Downstream NAK 2217 New State: IDLE 2219 Actions 2221 Ignore the event. It is an internal implementation error. 2223 State: IDLE 2225 Event: Downstream Lost 2227 New State: IDLE 2229 Actions 2230 Ignore the event. It is an internal implementation error. 2232 3.2.3.8.2 State -- "RESPONSE_AWAITED" 2234 State: RESPONSE_AWAITED 2236 Event: Internal AddUpstream 2238 New State: RESPONSE_AWAITED 2240 Actions 2242 Add the pointer to new Upstream_LSP_Control_Block to the 2243 Upstream_LSP_Control_Blocks pointer list. 2245 State: RESPONSE_AWAITED 2247 Event: Internal DeleteUpstream 2249 New State: Depend on the action routine 2251 Actions 2253 Delete the Upstream_LSP_Control_Block pointer from the 2254 Upstream_LSP_Control_Block pointers list. 2256 If the list becomes empty, release the resources, send an LDP-Abort 2257 downstream, and then delete the control block. 2259 State: RESPONSE_AWAITED 2261 Event: LDP Mapping 2263 New State: ESTABLISHED 2265 Actions 2267 For each Upstream_LSP_Control_Block in the Upstream_LSP_Control_Block 2268 pointers list, pass the event `Internal Downstream Mapping' to its 2269 state machine. 2271 State: RESPONSE_AWAITED 2273 Event: LDP Withdraw 2275 New State: RESPONSE_AWAITED 2277 Actions 2278 It is a protocol error from the downstream LDP peer; send a LDP- 2279 RELEASE downstream 2281 State: RESPONSE_AWAITED 2283 Event: LDP Downstream NAK 2285 New State: IDLE 2287 Actions 2289 For each Upstream_LSP_Control_Block in the Upstream_LSP_Control_Block 2290 pointers list, pass the event `Internal Downstream NAK' to its state 2291 machine. 2293 Release the resources, and delete the control block. 2295 State: RESPONSE_AWAITED 2297 Event: Downstream Lost 2299 New State: IDLE 2301 Actions 2303 For each Upstream_LSP_Control_Block in the Upstream_LSP_Control_Block 2304 pointers list, pass the event `Internal Downstream NAK' to its state 2305 machine. 2307 Release the resources, and delete the control block. 2309 3.2.3.8.3 State -- "ESTABLISHED" 2311 State: ESTABLISHED 2313 Event: Internal AddUpstream 2315 New State: ESTABLISHED 2317 Actions 2319 Add the pointer to new Upstream_LSP_Control_Block to the 2320 Upstream_LSP_Control_Block pointers list. 2322 State: ESTABLISHED 2324 Event: Internal DeleteUpstream 2325 New State: Depends on the action routine 2327 Actions 2329 Delete the pointer of Upstream_LSP_Control_Block from its 2330 Upstream_LSP_Control_Block pointers list. 2332 If the list becomes empty, release the resources, send an LDP-RELEASE 2333 downstream, and then delete the control block. 2335 State: ESTABLISHED 2337 Event: LDP Mapping 2339 New State: ESTABLISHED 2341 Actions 2343 For each Upstream_LSP_Control_Block in the Upstream_LSP_Control_Block 2344 pointers list, pass the event `Internal Downstream mapping' to its 2345 state machine. 2347 State: ESTABLISHED 2349 Event: LDP Withdraw 2351 New State: IDLE 2353 Actions 2355 For each Upstream_LSP_Control_Block in the Upstream_LSP_Control_Block 2356 pointers list, pass the event `Internal Downstream withdraw' to its 2357 state machine. 2359 Release the resources, and delete the control block and send LDP- 2360 RELEASE downstream. 2362 State: ESTABLISHED 2364 Event: LDP Downstream NAK 2366 New State: ESTABLISHED 2368 Actions 2370 It is a protocol error from the downstream LDP peer. 2372 3.2.3.9 State of the Next_Hop_Trigger_Control_Block's State Machine 2373 for Downstream-on-demand Mode 2375 -- IDLE 2377 This is the initial LSP state. 2379 -- NEW_NH_RETRY 2381 This is the state where an LSR waits for a retry timer to expire and 2382 then tries to establish an LSP through a new next hop. 2384 -- NEW_NH_RESPONSE_AWAITED 2386 This state means that the LSR has sent a new LDP-REQUEST towards a 2387 downstream LSR. The LSR is waiting for the LDP-MAPPING from the 2388 downstream LSR. 2390 3.2.3.10 Events of the Next_Hop_Trigger_Control_Block's State Machine 2391 for Downstream-on-demand Mode 2393 -- Internal New NH 2395 Trigger to setup an LSP through a better next hop. 2397 -- Internal Downstream Mapping 2399 This event is sent by one Downstream_LSP_Control_Block's state 2400 machine. This Downstream_LSP_Control_Block is the merged 2401 Downstream_LSP_Control_Block of this Upstream_LSP_Control_Block. The 2402 event is the result of receiving an LDP-MAPPING by the 2403 Downstream_LSP_Control_Block's state machine. 2405 -- Internal Downstream NAK 2407 This event is sent by one Downstream_LSP_Control_Block's state 2408 machine. This Downstream_LSP_Control_Block is the merged 2409 Downstream_LSP_Control_Block of this Upstream_LSP_Control_Block. The 2410 event is the result of receiving an LDP-NAK by the 2411 Downstream_LSP_Control_Block's state machine, or it detects an error. 2413 -- Internal Destroy This event is used to stop the procedure of 2414 switching over to the better next hop. 2416 3.2.3.11 State Transitions of the Next_Hop_Trigger_Control_Block's State 2417 Machine for Downstream-on-demand Mode 2419 | 2420 | 2421 | 2422 | Internal New NH 2423 | 2424 v 2425 +---------------------+ 2426 | | Internal destroy 2427 | NEW_NH_RETRY |-------------- 2428 | | | 2429 +---------------------+ | 2430 | | 2431 | | 2432 | (Internal retry timeout) | 2433 | | 2434 v | 2435 +---------------------+ | 2436 | | Internal | 2437 | NEW_NH_RESPONSE | Destroy | 2438 | _AWAITED |-------------| 2439 | | | 2440 +---------------------+ | 2441 | | 2442 | (Internal Downstream | 2443 | Mapping | 2444 | (Internal Downstream | 2445 | NAK) | 2446 v v 2447 the control block is deleted 2449 3.2.3.12 State Machine 2451 3.2.3.12.1 State -- "IDLE" 2453 State: IDLE 2455 Event: Internal New NH 2457 New State: NEW_NH_RETRY 2459 Actions: 2461 Start the LSP retry timer and go to the `NEW_NH_RETRY' state. 2463 State: IDLE 2465 Event: Internal retry timeout 2467 New State: IDLE 2469 Actions: 2471 Ignore. It is an internal implementation error. 2473 State: IDLE 2475 Event: Internal Downstream Mapping 2477 New State: IDLE 2479 Actions: 2481 Ignore. It is an internal implementation error. 2483 State: IDLE 2485 Event: Internal Downstream NAK 2487 New State: IDLE 2489 Actions: 2491 Ignore. It is an internal implementation error. 2493 State: IDLE 2495 Event: Internal destroy 2497 New State: IDLE 2499 Actions: 2501 Ignore. It is an internal implementation error. 2503 3.2.3.12.2 State -- "NEW_NH_RETRY" 2505 State: NEW_NH_RETRY 2507 Event: Internal New NH 2509 New State: NEW_NH_RETRY 2510 Actions: 2512 Restart the LSP retry timer. 2514 State: NEW_NH_RETRY 2516 Event: Internal retry timeout 2518 New State: NEW_NH_RESPONSE_AWAITED 2520 Actions: 2522 If the new next hop is the same one as the old next hop, delete the 2523 control block. 2525 Otherwise, find an downstream LSP control block which go through the 2526 same next hop for the same FEC, if there is no one, create one, and 2527 pass `Internal AddUpstream' event to its state machine. 2529 State: NEW_NH_RETRY 2531 Event: Internal Downstream Mapping 2533 New State: NEW_NH_RETRY 2535 Actions: 2537 Ignore. It is an internal implementation error. 2539 State: NEW_NH_RETRY 2541 Event: Internal Downstream NAK 2543 New State: NEW_NH_RETRY 2545 Actions: 2547 Ignore. It is an internal implementation error. 2549 State: NEW_NH_RETRY 2551 Event: Internal destroy 2553 New State: IDLE 2555 Actions: 2557 Stop the timer and delete the control block. 2559 3.2.3.12.3 State -- "NEW_NH_RESPONSE_AWAITED" 2561 State: NEW_NH_RESPONSE_AWAITED 2563 Event: Internal New NH 2565 New State: NEW_NH_RETRY 2567 Actions: 2569 Restart the LSP retry timer, send `Internal destroy' to the control 2570 block of the LSP for the new next hop and go to the `NEW_NH_RETRY' 2571 state. 2573 State: NEW_NH_RESPONSE_AWAITED 2575 Event: Internal retry timeout 2577 New State: NEW_NH_RESPONSE_AWAITED 2579 Actions: 2581 Ignore. It is an internal implementation error. 2583 State: NEW_NH_RESPONSE_AWAITED 2585 Event: Internal Downstream Mapping 2587 New State: IDLE 2589 Actions: 2591 Send event `Internal Re-cross-connect' event to the upstream LSP 2592 control block of the new next hop. 2594 Send event `DeleteUpstream' event to the downstream LSP control block 2595 of the the new next hop, since the upstream has spliced into the new 2596 next hop. 2598 Then delete the control block. 2600 State: NEW_NH_RESPONSE_AWAITED 2602 Event: Internal Downstream NAK 2604 New State: IDLE 2605 Actions: 2607 Delete the control block. 2609 State: NEW_NH_RESPONSE_AWAITED 2611 Event: Internal destroy 2613 New State: IDLE 2615 Actions: 2617 Send event `Internal DeleteUpstream' the control block for the new 2618 LSP through the new next hop. 2620 3.2.4 LDP Related Message Processing 2622 - If an LSR receives an LDP-REQUEST: 2624 a) If this is a duplicate request, discard the message. A duplicate 2625 request means that there is a LSP_Control_Block which has same FEC, 2626 same Upstream Label Request ID and same Upstream LDP Session 2627 Identifier. 2629 b) Otherwise, create a new Upstream_LSP_Control_Block. Then pass the 2630 event `LDP Request' to this Upstream_LSP_Control_Block's state 2631 machine. 2633 - If an LSR receives an LDP-MAPPING: 2635 Locate a Downstream_LSP_Control_Block which has the same FEC, the 2636 same Downstream LDP Session Identifier and the same Downstream Label. 2637 If a Downstream_LSP_Control_Block is found, pass the event `LDP 2638 Mapping' to its state table. This could mean that the attributes of 2639 label binding have changed. 2641 Otherwise, use the Downstream LDP request ID (the 'Label Request 2642 Message ID' field in the LDP-MAPPING) and Downstream LDP Session 2643 Identifier to locate the Downstream_LSP_Control_Block and pass the 2644 event `LDP Mapping' to its state machine. If no 2645 Downstream_LSP_Control_Block is found, ignore the message. 2647 - If an LSR receives an LDP-RELEASE: 2649 Locate an Upstream_LSP_Control_Block which has the same FEC, the same 2650 Upstream Label, the same Upstream LDP Session Identifier. If no 2651 Upstream_LSP_Control_Block is found, ignore the message. If an 2652 Upstream_LSP_Control_Block is found, send the event `LDP Release' to 2653 its state machine. 2655 - If an LSR receives an LDP-WITHDRAW: 2657 Find a Downstream_LSP_Control_Block which has the same FEC, the same 2658 Downstream LDP Session Identifier and the same Downstream Label. Pass 2659 the event `LDP Withdraw' to its state machines. 2661 - If an Upstream LDP peer is lost: 2663 Pass the event `Upstream Lost' to the state machines of all the 2664 Upstream_LSP_Control_Blocks whose upstream LDP peer is that LSR. 2666 - If a Downstream LDP peer is lost: 2668 Pass the event `Downstream Lost' to the state machines of all the 2669 Downstream_LSP_Control_Blocks whose the downstream LDP peer is that 2670 LSR. 2672 - If a next hop of an FEC is changed: 2674 For all the Upstream_LSP_Control_Blocks which are infected by this 2675 change, pass the event `Internal New NH' to their state machines. 2677 - If an LSR receives an LDP-ABORT from an upstream LSR: 2679 Use the Upstream LDP Request ID and Upstream LDP Session Identifier 2680 to locate the Upstream_LSP_Control_Block and pass the event `LDP 2681 Abort' to its state machine. 2683 - If an LSR receives an LDP-NAK from a downstream LSR: 2685 Use the Downstream LDP Request ID and Downstream Session Identifier 2686 to locate a Downstream_LSP_control_block and pass the event `LDP 2687 Downstream NAK' to its state machine. 2689 4. State Machine for Downstream Unsolicited 2691 The following sections describe the state machines for the ATM-LSR 2692 which uses downstream unsolicited mode. 2694 While both independent LSP control and ordered LSP control modes are 2695 possible, only the ordered mode is taken into account, because the 2696 independent LSP control mode uses the liberal label retention mode 2697 and so is considered burning too many ATM resources. 2699 In downstream unsolicited mode, multiple path is not supported in 2700 this version and will be For Further Study (FFS). We suspect with 2701 multiple next hops and Downstream mode, it is easy to get into a loop 2702 condition. 2704 4.0 Control Block 2706 There are 2 types of control blocks involved: 2707 Upstream_LSP_Control_Block, Downstream_LSP_Control_Block. 2709 There is a list of Upstream_LSP_Control_Blocks for each FEC in the 2710 routing table, with each one corresponding to a LDP peer. A 2711 Upstream_LSP_Control_Block is created for each FEC when there is a 2712 label ready to be distributed to that upstream. It is deleted when 2713 the FEC is deleted from the FEC table, or the LDP peer disappears, or 2714 the downstream label is withdrawed. 2716 There is one Downstream_LSP_Control_Blocks for each FEC in the 2717 routing table. It is created when the FEC is inserted into the 2718 forwarding table and deleted when the FEC is removed from the 2719 forwarding table. 2721 An Upstream_LSP_Control_Block may contain the following information: 2723 - Upstream LDP Session Identifier 2725 - State 2727 - Upstream Label (assigned by this LSR) 2729 - FEC 2731 Upstream Label and Upstream LDP Session Identifier, or FEC and 2732 Upstream LDP Session Identifier can be used to locate a unique 2733 Upstream_LSP_Control_Block. 2735 A Downstream_LSP_Control_Block may contain the following information: 2737 - FEC 2739 - State 2741 - Downstream LDP Session Identifier 2743 - Downstream Label (assigned by the downstream LSR) 2745 - Downstream Label Request ID (assigned by the LSR itself) 2747 Downstream Label and Downstream LDP Session Identifier, or FEC and 2748 Downstream LDP Session Identifier can be used to locate a unique 2749 Downstream_LSP_Control_Block. 2751 4.1 States of the Upstream_LSP_Control_Block's State Machine 2752 for Downstream Mode 2754 -- IDLE 2756 This is the initial LSP state. 2758 -- ESTABLISHED 2760 This state means that the LSR has received the LDP-MAPPING from the 2761 downstream LSR and the LSP is up and operational. 2763 -- RELEASE_AWAITED 2765 This state means that the LSR is waiting for the LDP-RELEASE in 2766 respond to the LDP-WITHDRAW sent by this LSR. 2768 -- RESOURCES_AWAITED 2770 This state means that the LSR is waiting for the label resources. 2772 4.2 Events of the Upstream_LSP_Control_Block's State Machine 2773 for Downstream Mode 2775 -- Internal Downstream Mapping 2777 This event is sent by one Downstream_LSP_Control_Block's state 2778 machine. The event is the result of receiving an LDP-MAPPING by the 2779 Downstream_LSP_Control_Block's state machine. Or when the LDP peer is 2780 discovered and there is a downstream Label available for this FEC. 2782 -- LDP Release 2784 The LSR receives an LDP-RELEASE from an upstream LSR. 2786 -- Internal Withdraw 2788 This event is sent by Downstream_LSP_Control_Block's state machine. 2789 The event is the result of receiving an LDP-WITHDRAW by the 2790 Downstream_LSP_Control_Block's state machine. 2792 -- Resource Available 2794 This event means the local resource (such as label) becomes 2795 available. 2797 -- Delete FEC 2799 This event means that either the FEC is removed from the forwarding 2800 table. 2802 -- Upstream Lost 2804 This event means that the upstream LDP peer is lost. 2806 4.3 State Transitions of Upstream_LSP_Control_Block's State 2807 Machine for Downstream Mode 2809 | 2810 |(created when 2811 |a label is to be distributed 2812 | to the LDP peer) 2813 v 2814 +-------------------+ 2815 | | 2816 | IDLE |<--------------+ 2817 | | | 2818 +-------------------+ | 2819 | |(LDP Release) 2820 | | 2821 | | 2822 | | 2823 |(Internal Downstream | 2824 +-------------------| Mapping) | 2825 | | | 2826 |(no label resource)v | 2827 | +-------------------+ | 2828 | | | | 2829 | +-----| ESTABLISHED |---------------+ 2830 | | | | ^ 2831 | | +-------------------+ | 2832 | |(delete FEC) ^ | 2833 | |(Internal |(Resource Available) | (LDP Release) 2834 | | Withdraw) | | (Internal 2835 | | | | Downstream 2836 | | | | Withdraw) 2837 | | +-------------------+ | 2838 +--------->| | | 2839 | |RESOURCES_AWAITED |---------------+ 2840 | | | | 2841 | +-------------------+ | 2842 | | 2843 | (Internal Downstream Withdraw) |(LDP Release) 2844 | +-------------------+ | 2845 | | | | 2846 +---->| RELEASE_AWAITED |---------------+ 2847 | | 2848 +-------------------+ 2850 4.4 Upstream_LSP_Control_Block's State Machine for 2851 Downstream Mode 2853 4.4.1 : State -- "IDLE" 2855 State: IDLE 2857 Event: Internal Downstream mapping 2859 New State: Depends on the action. 2861 Actions 2863 Choose an upstream label, connect the upstream label with the 2864 downstream label. And go to state `ESTABLISHED' 2866 Propagate the LDP-MAPPING upstream. 2868 If there is no resource for the upstream label, go to state 2869 `RESOURCE_AWAITED'. 2871 State: IDLE 2873 Event: LDP Release 2875 New State: IDLE 2877 Actions 2879 Ignore the event. It is an internal implementation error. 2881 State: IDLE 2883 Event: Internal Downstream Withdraw 2885 New State: IDLE 2887 Actions 2889 Ignore the event. It is an internal implementation error. 2891 State: IDLE 2893 Event: Resource Available 2895 New State: IDLE 2897 Actions 2899 Ignore the event. It is an internal implementation error. 2901 State: IDLE 2903 Event: Delete FEC 2905 New State: IDLE 2907 Actions 2909 Delete the control block. 2911 State: IDLE 2913 Event: Upstream Lost 2915 New State: IDLE 2917 Actions 2919 Delete the control block. 2921 4.4.2 : State -- "ESTABLISHED" 2923 State: ESTABLISHED 2925 Event: Internal Downstream Mapping 2927 New State: ESTABLISHED 2929 Actions 2931 Process the new attributes of the new mapping message. 2933 Propagate the LDP-MAPPING upstream. 2935 State: ESTABLISHED 2937 Event: LDP Release 2939 New State: IDLE 2941 Actions 2943 Disconnect upstream label from downstream label. 2945 Release the upstream label resource 2947 Delete the control block. 2949 State: ESTABLISHED 2951 Event: Internal Downstream Withdraw 2953 New State: RELEASE_AWAITED 2955 Actions 2957 Disconnect upstream label from downstream label. 2959 Propagate the LDP-WITHDRAW upstream. 2961 State: ESTABLISHED 2963 Event: Resource Available 2965 New State: ESTABLISHED 2967 Actions 2969 Ignore the event. It is an internal implementation error. 2971 State: ESTABLISHED 2973 Event: Delete FEC 2975 New State: RELEASE_AWAITED 2977 Actions 2979 Send a LDP-WITHDRAW upstream. 2981 State: ESTABLISHED 2983 Event: Upstream Lost 2985 New State: IDLE 2987 Actions 2989 Release the upstream label and delete the control block. 2991 4.4.2 : State -- "RELEASE_AWAITED" 2993 State: RELEASE_AWAITED 2995 Event: Internal Downstream Mapping 2996 New State: RELEASE_AWAITED 2998 Actions 3000 Ignore the message. 3002 State: RELEASE_AWAITED 3004 Event: LDP Release 3006 New State: IDLE 3008 Actions 3010 Release the upstream label and delete the control block. 3012 State: RELEASE_AWAITED 3014 Event: Internal Downstream Withdraw 3016 New State: RELEASE_AWAITED 3018 Actions 3020 Ignore the event. 3022 State: RELEASE_AWAITED 3024 Event: Resource Available 3026 New State: RELEASE_AWAITED 3028 Actions 3030 Ignore the event. It is an internal implementation error. 3032 State: RELEASE_AWAITED 3034 Event: Delete FEC 3036 New State: RELEASE_AWAITED 3038 Actions 3040 Do nothing. 3042 State: RELEASE_AWAITED 3043 Event: Upstream Lost 3045 New State: IDLE 3047 Actions 3049 Release the upstream label and delete the control block. 3051 4.4.2 : State -- "RESOURCE_AWAITED" 3053 State: RESOURCE_AWAITED 3055 Event: Internal Downstream Mapping 3057 New State: RESOURCE_AWAITED 3059 Actions 3061 Ignore the message. 3063 State: RESOURCE_AWAITED 3065 Event: LDP Release 3067 New State: RESOURCE_AWAITED 3069 Actions 3071 Ignore the message. It is an internal implementation error. 3073 State: RESOURCE_AWAITED 3075 Event: Internal Downstream Withdraw 3077 New State: IDLE 3079 Actions 3081 Delete the control block. 3083 State: RESOURCE_AWAITED 3085 Event: Resource Available 3087 New State: ESTABLISHED 3089 Actions 3090 Allocate an upstream label, connect the upstream label with the 3091 downstream label, and send LDP-MAPPING upstream. 3093 State: RESOURCE_AWAITED 3095 Event: Delete FEC 3097 New State: IDLE 3099 Actions 3101 Delete the control block. 3103 State: RESOURCE_AWAITED 3105 Event: Upstream Lost 3107 New State: IDLE 3109 Actions 3111 Delete the control block. 3113 4.5 State of the Downstream_LSP_Control_Block's State Machine 3114 for Downstream Mode 3116 -- IDLE 3118 This is the initial LSP state. 3120 -- ESTABLISHED 3122 This state means that the LSR has received the LDP-MAPPING from the 3123 downstream LSR. 3125 3.2.4.6 Events of the Downstream_LSP_Control_Block's State Machine 3126 for Downstream Mode 3128 -- LDP Mapping 3130 The LSR receives an LDP-MAPPING from a downstream LSR. 3132 -- LDP Withdraw 3134 The LSR receives an LDP-WITHDRAW from a downstream LSR. 3136 -- Delete FEC 3138 The FEC is deleted from the forwarding table. 3140 -- Next Hop Change 3142 The next hop for this FEC is change to different LSR. 3144 -- Downstream Lost 3146 The downstream peer is gone. 3148 4.7 State Transitions of Downstream_LSP_Control_Block's State 3149 Machine for Downstream Mode 3151 | 3152 |(FEC is being added into the forwarding 3153 table) 3154 v 3155 +-------------------+ 3156 | | 3157 | IDLE |<--------------+ 3158 | | | 3159 +-------------------+ | 3160 | | 3161 | |(LDP Withdraw) 3162 | |(Internal New NH) 3163 | |(Downstream Lost) 3164 | (LDP Mapping) | 3165 | | 3166 v | 3167 +-------------------+ | 3168 | | | 3169 | ESTABLISHED |---------------+ 3170 | | 3171 +-------------------+ 3172 | 3173 |(FEC is deleted from the forwarding table) 3174 v 3176 4.8 Downstream_LSP_Control_Block's State Machine 3177 for Downstream Mode 3179 4.8.1 : State -- "IDLE" 3181 State: IDLE 3183 Event: LDP mapping 3184 New State: ESTABLISHED 3186 Actions 3188 For all the LDP peers except the downstream LSR which assigned the 3189 label, create an Upstream_LSP_Control_Block, and pass the event 3190 `Internal Downstream Mapping' to each of the 3191 Upstream_LSP_Control_Block's state machines. 3193 State: IDLE 3195 Event: LDP withdraw 3197 New State: IDLE 3199 Actions 3200 Ignore the event. It is an internal implementation error. 3202 State: IDLE 3204 Event: Delete FEC 3206 New State: IDLE 3208 Actions 3210 Delete the control block. 3212 State: IDLE 3214 Event: Next Hop Change 3216 New State: IDLE 3218 Actions 3220 Ignore the event. 3222 State: IDLE 3224 Event: Downstream Lost 3226 New State: IDLE 3228 Actions 3230 Ignore the event. 3232 4.8.1 : State -- "ESTABLISHED" 3234 State: ESTABLISHED 3236 Event: LDP mapping 3238 New State: ESTABLISHED 3240 Actions 3242 For each Upstream_LSP_control_block of this FEC, pass event `Internal 3243 downstream mapping' to its state machine. 3245 State: ESTABLISHED 3247 Event: LDP withdraw 3249 New State: IDLE 3251 Actions 3253 For each Upstream_LSP_control_block for this FEC, pass event 3254 `Internal downstream Withdraw' to its state machine. 3256 Send a LDP Withdraw downstream. 3258 State: ESTABLISHED 3260 Event: Delete FEC 3262 New State: IDLE 3264 Actions 3266 Send LDP-RELEASE downstream and delete the control block. 3268 State: ESTABLISHED 3270 Event: Next Hop Change 3272 New State: IDLE 3274 Actions 3276 For each Upstream_LSP_control_block for this FEC, pass event 3277 `Internal downstream Withdraw' to its state machine. 3279 Send LDP-REQUEST to the new next hop. 3281 State: ESTABLISHED 3283 Event: Downstream Lost 3285 New State: IDLE 3287 Actions 3289 Send LDP-WITHDRAW to all Upstream_Control_Block's state machine of 3290 this FEC. 3292 4.5 LDP Related Message Processing for downstream mode. 3294 - If an LSR receives an LDP-REQUEST: 3296 If there is a next hop for this FEC and there is a 3297 Downstream_Control_Block for this FEC whose state is `ESTABLISHED', 3298 create a new Upstream_Control_Block and pass `internal Mapping' event 3299 to its state machine. 3301 - If an LSR receives an LDP-MAPPING: 3303 Locate a Downstream_LSP_Control_Block which has the same FEC, the 3304 same Downstream LDP Session Identifier and the same Downstream Label. 3305 If a Downstream_LSP_Control_Block is found, pass the event `LDP 3306 Mapping' to its state table. This could mean that the attributes of 3307 label binding have changed. 3309 Otherwise, if there is no matching Downstream_LSP_Control_Block 3310 found, find a Downstream_LSP_Control_Block of this FEC and its next 3311 hop is the this downstream peer, pass the event `LDP Mapping' to its 3312 state machine. 3314 - If an LSR receives an LDP-RELEASE: 3316 Locate an Upstream_LSP_Control_Block which has the same FEC, the same 3317 Upstream Label, the same Upstream LDP Session Identifier. If no 3318 Upstream_LSP_Control_Block is found, ignore the message. If an 3319 Upstream_LSP_Control_Block is found, send the event `LDP Release' to 3320 its state machine. 3322 - If an LSR receives an LDP-WITHDRAW: 3324 Find a Downstream_LSP_Control_Block which has the same FEC, the same 3325 Downstream LDP Session Identifier and the same Downstream Label. Pass 3326 the event `LDP Withdraw' to its state machines. 3328 - If an Upstream LDP peer is lost: 3330 Pass the event `Upstream Lost' to the state machines of all the 3331 Upstream_LSP_Control_Blocks whose upstream LDP peer is that LSR. 3333 - If a Downstream LDP peer is lost: 3335 Pass the event `Label Withdraw' to the state machines of all the 3336 Downstream_LSP_Control_Blocks whose the downstream LDP peer is that 3337 LSR. 3339 - If a next hop of an FEC is changed: 3341 Find all the Downstream_LSP_Control_Blocks which has the same FEC and 3342 the same next hop and pass the event `Next Hop Change' to their state 3343 machine 3345 - If there is a FEC being added to the forwarding table 3347 Create a new Downstream_LSP_Control_Block with state `IDLE' 3349 - If the FEC is deleted from the forwarding table 3351 Send the `Delete FEC' event to the its control block. 3353 - If an LSR receives an LDP-NAK from an upstream LSR: 3355 Ignore the message. An LDP-NAK should never appear in the 3356 downstream-mode LSR 3358 - If an LSR receives an LDP-NAK from a downstream LSR: 3360 Ignore the message. It is an protocol error from the downstream LSR. 3362 5. Security Considerations 3364 This document is provided as an informational extension of the LDP 3365 specification [4]. State machines presented here are intended to 3366 clarify procedures defined in the LDP specification, but do not 3367 supplant or override definitions and procedures provided there. 3369 Implementations of a state machine may be vulnerable to spurious 3370 events generated by an external source. In this document, events fall 3371 in two categories: internal events and external events caused by 3372 receipt of an LDP message. 3374 LDP messages may be protected using mechanisms described in the LDP 3375 specification. See "Security Considerations" in the LDP specification 3377 [4]. 3379 Security considerations relating to generation of spurious internal 3380 events are not addressed in this document. 3382 6. Acknowledgements 3384 The authors would like to acknowledge the helpful comments and 3385 suggestions of the following people: Bob Thomas and Myunghee Son. 3387 7. Authors' Address 3389 Christophe Boscher 3391 Alcatel 3392 Le Mail 3393 44700 Orvault 3394 France 3395 Phone: (33) 251781828 3396 Email: christophe.boscher@alcatel.fr 3398 Pierrick Cheval 3400 Alcatel 3401 5 rue Noel-Pons 3402 92734 Nanterre Cedex 3403 France 3404 Phone: (33) 146524027 3405 Email: pierrick.cheval@alcatel.fr 3407 Eric Gray 3409 Lucent Technologies, Inc. 3410 P.O. Box 710 3411 Durham, NH 03824 3412 Phone: (603) 659-3386 3413 Email: ewgray@lucent.com 3415 Liwen Wu 3417 Cisco Systems, Inc. 3418 250 Apollo Drive 3419 Chelmsford, MA 01824 3420 U.S.A 3421 Phone: 978-224-3087 3422 Email:liwwu@cisco.com 3424 8. References 3426 1."MPLS Using LDP and ATM Switching", Bruce Davie, Jeremy Lawrence, 3427 Keith McCloghrie, Yakov Rekhter, Eric Rosen, George Swallow, Paul 3428 Doolan, work in progress, Internet Draft, 3430 2."Multiprotocol Label Switching Architecture", Eric C Rosen, Arun 3431 Viswanathan, Ross Callon, work in progress, Internet Draft, 3434 3."Definition of Managed Objects for the Multiprotocol Label Switching, 3435 Label Distribution Protocol (LDP)", Joan Cucchiara, Hans Sjostrand, 3436 James V. Luciani, work in progress, Internet Draft, 3439 4. "LDP Specification", Loa Andersson, Paul Doolan, Nancy Feldman, 3440 Andre Fredette, Bob Thomas, work in progress, Internet Draft, 3443 5. "Constraint-Based LSP Set up Using LDP", Bilel Jamoussi, et al., 3444 work in progress, Internet Draft,