IP Lookup Versus Label Lookup

When a router receives an IP packet, the lookup done is an IP lookup. In Cisco IOS, this means that the packet is looked up in the CEF table. When a router receives a labeled packet, the lookup is done in the LFIB of the router. The router knows that it receives a labeled packet or an IP packet by looking at the protocol field in the Layer 2 header. If a packet is forwarded by either Cisco Express Forwarding (CEF) (IP lookup) or by LFIB (label lookup), the packet can leave the router either labeled or unlabeled. Look at Figure 3-2 to see the difference between a lookup in the CEF table and in the LFIB.

Figure 3-2 CEF or LFIB Lookup

Lookup in CEF Table

Lookup in LFIB Table

Lookup in LFIB Table

If an ingress LSR receives an IP packet and forwards it as labeled, it is called the IP-to-label forwarding case. If an LSR receives a labeled packet, it can strip off the labels and forward it as an IP packet, or it can forward it as a labeled packet. The first case is referred to as the label-to-IP forwarding case; the second is referred to as the label-to-label forwarding case.

NOTE For more information on CEF and its interaction with MPLS, refer to Chapter 6, "Cisco Express Forwarding."

Example 3-1 shows an IP-to-label forwarding case—that is, the forwarding of an IP packet by the CEF table.

Example 3-1 Example of an Entry in the CEF table lactometer#show ip cef 10.200.254.4

10.200.254.4/32, version 44, epoch 0, cached adjacency 10.200.200.2 0 packets, 0 bytes tag information set, all rewrites owned continues

Example 3-1 Example of an Entry in the CEF table (Continued) local tag: 20

fast tag rewrite with Et0/0/0, 10.200.200.2, tags imposed {18} via 10.200.200.2, Ethernet0/0/0, 0 dependencies next hop 10.200.200.2, Ethernet0/0/0 valid cached adjacency tag rewrite with Et0/0/0, 10.200.200.2, tags imposed {18}

IP packets that enter the LSR destined for 10.200.254.4/32 go out on interface Ethernet0/0/0 after being imposed with the label 18. The next hop of this packet is 10.200.200.2. The IP-to-label forwarding is done at the imposing LSR. In Cisco IOS, CEF switching is the only IP switching mode that you can use to label packets. Other IP switching modes, such as fast switching, cannot be used, because the fast switching cache does not hold information on labels. Because CEF switching is the only IP switching mode that is supported in conjunction with MPLS, you must turn on CEF when you enable MPLS on the router.

In Example 3-2, you can see an extract from the LFIB, by issuing the command show mpls forwarding-table.

Example 3-2 Extract of the LFIB

lactometer#show mpls forwarding-table

Example 3-2 Extract of the LFIB

lactometer#show mpls forwarding-table

Local

Outgoing

Prefix

Bytes tag

Outgoing

Next Hop

tag

tag or VC

or Tunnel Id

switched

interface

16

Untagged

10.1.1.0/24

0

Et0/0/0

10.200.200

2

17

16

10.200.202.0/24

0

Et0/0/0

10.200.200

2

18

Pop tag

10.200.203.0/24

0

Et0/0/0

10.200.200

2

19

Pop tag

10.200.201.0/24

0

Et0/0/0

10.200.200

2

20

18

10.200.254.4/32

0

Et0/0/0

10.200.200

2

21

Pop tag

10.200.254.2/32

0

Et0/0/0

10.200.200

2

22

17

10.200.254.3/32

0

Et0/0/0

10.200.200

2

24

Untagged

l2ckt(100)

4771050

Fa9/0/0

point2point

The local label (or tag) is the label that this LSR assigns and distributes to the other LSRs. As such, this LSR expects labeled packets to come to it with these labels as the top ones in the label stack. If this LSR were to receive a labeled packet with the top label 22, it would swap the label with label 17 and then forward it on the Ethernet0/0/0 interface. This is an example of the label-to-label forwarding case.

If this LSR receives a packet with top label 16, it removes all labels and forwards the packet as an IP packet, because the outgoing label (tag) is Untagged. This is an example of the label-to-IP case. If the LSR receives a packet with top label 18, it removes the top label (pop one label) and forwards the packet as a labeled packet or as an IP packet. You can see in this output some examples of the swap and pop operation. Example 3-3 shows an example of a push operation. The incoming label 23 is swapped with label 20, and label 16 is pushed onto label 20.

Example 3-3 Example of Show MPLS Forwarding-Table (Detail)

lactometer#show mpls forwarding-table 10.200.254.4

Local

Outgoing Prefix Bytes tag Outgoing

Next Hop

tag

tag or VC or Tunnel Id switched interface

23

16 [T] 10.200.254.4/32 0 Tu1

point2point

[T]

Forwarding through a TSP tunnel.

View additional tagging info with the 'detail' option

lactometer#show mpls forwarding-table 10.200.254.4 detail

Local

Outgoing Prefix Bytes tag Outgoing

Next Hop

tag

tag or VC or Tunnel Id switched interface

23

16 10.200.254.4/32 0 Tu1

point2point

MAC/Encaps=14/22, MRU=1496, Tag Stack{20 16}, via

Et0/0/0

00604700881D00024A4008008847 0001400000010000

No output feature configured

To see all the labels that change on an already labeled packet, you must use the show mpls forwarding-table [network {mask I length}] [detail] command. In Example 3-3, you can see the difference between the output of this command with and without the detail keyword. If the detail keyword is specified, you can see all the labels that change in the label stack. From left to right between {}, you see the first label, which is the swapped label (20), and then the pushed label (16) onto the swapped label. Without the detail keyword, you see only the pushed label (16).

The aggregate operation remains. When you perform an aggregation (or summarization) on an LSR, it advertises a specific label for the aggregated prefix, but the outgoing label in the LFIB shows "Aggregate." Because this LSR is aggregating a range of prefixes, it cannot forward an incoming labeled packet by label-swapping the top label. The outgoing label entry showing "Aggregate" means that the aggregating LSR needs to remove the label of the incoming packet and must do an IP lookup to determine the more specific prefix to use for forwarding this IP packet. Example 3-4 shows an entry in the LFIB on an egress PE router in an MPLS VPN network.

The egress LSR receiving a packet with label 23 would remove that label and perform an IP lookup on the destination IP address in the IP header.

Example 3-4 Example of an Entry in the LFIB for an MPLS VPN Prefix singularity#show mpls forwarding-tablevrf cust-one

Local Outgoing Prefix Bytes tag Outgoing Next Hop tag tag or VC or Tunnel Id switched interface

23 Aggregate 10.10.1.0/24[V] 0

You know now how the labeled packet is forwarded to a specific next hop after a label operation. The CEF adjacency table, however, determines the outgoing data link encapsulation. The adjacency table provides the necessary Layer 2 information to forward the packet to the next-hop LSR. This is explained in greater detail in Chapter 6.

Example 3-5 shows an adjacency table on an LSR. The adjacency table holds the Layer 2 information needed to switch out a frame on the outgoing data link.

Example 3-5 Example of an Adjacency Table lactometer#show adjacency detail

Protocol Interface IP Ethernet0/0/0

Ethernet0/0/0

Serial0/1/0

Address

10.200.200.2(13) 0 packets, 0 bytes epoch 0

sourced in sev-epoch 4 Encap length 14 00604700881D00024A4008000800 ARP

231 packets, 22062 bytes epoch 0

sourced in sev-epoch 4 Encap length 14 00604700881D00024A4008008847 ARP

point2point(10)

258 packets, 35612 bytes epoch 0

sourced in sev-epoch 4 Encap length 4 0F000800 P2P-ADJ

Example 3-5 Example of an Adjacency Table (Continued)

TAG Serial0/1/0 point2point(5)

0 packets, 0 bytes epoch 0

sourced in sev-epoch 4 Encap length 4 0F008847

P2P-ADJ

To recap the label operations:

■ Pop—The top label is removed. The packet is forwarded with the remaining label stack or as an unlabeled packet.

■ Swap—The top label is removed and replaced with a new label.

■ Push—The top label is replaced with a new label (swapped), and one or more labels are added (pushed) on top of the swapped label.

■ Untagged/No Label—The stack is removed, and the packet is forwarded unlabeled.

■ Aggregate—The label stack is removed, and an IP lookup is done on the IP packet.

Micro Expression Master

Micro Expression Master

If You Could Read Everyone Life A Book You Can Have Better Career, Great Relationships And Become Successful. This Book Is One Of The Most Valuable Resources In The World When It Comes To Reading the smallest and tiniest body Language and know what people are thinking about.

Get My Free Ebook


Post a comment