Skip to main content

The Problem

The problem with mutual encapsulation is the following. Consider the topology shown in Figure 1. We see two backbones and four stubs. Backbone B(X) uses a native protocol of X (that is, it expects to receive packets with a header for protocol X). B(Y) uses a native protocol of Y. Likewise, the right and left S(Y) stubs use protocol Y, and the right and left S(X) stubs use protocol X.

       :::  :::::          :::::   :::          :::
+------+ :Y :X:Y +------+ :X:Y :Y +------+ :Y +------+
| | ::: ::::: | | ::::: ::: | | ::: | |
| S(Y) |-----Ra-----| |-------Rb----| |------| S(Y) |
| | | | | | | |
+------+ | | | | +------+
| B(X) | | B(Y) |
| | | |
::: | | ::: ::::: | | ::::: :::
+------+ X: | | X: X:Y: | | X:Y: X: +------+
| | ::: | | ::: ::::: | | ::::: ::: | |
| S(X) |------| |-----Rc------| |------Rd----| S(X) |
| | | | | | | |
+------+ | |-----Re------| | +------+
+------+ +------+

LEGEND:

:::::
X:Y: A packet with protocol X encapsulated in protocol
::::: Y, moving left to right

Rx Router x

S(Y) A stub network whose native protocol is protocol Y

B(X) A backbone network whose native protocol is protocol X

Figure 1: Mutual Encapsulation

Figure 1 shows how packets would travel from left S(X) to right S(X), and from right S(Y) to left S(Y). Consider a packet from left S(X) to right S(X). The packet from left S(X) has just a header of X up to the point where it reaches router Rc. Since B(Y) cannot forward header X, Rc encapsulates the packet into a Y header with a destination address of Rd. When Rd receives the packet from B(Y), it strips off the Y header and forwards the X header packet to right S(X). The reverse situation exists for packets from right S(Y) to left S(Y).

In this example Rc and Rd treat B(Y) as a lower-level subnetwork in exactly the same way that an IP router currently treats an Ethernet as a lower-level subnetwork. Note that Rc considers Rd to be the appropriate "exit router" for packets destined for right S(X), and Rb considers Ra to be the appropriate "exit router" for packets destined for left S(Y).

Now, assume that somehow a routing loop forms such that routers in B(Y) think that Rd is reachable via Rb, Rb thinks that Rd is reachable via Re, and routers in B(X) think that Re is reachable via Rc. (This could result as a transient condition in the routing algorithm if Rd and Re crashed at the same time.) When the initial packet from left S(X) reaches Rc, it is encapsulated with Y and sent to B(Y), which forwards it onto Rb. (The notation for this packet is Y, meaning that X in encapsulated in Y.)

When Rb receives Y from B(Y), it encapsulates the packet in an X header to get it to Re through B(X). Now the packet has headers X<Y>. In other words, the packet has two X encapsulates. When Rc receives X<Y>, it again encapsulates the packet, resulting in Y<X<Y>>. The packet is growing with each encapsulation.

Now, if we assume that each successive encapsulation does not preserve the hop count information in the previous header, then the packet will never expire. Worse, the packet will eventually reach the Maximum Transmission Unit (MTU) size, and will fragment. Each fragment will continue around the loop, getting successively larger until those fragments also fragment. The result is an exponential explosion in the number of looping packets!

The explosion will persist until the links are saturated, and the links will remain saturated until the loop is broken. If the looping packets dominate the link to the point where other packets, such as routing update packets or management packets, are thrown away, then the loop may not automatically break itself, thus requiring manual intervention. Once the loop is broken, the packets will quickly be flushed from the network.