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:
On the first line, 0.0.0.0 in Genmask means there is no mask, i.e. in combination with a destination of 0.0.0.0, it means all destinations (the default gateway definition). On the second line, 0.0.0.0 in the gateway column means no gateway (directly connected the local subnet).
When routing, it does not matter where you are sending from, but where you are sending to.
Packets sent to network 192.168.1.0 will be routed using gateway 192.168.2.10, since the first line is the only one that matches destination 192.169.1.0.
192.168.2.10 (see answer 1).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With