in Computer Networks
2,030 views
1 vote
1 vote

Consider the following routing table of a router.

GATE CN1

Consider the following three IP addresses.

GATE CN

How are the packets with above three destination IP addresses are forwarded?

(A) 1->D, 2->B, 3->B
(B) 1->D, 2->B, 3->D
(C) 1->B, 2->D, 3->D
(D) 1->D, 2->D, 3->D

in Computer Networks
by
2.0k views

1 Answer

5 votes
5 votes
ANS-option(B)

the subnet mask of first prefix is 255.255.192.0 =>11111111.11111111.11000000.00000000

the subnet mask of second prefix is 255.255.252.0 =>11111111.11111111.11111100.00000000

first IP-192.24.0.0/18 when we perform bit wise AND with the first subnet mask we get 192.24.0.0

and when we perform bitwise AND with second  subnet mask we get 192.24.0.0 so clearly it is matching only first one

so I ->D

second Ip-192.24.12.0/22 when we perform bitwise AND with first subnet mask we get 192.24.0.0 and when we perform bitwise AND with second subnet mask we get 192.24.12.0 so clearly it is matching with second one

II ->B

Third IP- 192.24.54.0 when we perform bitwise AND with first subnet mask we get 192.24.0.0 and when we perform bitwise AND with second subnet mask we get 192.24.52.0 means it is only matching with first one

III->D
edited by

3 Comments

Third IP- 192.24.54.0 when we perform bitwise AND with first subnet mask we get 192.24.0.0

So it matches with the first one, right? why is it not forwarded to first router? pls explain. 

0
0
sorry for that..that was my mistake
0
0
ok..
0
0

Related questions

0 votes
0 votes
1 answer
1