A router uses the following routing table: Destination Mask Interface 144.16.0.0 255.255.0.0 eth0 144.16.64.0 255.255.224.0 eth1 144.16.68.0 255.255.255.0 eth2 144.16.68.64 255.255.255.224 eth3 A packet bearing an estimation address 144.16.68.117 arrives at the router. On which interface will it be forwarded?
A router uses the following routing table: Destination Mask Interface 144.16.0.0 255.255.0.0 eth0 144.16.64.0 255.255.224.0 eth1 144.16.68.0 255.255.255.0 eth2 144.16.68.64 255.255.255.224 eth3 A packet bearing an estimation address 144.16.68.117 arrives at the router. On which interface will it be forwarded? Correct Answer <span style="text-align: -webkit-center;">eth2</span>
The correct answer is "option 3".
CALCULATION:
To calculate the interface, perform the following steps:
1.Bitwise AND between IP address 144.16.68.117 & subnet mask.
2.Match the output network address with the destination address given corresponding to the subnet mask.
|
DESTINATION
|
ADDRESS (GIVEN) |
MASK |
BITWISE AND (ADDRESS & MASK) |
|
144.16.0.0 |
144.16.68.117 |
255.255.0.0 |
144.16.0.0 |
|
144.16.64.0 |
144.16.68.117 |
255.255.224.0 |
144.16.64.0 |
|
144.16.68.0 |
144.16.68.117 |
255.255.255.0 |
144.16.68.0 |
|
144.16.68.64 |
144.16.68.117 |
255.255.255.224 |
144.16.68.96 |
Option 3:
|
|
1st Octet |
2nd Octet |
3rd Octet |
4th Octet |
|
144.16.68.117 |
10010000 |
00010000 |
01000100 |
1110101 |
|
255.255.255.0 (&) |
11111111 |
11111111 |
11111111 |
00000000 |
|
Result |
10010000 |
00010000 |
01000100 |
00000000 |
| 144 | 16 | 68 | 0 |
Hence, the packet with IP address 144.16.68.117 will be forwarded to the interface eth2.