Longest prefix match

Algorithm IP routers use to chose matching entry from forwarding table

  • Forwarding table is a set of CIDR entries
    • An address might match multiple entries
    • E.g. 171.33.0.1 matches both entries on right
  • • Algorithm: use forwarding entry with the longest matching prefix
    • Longest prefix match will chose link 5 for 171.33.0.1