0

My understanding of an IP forwarding table is that they have a listing of different networks (identified by their IP ranges) and connects it to the next-hop router. However, I'm surprised why two entries in this listing have overlapping IP addresses. For example, a forwarding table in a router can look like

192.24.0.0/18   D
192.24.12.0/22  B

In above table, addresses from 192.24.12.0 to 192.24.15.255 overlap, i.e., match with both entries of the table.

I know that there are ways to resolve this, but my question is why the overlapping addresses appear in the IP table in the first place? Why should the router keep two different routing possibility for the same address?

Pagol
  • 103
  • 4

1 Answers1

2

This is fairly common (ubiquitous in fact) and is this the way as its how IPV4(and 6) is designed.

The "Default Route" is nothing more then the route of last resort, being 0.0.0.0/0

Having more specific subnets allows more flexible routing, and, importantly, reduces the number if entries required in a route table - while this does not matter so much on small systems, larger routers often benefit from these optimisations.

Similarly, it allows for fallback without deploying dynamic routing. One example - if there is a fast but unstable link where the interface goes up and down (like a PPP link) to a site of interest and a slower more general link, using subnets can allow failover and tailback to be almost seemless.

Another example is forcing a more specific route - for example advertising 0.0.0.0/1 and 128.0.0.0/1 across a VPN will have the net effect of a default route regardless of metrics set on the default route.

So in short, because this is how the protocol is designed, and this gives flexibility in routing in a simple way (both to implement and from programming a system to route packets)

davidgo
  • 5,964
  • 2
  • 21
  • 38