The output of the route command is coming as below. This is in a virtual machine. My question is that why the value of Gateway for default destination coming as "gateway" and not as the IP Address of my router?? Also why are there two rows for eth0?

Route command result

  • can you add more info, like distro ? – Wissam Roujoulah Jan 3 '17 at 8:26
  • @WissamAl-Roujoulah Its a Centos 7 – Shashank Vyas Jan 3 '17 at 8:30
  • 2
    There are not two rows for eth0 any more than there are two rows for flags being U. There is one row for each destination, and two of the destinations call for using interface eth0. – user4556274 Jan 3 '17 at 9:16

The value of Gateway for default destination coming as "gateway" because route command is resolving the name of the IP, so if you want to show the IP use route -n that tell it to not resolve the names. look to the man page of route for more info.

For the second question, one raw for the subnet of the network which is and the other one is for the default gateway, so in this case the gateway is in the subnet, and it's possible to have more than two raws that have eth0 in the Iface field like when you have aliases on that interface so it's not a strange case

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.