• Aucun résultat trouvé

Label Binding and Distribution

As soon as the Label Information Base (LIB) is created in a router, a label is assigned to every Forward Equivalence Class known to the router. For unicast destination-based routing, the FEC is equivalent to an IGP prefix in the IP routing table. Thus, a label is

assigned to every prefix in the IP routing table and the mapping between the two is stored in the LIB.

Note

Labels are not assigned to BGP routes in the IP routing table. The BGP routes use the same label as the interior route toward the BGP next hop. For more information on

MPLS/BGP integration, see the section, "MPLS Interaction with the Border Gateway Protocol," later in this chapter.

The Label Information Base is always kept synchronized to the IP routing table—as soon as a new non-BGP route appears in the IP routing table, a new label is allocated and bound to the new route. The debug tag tdp bindings printouts show the subnet-to-label binding.

Example 2-10 shows a sample printout.

Example 2-10 Sample Label-to-prefix Bindings

SanFrancisco#debug tag-switching tdp bindings

TDP Tag Information Base (TIB) changes debugging is on

1d20h: tagcon: tibent(172.16.1.4/32): created; find route tags request

1d20h: tagcon: tibent(172.16.1.4/32): lcl tag 1 (#2) assigned 1d20h: tagcon: tibent(172.16.1.1/32): created; find route tags request

1d20h: tagcon: tibent(172.16.1.1/32): lcl tag 26 (#4) assigned 1d20h: tagcon: tibent(172.16.1.3/32): created; find route tags request

1d20h: tagcon: tibent(172.16.1.3/32): lcl tag 27 (#6) assigned 1d20h: tagcon: tibent(172.16.1.2/32): created; find route tags request

1d20h: tagcon: tibent(172.16.1.2/32): lcl tag 28 (#8) assigned 1d20h: tagcon: tibent(192.168.1.0/24): created; find route tags request

1d20h: tagcon: tibent(192.168.1.0/24): lcl tag 1 (#10) assigned 1d20h: tagcon: tibent(192.168.2.0/24): created; find route tags request

1d20h: tagcon: tibent(192.168.2.0/24): lcl tag 29 (#12) assigned Because the LSR assigns a label to each IP prefix in its routing table as soon as the prefix appears in the routing table, and the label is meant to be used by other LSRs to send the labeled packets toward the assigning LSR, this method of label allocation and label distribution is called independent control label assignment, with unsolicited downstream label distribution:

The label allocation in routers is done regardless of whether the router has received a label for the same prefix already from its next-hop router or not. Thus, label allocation in routers is called independent control.

The distribution method is unsolicited because the LSR assigns the label and advertises the mapping to upstream neighbors regardless of whether other LSRs need the label. The on-demand distribution method is the other possibility. An LSR assigns only a label to an IP prefix and distributes it to upstream neighbors when asked to do so. Chapter 3 discusses this method in more detail.

The distribution method is downstream when the LSR assigns a label that other LSRs (upstream LSRs) can use to forward labeled packets and advertises these label mappings to its neighbors. Initial tag switching architecture also contains

provisions for upstream label distribution, but neither the current tag switching implementation nor the MPLS architecture needs this type of distribution method.

All label bindings are advertised immediately to all other routers through the TDP sessions.

The advertisements also can be examined by means of debugging commands, as shown in Example 2-11. The printout was taken on the San Francisco router after the route toward 192.168.2.0/24 was propagated from New York to San Francisco via the IGP and entered into the San Francisco LSR's routing table.

Example 2-11 IP Prefix-to-label Binding Propagation Through TDP

1d20h: tagcon: adj 172.16.1.1:0 (pp 0x80EA98E4): advertise 192.168.2.0/24, tag 29

(#12)

1d20h: tagcon: adj 172.16.3.1:0 (pp 0x80EA98E4): advertise 192.168.2.0/24, tag 29

(#12)

1d20h: tagcon: adj 172.16.2.1:0 (pp 0x80EA98E4): advertise 192.168.2.0/24, tag 29

(#12)

1d20h: tagcon: adj 172.16.1.2:0 (pp 0x80EA98E4): advertise 192.168.2.0/24, tag 29

(#12)

1d20h: tagcon: adj 172.16.1.3:0 (pp 0x80EA98E4): advertise 192.168.2.0/24, tag 29

(#12)

1d20h: tdp: Sent bind PIE to 172.16.1.1:0 (pp 0x80EA98E4)

… rest deleted …

As you can see from the printout, the San Francisco router announces its IP prefix-to-label binding to all TDP neighbors, regardless of whether they are upstream or downstream. Even more, the binding also is sent to the next-hop router, so there is no split-horizon processing in TDP or LDP.

The adjacent LSRs receive prefix-to-label mappings, store them in their LIB, and use them in their FIB or LFIB if the mapping has been received from their downstream neighbor, which is the next-hop for the particular FEC in question. This storage method is called liberal retention mode as opposed to conservative retention mode, where an LSR retains only the labels assigned to a prefix by its current downstream routers.

Note

There are a number of possible combinations between the three label allocation parameters (unsolicited versus on-demand distribution, independent versus ordered control, and liberal versus conservative retention), but the routers running Cisco IOS software always use unsolicited distribution, independent control, and liberal retention over Frame-mode MPLS interfaces. The fixed set of parameters should not prevent the router from interoperating through LDP with other devices that use a different default. For more details on which combinations work and which ones don't, please refer to the IETF LDP documentation.

The show tag-switching tdp bindings command can display all the label mappings generated by a router or received from its TDP neighbors. Example 2-12 displays the result of that command for IP prefix 192.168.2.0/24 on the San Francisco router.

Example 2-12 Label Information Base Entry on San Francisco Router

SanFrancisco#show tag-switching tdp bindings 192.168.2.0 tib entry: 192.168.2.0/24, rev 7

A router might receive TDP bindings from a number of neighbors, but uses only a few of them in the forwarding tables as follows:

The label binding from the next-hop router is entered in the corresponding FIB entry.

If the router doesn't receive the label binding from the next-hop router, the FIB entry specifies that the packets for that destination should be sent unlabeled.

If the router receives a label binding from the next-hop router, the local label and the next-hop label are entered in the LFIB. If the next-hop router didn't assign a label to the corresponding prefix, the outgoing action in LFIB is unlabeled. Example 2-13 shows both cases.

Note

A router that has no label for a specific IP prefix from the next-hop router marks the prefix as unlabeled if it is not a directly connected interface or is not a summary route. If the route is connected directly or is a summary route, an additional Layer 3 lookup is needed and a router assigns a null label to that prefix due to a mechanism called Penultimate Hop Popping, which is covered in the next section.

Example 2-13 Label Forwarding Information Base on San Francisco Router

SanFrancisco#show tag forwarding-table tags 30-31

Local Outgoing Prefix Bytes tag Outgoing Next Hop