CSE 316 · Session 17 · try it yourself

The gauntlet — every row tested, every time, and the longest match wins

One router’s table, and a destination address. Every row gets the same test — destination AND mask, compared with the prefix — and then the matching rows are ranked by prefix length.

Destination
The forwarding table
PrefixMaskdest AND mask Match?BitsNext hopIface
bitsarebits.com · CSE 316 — Data Communication & Networking · longest prefix match