How Routers Work [Routing Table + Process]
First of all, it has the two given information for routing:
- A [source IP] address
- A [destination IP] address
It has the following three cases that it works on:
-
[CASE 1]: IP in local Network -> Forward
-
[CASE 2:] IP nowhere -> Drop
-
[CASE 3]: IP in GW's Network -> Store & Forward
Every-time the router forwards packets, it stores information in a table called “Routing Table”
Example of a routing table:
Destination | Subnet Mask | Interface |
---|---|---|
128.75.43.0 | 255.255.255.0 | Eth0 |
128.75.43.0 | 255.255.255.128 | Eth1 |
192.12.17.5 | 255.255.255.255 | Eth2 |
Default Gateway
A default gateway is a route to which information is passed when the device does not know where the destination is present.
[Example:] A PC uses a router to be its default network to make all unknown packets be forwarded through the router