3Com Switch 8800 Configuration Guide Chapter 35 MPLS Architecture35-8As shown in Figure 35-5, LSP is a tunnel between R2 and R3.II. Multi-layer label stackIn MPLS, a packet may carry multiple labels which are in the form of stack. Operationsto the stack follow the “last in first out” principle and it is always the labels at the top ofthe stack that decide how to forward packets. Pushing label indicates to add a label intoa outgoing packet, then the depth of the label stack is the former one plus 1, and thecurrent label of the packet changes to the newly added one; popping a label indicates toremove a label form a packet, then the depth of the packet is the former one minus 1,and the current label of the packet changes to the label of its underlayer.Multiple-layer label stack is used in LSP tunnel. When a packet travels in LSP tunnel,there will be multiple layers for the label of the packet. Then, at the ingress and egressof each tunnel, it is necessary to implement pushing and popping operation for the labelstack. For each pushing operation, the label will be added with one layer. And there isno depth limitation for the label stack from MPLS.The labels are organized according to the principle of “last in first out” in the label stack,and MPLS processes the labels beginning from the top of the stack.If the depth of the label stack for a packet is m, it indicates that the label at the bottom ofthat stack is level 1 label, and the label at the top of the stack is level m label. A packetwith no label can be regarded as a packet with empty label stack, that is, the depth of itslabel stack is 0.35.4 MPLS and other Protocols35.4.1 MPLS and Routing ProtocolsWhen LDP establishes LSP in hop-by-hop mode, the next hop is determined by usingthe information, which is usually collected by such routing protocols as IGP, BGP ineach LSR route forwarding table, on the way. However, LDP just uses the routinginformation indirectly, rather than associates with various routing protocols directly.On the other hand, although LDP is the special protocol for implementing labeldistribution, it is not the sole protocol for label distribution. The existing protocols suchas BGP, RSVP, after being extended, can also support MPLS label distribution. Forsome MPLS applications, it is also necessary to extend some routing protocols. Forexample, the application of MPLS VPN requires extending the BGP protocol, thus theBGP protocol can propagate VPN routing information.35.5 MPLS Application35.5.1 MPLS VPNTo transmit data stream of private network on public network, traditional VPN usestunnel protocols like GRE, L2TP, and PPTP. LSP itself is a tunnel on public network, so