when i cat the file


a line showing the gateway for ens192:


but when i run netstat -r or route

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
default         gateway         UG        0 0          0 ens192   U         0 0          0 ens192   U         0 0          0 ens256

Gateway seems to be what is the difference between the two gateway? i am so confused..

  • Is there another line in netstat's output that includes ? – Mark Plotnick Sep 5 '17 at 6:36
  • @MarkPlotnick No, there isnt, ive edit to the full netstat output – once Sep 5 '17 at 7:47
  • Can you add -n to the netstat -r command? – Mark Plotnick Sep 5 '17 at 9:58
  • @Mark Plotnick, the n flag shows gateway as! thanks!! – once Sep 12 '17 at 3:24

You misunderstand the meaning of a gateway. You need a gateway for reaching an IP address which is not link-local. is link-local thus you do not need a gateway for it. This entry does not show which gateway is used but which interface is used for this subnet.

  • so should not appear in route or netstat -r? – once Sep 5 '17 at 7:49
  • @once I am not so familiar with route, I always use ip route. I would expect your line default gateway to be default Maybe your entry GATEWAY= is wrong somehow and thus not accepted as default gateway. – Hauke Laging Sep 5 '17 at 8:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.