| Subnet Address | Subnet Mask (in CIDR notation) | Interface |
| 145.36.0.0 | /16 | E1 |
| 145.36.128.0 | /17 | E2 |
| 145.36.64.0 | /18 | E3 |
| 145.36.255.0 | /24 | E4 |
| Default | .. | E5 |
Correct : a
Explanation:
When a packet arrives at a router, the router determines the output interface by matching the destination IP address against the subnet addresses in its routing table using the Longest Prefix Match (LPM) rule. If multiple entries match, the one with the longest mask (highest CIDR value) is chosen.
1. Convert the Destination IP to Binary:
We only need to focus on the 3rd octet (109) because the first two octets (145.36) are identical across all choices.
• Destination IP: 145 . 36 . 109 . 70
• 3rd Octet (109) in binary = 01101101
2. Test Matches for Each Interface:
• Interface E1 (145.36.0.0/16):
The mask /16 means the first 16 bits must match (145.36).
Our packet matches. (Valid match, prefix length = 16)
• Interface E2 (145.36.128.0/17):
The mask /17 means the first 17 bits must match. The 17th bit is the first bit of the 3rd octet.
Subnet 3rd octet (128) = 10000000 → 17th bit is 1.
Packet 3rd octet (109) = 01101101 → 17th bit is 0.
Mismatch. (Does not match)
• Interface E3 (145.36.64.0/18):
The mask /18 means the first 18 bits must match. These are the first 2 bits of the 3rd octet.
Subnet 3rd octet (64) = 01000000 → First 2 bits are 01.
Packet 3rd octet (109) = 01101101 → First 2 bits are 01.
Match! (Valid match, prefix length = 18)
• Interface E4 (145.36.255.0/24):
The mask /24 means the first 3 octets must match exactly.
Subnet 3rd octet is 255, while the packet's is 109.
Mismatch. (Does not match)
3. Apply Longest Prefix Match Rule:
The destination IP matches both interface E1 (/16) and interface E3 (/18). Since 18 bits is a longer, more specific prefix than 16 bits, the router selects interface E3.
4. Conclusion:
The packet will be forwarded to interface E3, making option (a) the correct choice.
Similar Questions
Total Unique Visitors