Longest Prefix Matching
Consider a datagram network using 8-bit host addresses.
Suppose a router uses longest-prefix matching, and has the following forwarding table:
Question List
1. Suppose a datagram arrives at the router, with destination address 00011000. To which interface will this datagram be forwarded using longest-prefix matching?
2. Suppose a datagram arrives at the router, with destination address 00011101. To which interface will this datagram be forwarded using longest-prefix matching?
3. Suppose a datagram arrives at the router, with destination address 10010101. To which interface will this datagram be forwarded using longest-prefix matching?
Solution
1. Since the address is 00011000, it will go to interface 6.
2. Since the address is 00011101, it will go to interface 6.
3. Since the address is 10010101, it will go to interface 4.
That's incorrect
That's correct
The answer was: 6
The answer was: 6
The answer was: 4