I want to ask a question about route command in Linux. I have enter following command in Linux terminal
> route
and got the output:
The "default" means that if the destination is not found in any of the other rules than use this rule.
If there is more than one address in the routing table that works for the outgoing packet, the rule with the higher subnet mask will be used. If those are tied, then metric comes into play but that will be different based on what protocol is being used.
For example, the laptop I am on currently has three interfaces:
Routers generally have at least 2 interfaces for each side, 1 for each network they are a part of. For most home routers, 1 interface is part of your home network and the other is part of the external network headed toward your ISP.
This is where the packet will be sent if the destination is not on the same network as the sender.
If the value is in "*" or "On-link" or the address of the current device... these all mean the same thing. It means that the packet is addressed to a device that is directly reachable by the current host. In other words, they're on the same network so the gateway won't actually be used because the host will know the data link layer (MAC) address of the destination and be able to send it directly there. These values are just used for human readability in this case.
As for the process of sending a packet: