In the midst of this series of posts around fast convergence, someone asked if I could explain p and q space a little better. The illustration here might help readers who have more of a visual mind to understand the concepts involved.
Essentially, we can think of any two connected network as a ring — whether or not it’s actually a ring on the network diagram doesn’t matter, it can always be reformatted into a set of interconnected rings through diagram manipulation (non-planar designs are an exception, but we’ll leave that to the side for another post). If we drop a ball on the ring illustrated at point X, it will roll to the right around the ring towards the destination. This “natural” path is what we can call the p space.
Normally the p space is defined by the metrics along the links; in the ring illustrated, the high point is where the metric between any point in the ring and the destination is the highest. Dropping a ball to the right of this high point will cause the ball to roll along through the p space. Dropping a ball to the left of this high point will cause it to roll along towards the destination through the q space.
The question, in the world of fast reroute, is how to get packets from the p space to the q space without the packet being returned to the forwarding device. To put this in more graphical terms, how can we get a ball starting at x to roll past the high point on the circle illustrated, so it flows along the “back side” of the ring towards the destination? We have to overcome that high point in the ring somehow.
Imagine dropping a ball along this ring at X. The ball will roll through the p space to reach the correct exit point to reach the destination, as shown. If there’s some obstruction on the ring, however, the ball will sit, or roll between the high point on the ring and the obstruction (a microloop!). But what if we could just dig a tunnel through that high point in the ring? Then the ball could roll to the obstruction, and back again through the tunnel, into the q space, and finally to the correct exit point.
This is, in effect, precisely what fast reroute mechanisms do — they tunnel through the “high point,” the point on the ring where the cost to reach the destination is the highest. Next we’ll start looking at some of these mechanisms; I’ll start with the simplest, not-via, and move from there into more difficult and explicit mechanisms used to find the right place to tunnel through the high point, and drop packets into the q space so they’ll be forwarded, rather than looping.