Linux – Cannot ping linux (RedHat) machine by hostname

hostnamelinuxnetworkingpingredhat

For some reason, a linux (RedHat) machine that I have is not ping-able by hostname! It is ping-able by IP address though. I have the same network configurations as another linux (RedHat) machine that is ping-able by hostname and IP address, and I'm not sure where I'm going wrong.

Is there any other steps you see besides these:

  1. Under Network Configuration, select the eth0 device in the Devices tab, press on the Edit icon, and set Manual IP Address Settings. Ok, so this isn't probably necessary.. you can probably leave it on Automatically obtain IP address settings with dhcp, but I just wanted to show you guys what I have in my config.
  2. In the DNS tab, set the hostname, DNS & DNS search path.
  3. In the Hosts tab, set the IP address and hostname again.

The command hostname on the machine's cmd does show my configured hostname from the DNS and Hosts tab.

Best Answer

In order to ping a device by name, the name -> IP mapping must be in the DNS server's zone file for that domain. This has nothing to do with any configuration on the actual device itself - in fact, almost nothing you do on the machine will have any effect on what the name is.