First page Back Continue Last page Image

IPv4 Longest Match Example

Destination IPv4 Address

Address in Binary

172.16.0.10

10101100.00010000.00000000.00001010

Route Entry

Prefix/Prefix Length

Address in Binary

1

172.16.0.0/12

10101100.00010000.00000000.00001010

2

172.16.0.0/18

10101100.00010000.00000000.00001010

3

172.16.0.0/26

10101100.00010000.00000000.00001010

For any of these routes to be considered a match there must be at least the number of matching bits indicated by the subnet mask of the route

IPv4 packet has the destination IPv4 address 172.16.0.10

The router has three route entries in its IPv4 routing table that match the Destination Address

Of the three routes, 172.16.0.0/26 has the longest match and would be chosen to forward the packet