IP/Network |
||
Default Gateway
Default Gateway is a kind of Gateway you specify on your PC (or any host) by which any packet goes through to reach another PC (or another host) which is not in the same subnet as your PC. Definition would sound simple, but it would be difficult to understand the concept without trying yourself or some simple examples.
Let's assume that we have very simple networks as illustrated below.
Case 1 > PC (A) tries to send a packet to PC (C). The overall procedure for this traffic would be as follows. i) The source (PC (A)) checks the destination IP (PC (C)) and find out that the destination IP belong to the same subnet. (It means it does not need to consult to 'Default Gateway' to reach the destination). ii) The source checks its ARP table to figure out the MAC address of the destination. a) If the destination IP and MAC address mapping is already stored in the ARP table, the source send the packet directly to the destination b) If the destination IP and MAC address mapping is already not stored in the ARP table, the source performs ARP procedure and figure out the destination MAC address and then send the packet to the destination.
Case B > PC (A) tries to send a packet to PC (E). The overall procedure for this traffic would be as follows. i) The source (PC (A)) checks the destination IP (PC (E)) and find out that the destination IP does not belong to the same subnet. (It means it need the help of 'Default Gateway' to reach the destination). ii) The source send the packet to the default Gateway (GW1 in this case) and the default Gateway handles all the remaining procedure to deliver the packet to the destination. (In terms of the default Gateway, it may have to go through several additional steps to deliver the data to the next node, but in terms of host. It is so simple as explained here. Just send the packet to Default Gateway).
|
||