Figure 94 Simple Network Illustrating Switching by Tags

Because Router A is advertising a summary, and Router B is a component within that summary, Router C has two entries in its routing table:

These two entries are passed to Router D so that it will also have two entries in its table:

If Router D receives a packet destined to 10.1.2.1, it first finds that there are two matches for this destination, and it must compare the prefix length of these two matches to determine the best path.

Instead of using the IP address to switch the packet, these routers could assign labels to represent each hop along the path, and then switch based on these labels.

For instance, assume that the following conditions are true:

• Router A assigns the label 100 to the destination 10.1.0.0/16, which it is advertising to Router C.

• Router B assigns the label 200 to the destination 10.1.1.0/24, which it is advertising to Router C.

• Router C assigns the label 300 to 10.1.0.0/16 and advertises this upstream to Router D.

• Router C assigns the label 400 to 10.2.0.0/16 and advertises this along to Router D.

Now, when Router D receives a packet destined to 10.1.2.1, it notes that this route corresponds to 10.1.0.0/16, which is labeled 400. So, Router D marks the packet with the label 400 and forwards it to Router C. Instead of looking at the destination address and choosing the next hop based on the longest prefix match from the IP routing table, Router C simply looks up the label, 400, and sees that this belongs 10.1.0.0/16, which is labeled 100. Router C swaps the labels and passes the packet along.

When Router B receives the packet, it sees from the label (200) that this packet is destined to a directly attached subnet. Then, it strips the label off the packet and forwards it as usual.

The preceding example doesn't provide much network savings. You've saved only one router the expense of looking up a longest prefix match. If that one router was really a cloud, however, and the cloud contained numerous routers, the savings could be significant.

When a Label Switching Router (LSR) removes a label from the packet, this is called a pop; when it adds a new label on the packet, this is called a push.

Was this article helpful?

0 0

Post a comment