Route command output:
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.2.10 0.0.0.0 UG 0 0 0 eth0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
$
From the above output the following are the doubts I have:
- What is 0.0.0.0 means in destination and gateway column
- If the packet is sent from 192.168.2.36 ip, what is the gateway for that. It use 192.168.2.10 or 0.0.0.0
- Lets consider I have one more network with ip 192.168.1.0. If the packet is sent from any of the host from this network, what is the gateway for that ip.
- What is default gateway.