On 2020-08-04 07:45, ToddAndMargo via users wrote:
On 2020-08-03 16:10, Ed Greshko wrote:
> $ netstat -rn
> Kernel IP routing table
> Destination Gateway Genmask Flags MSS Window irtt Iface
> 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 enp2s0
> 0.0.0.0 192.168.2.5 0.0.0.0 UG 0 0 0 wlp4s0
> 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 enp2s0
> 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 wlp4s0
> 192.168.56.6 192.168.2.116 255.255.255.255 UGH 0 0 0 wlp4s0
> 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
I was just curious.
Why so many gateways? I see three. Got
an "H (target is a host)" flag too.
Both 192.168.1.1 and 192.168.2.5 are "default" gateways. (dst=0.0.0.0). Any
traffic for which
a more specific route doesn't exist will be sent via 192.168.1.1 (metric=100).
192.168.2.5 is a
"backup".
192.168.56.6 is a directly connected host connected to 192.168.2.116. That route is only
used,
for example, when ssh'ing to that host.
Since I presume it works, there is something
new to be learned!
Well, I generally don't have non-working configurations. :-)
--
The key to getting good answers is to ask good questions.