route

Latest response

hi,
netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.30.2 0.0.0.0 UG 0 0 0 ens33
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 ens33
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 ens37
192.168.30.0 0.0.0.0 255.255.255.0 U 0 0 0 ens33
192.168.50.0 0.0.0.0 255.255.255.255 UH 0 0 0 ens33

I like to know what mean 0.0.0.0 in Gateway column.
this is a router with ens33-192.168.30.128 and ens37-192.168.50.1 and ipforward is set.
ping 192.168.50.5 (other server) not work.
tnx

Responses

It looks like there are multiple errors in the last entry: 192.168.50.0 0.0.0.0 255.255.255.255 UH 0 0 0 ens33 Should be: 192.168.50.0 0.0.0.0 255.255.255.0 UH 0 0 0 ens37 'genmask' column needs to be set for a /24, not /32, subnet (assuming 192.168.50.0 is a /24 subnet) and the interface ("Iface" should be ens37, not ens33 (right now, both routes are pointing to the same interface).

What version of RHEL is this, and how is routing configured? (via NetworkManager, or via /etc/sysconfig/network-scripts/route-* files? or other configuration?)

marius, the 0.0.0.0 in the gateway column indicates that packets that match the destination network can be sent directly via the listed interface, without forwarding the packet through another gateway.