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?