Given the routing entries shown in the exhibit, which next-hop IP address will be used for the destination IP address 192.168.1.142? (Assume that only static routes are available for the destination)
A.
10.20.106.10
B.
10.20.14.131
C.
10.18.1.1
D.
10.20.14.130
It always deals with the longest match of binary numbers. (Here’s an example I found below in google docs).
In the above question, there are 2 exact same “longest matches”. When that happens it uses the one with the largest subnet mask (wikipedia)
Which interface RA will use to send the packet to the next-hop
172.21.10.237?
RA compares the IP address of the next-hop 172.21.10.237 with the IP address of each of its interfaces:
1010 1100 . 0001 0101 . 0000 1010 . 1110 1101
1010 1100 . 0001 0101 . 0000 1010 . 1111 0110
172.21.10.237
172.21.10.246
1010 1100 . 0001 0101 . 0000 1010 . 1110 1101
1010 1100 . 0001 0101 . 0000 1010 . 1110 1110
Longest match is 172.21.10.238.
172.21.10.237
172.21.10.238
Hi,Thanks for explaining.But I could not understand clearly.Could you please explain more why the other 2 are not selected for the example One Response to “which next-hop IP address will be used for the destination IP address 192.168.1.142?” ?
I tried to understand, but dull brain could not catch it.
Will appreciate if you could explain more. Many thanks.
e-mail: [email protected]
192.168.1.42 lies in two subnets 192.168.1.128/27 its range is from 192.168.1.128 to 192.168.1.159 and 192.168.1.128/28 which ranges from 192.168.1.128 to 192.168.1.143 so it selects a more specific route which is 192.168.1.128/28.