532 views

2 Answers

0 votes
0 votes
In practical scenarios, a router will be connected to many networks(interfaces). So when router receives a packet, how will it decide to which network packet should be forwarded?? we can easily decide this by seeing destination ip only. But how this can be implemented in logic/software, so that routers can decide the destination network easily? For that, network/subnet mask concept is introduced, by using mask router can logically decide to which network packet should be forwarded.And this way routers have routing table and in routing table we have generally three columns Network ID, Subnet Mask and Interface. When a packet comes, its destination IP will be ANDed with mask to get corresponding Network ID and if Network ID matches with the Network ID entry in table, packet will sent to its interface entry, this step is repeated for all entries in table, and if nothing matches, packet will be sent to default entry interface.

Related questions

3 votes
3 votes
2 answers
2
radha gogia asked Apr 6, 2018
1,430 views
Interface $A - 255.255.255.128$Interface $B -255.255.255.192$Interface $C -255.255.255.224$ 1) which one of the following IP addresses belong to interface $B$ ?$200.200.2...