Technorati Tags: MPLS,LDP, tags, label
01-mpls the format of the label message.
650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image002 "border=" 0 "alt=" clip_ image002 "src=" http://s3.51cto.com/wyfs02/M02/73/03/wKiom1XyG-bBBVL9AABEyWDtYu8880.jpg "height="/>
In fact, MPLS is called a 2.5-layer protocol because the label is between the IP header and the two-layer header. The three-layer label is nested in the figure.
The label near the top of the two-layer head is called the bottom, and the tag near the IP packet header is called.
If there is more than one label, the data message is forwarded using the top label. After the when top is removed, the next layer of labels is used for forwarding.
The format of each label is:
Each label is a three-bit (4 bytes). Divided into 4 fields, each of which has a division of labor.
650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image004 "border=" 0 "alt=" clip_ image004 "src=" http://s3.51cto.com/wyfs02/M00/73/03/wKiom1XyG-jyh6DmAAGDEk716gA702.jpg "height="/>
0-15 is reserved for system use.
Exp:3 bit. Used to carry the IP Precedence field value for QoS. Range 0-7.
S:1 bit, in order to indicate whether the label is the last label in the IP header.
As stated earlier, the closest to the second-level frame header is then forwarded first. Closest to the IP header, which is then forwarded for use.
The S bit provides such a feature.
S=1, bottom of the stack. S=0, non-bottom. From the following clutch can also be seen, s=0 words, near the two-layer frame head, S=1, near the 3-layer IP packet header.
Ttl:8 bit, range 0-255, this definition is the same as the time to live inside the IP.
Unlike IP, the TTL of MPLS,
It is possible to initialize with 255.
It may also be copied directly from the IP header.
Below is a packet grab for MPLS packets. You can see that there are 2 layers of labels nested here.
650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image006 "border=" 0 "alt=" clip_ image006 "src=" http://s3.51cto.com/wyfs02/M01/73/03/wKiom1XyG-nT84ukAAHBWTtuS4M478.jpg "height=" 246 "/>
02-LDP the role of the Agreement
Ldp-label Distribute protocol.
Label Distribution Protocol, formerly known as Tdp.cisco Private.
----------have been saying that the LDP label distribution must be based on IGP (OSPF,RIP,EIGRP), because the label distribution, in fact, is a mapping of the IGP routing table. So there must be an IGP before the label will be published.
The mapping relationship that exists between the routing table and the label-----FEC.
LDP to work, must have the underlying IGP.
Cisco's behavior is that each route within the IGP routing table will have a corresponding label present in the label forwarding.
The related action of 03-MPLS label message forwarding process
The following figure, R1--R2--R3--R4, is the MPLS domain, and the left and right are IP domains.
The packet in the IP domain is not carrying a label. In the MPLS domain, packets are tagged.
650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image008 "border=" 0 "alt=" clip_ image008 "src=" http://s3.51cto.com/wyfs02/M02/73/03/wKiom1XyG-vCh2HjAAFO11Ex1Uw075.jpg "height=" 260 "/>
The next step is to explain the process of a packet left to right: ip:a-->r1-->r2-->r3-->r4-->ip:b
It should be stated that locally received labels are always assigned by upstream or downstream routers.
Let's say that if the local router has a routing detail that reaches 1.1.1.0/24. Then the peer-to-peer will jump to my side to assign the relevant tags. So, tags are always sent to me by others. I mapped the local direct-connect route to the cost tag and distributed it to my upstream and downstream routers. Well, a bidirectional label FEC is set up.
04-Data plane and control plane.
This is an important basis for understanding MPLS forwarding.
650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image010 "border=" 0 "alt=" clip_ image010 "src=" http://s3.51cto.com/wyfs02/M00/73/03/wKiom1XyG-3DCCLwAAJlYQLF4Qw767.jpg "height=" 380 "/>
Control plane: Controlling plane.
In simple terms, it is the control plane that is used when dealing with protocols, routing tables, label Exchange tables, these internal table entries, and protocols.
Data plane: the plane.
And the data plane, meaning that the IP forwarding, label forwarding message, the data plane will be used.
The data plane is understood as follows:
650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image012 "border=" 0 "alt=" clip_ image012 "src=" http://s3.51cto.com/wyfs02/M01/73/03/wKiom1XyG-6yq_r_AAF-K8jZFKI994.jpg "height=" 384 "/>
Here, there are several case combinations:
1, received IP, forwarding out is still IP. is a pure IP message forwarding, then the FIB table entry is used. (CEF table for Cisco)
2, received MPLS message, forwarded out is still MPLS message, GO is lfib. Label forwarding.
3, it is possible to receive IP packets, but requires the router to press label forwarding. Then still go fib (CEF) Table---So why the CEF label will carry the tag.
4, received the MPLS message, the transfer is an IP packet, this situation for the sub-mo node popup, input walk lfib table, output will use the FIB (CEF) table.
About Cisco's processes:
I've never known why CEF tables have labels. After and the teacher confirmed that the design is indeed very reasonable.
If an IP packet is received, the MPLS label message is transferred out. This time first the router receives the CEF table later, Cisco will need to press the LFIB in the label of the entry, the label copied to the CEF table, so that the IP message, only need to check the CEF table to know which label to be pressed to forward, rather than first check the CEF table, know the need to press the label, However, there is no label in the CEF table, thus further querying the LFIB table, checking two table entries and checking the table entries, the meaning of saving the performance resources of the router is completely different.
Even teacher summary version:
LIB------show mpls ldp binding to view the Lib table entry.
FIB------show ip cef detail view fib. Note that you must add detail, otherwise you cannot see the label distribution.
LFIB-----Show MPLS forwarding table.
At the time of troubleshooting. The outer label exchange, it must be MPLS forwarding table (LFIB table)
Like what. R1-----R2----R3----R4.
R1 the MPLS message to R2,R2 is LFIB. If LFIB (MPLS forwarding table) does not have a label, this time, based on the two-level mapping principle, you need to view the Lib table (show mpls ldp binding), There would be a reason why R2 's MPLS forwarding table did not distribute labels.
For example, as everyone knows, LDP's Tranport ID is used by loopback. If the IGP is OSPF. Whether your loopback port is configured as a 32-bit mask or a 24-bit mask, OSPF advertises it as a 32-bit mask (unless you modify the IP OSPF network Point-to-Point) before the true mask is advertised.
At this time, the local is a 24-bit mask, advertised to the peer is 32 bits. The upstream router is the 32-bit distribution label on this side. Obviously wrong. Because the 24-bit mask is not tagged, and 32 bits are obtained. When forwarding, there must be a problem with MPLS forwarding table. Because LFIB is based on LIB, it is necessary to check Lib in the end to find out the reason for the initial truth.
650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image014 "border=" 0 "alt=" clip_ image014 "src=" http://s3.51cto.com/wyfs02/M02/73/03/wKiom1XyG_Dif0ZxAAEUgfSoh4E595.jpg "height=" 306 "/>
Modify the loopback mask for the 3 routers to 24-bit.
Then on the R2, see 3.3.3.3 's label:
650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image016 "border=" 0 "alt=" clip_ image016 "src=" http://s3.51cto.com/wyfs02/M00/73/03/wKiom1XyG_GjcACmAAIap0iN3vo806.jpg "height=" 279 "/>
This time, R2 above, 3.3.3.3 's outgoing is not a pop label. is No-label.
Then show Lib table, there is no label at all, under normal circumstances, the end R3 should be assigned a implit-label come over. The problem has come out.
This is the transmitted 32-bit route, which is divided into 32-bit routes. No labels are assigned to 24-bit routes.
The reason is that R3 above, the 3.3.3.3 of their own implit-null,24 bits of the label. The R2 becomes a 32-bit label. has been misplaced.
650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image018 "border=" 0 "alt=" clip_ image018 "src=" http://s3.51cto.com/wyfs02/M01/73/03/wKiom1XyG_LhQeBFAAC_LBOgkcI311.jpg "height=" "/>"
Scheme:
1, it is recommended that loopback is a loopback/32 mask.
2, either add the IP OSPF network point-to-point below the Loop interface.
This article is from the "hank--me, Focus on Principles" blog, be sure to keep this source http://361531.blog.51cto.com/351531/1693692
MPLS 2 Forwarding Planes