First page Back Continue Last page Image

IPv6 Longest Match Example

Destination

2001:db8:c000::99/48

Route Entry

Prefix/Prefix Length

Does it match?

1

2001:db8:c000::/40

Match of 40 bits

2

2001:db8:c000::/48

Match of 48 bits (longest match)

3

2001:db8:c000:5555::/64

Does not match 64 bits

The third route entry is not a match because its /64 prefix requires 64 matching bits

packet has the destination IPv6 address 2001:db8:c000::99

This example shows three route entries, but only two of them are a valid match, with one of those being the longest match

The first two route entries have prefix lengths that have the required number of matching bits as indicated by the prefix length