1

I just completed a fresh install of Centos 7 on a PC. It is connected to the campus network, so I am not in control of the DNS server. I gave it a hostname by setting the HOSTNAME value in /etc/sysconfig/network. I also set the DHCP_HOSTNAME value in /etc/sysconfig/network-scripts/ifcfg-eth0 and rebooted the system.

The problem is I cannot ping this machine from another arbitrary computer. I keep getting messages saying that the host doesn't exist.

What are some typical ways that a machine on DHCP gets its hostname tied to its ip address so that it will resolve? Is there a way to send the DHCP server my hostname?

  • 2
    Your hostname as set by you is local to the computer. Some DHCP/DNS combinations can update DNS automatically, but others can't - it all depends on the infrastructure. Speak to your DNS administrators :-) – garethTheRed Mar 12 '16 at 10:10
2

Im Guessing you are talking about a local-net (private) DNS Server, not one that is reachable from the internet.

If you set the Hostname only on your machine, the other PC's in the network are not aware of that. if you just want to try eg. a Webserver on your PC, you can put in the other machines in the /etc/hosts file a temporary record for your PC. If you want that all the other PC's are reaching yours with the DNS name. You have to contact the Admin of the DNS server. In some Situations where there is a Active Directory you can anounce your dns name if you join the AD.

  • 1
    This is a good answer if you don't have access to update campus DNS servers. Plan B is you can publish your IP address. Also there are several dynamic DNS resolvers out there than you can configure provided your campus firewalls let you get to them. dyndns.org is one example. – Patrick Taylor Oct 3 '18 at 6:24

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.