Linux -> Linux Name resolution, under a DHCP environment...

OK... first off, hope everyones having a GREAT DAY ;)

And second... here's my situation: In my apartment building the landlord or whomever manages the internet has it setup to use DHCP and whenever one of my linux machines changes IP's I have to physicly go to it and login to figure out what the IP is so I can SSH to it.

Its not too bad to have to log into another machine if its on the same desk, but if thats the case I wouldn't be trying to ssh to it....
So anways two of the machines are on completely diffenet ends of the house and the other is suppose to be a headless machine(No Monitor).
And I've already tried talking with the landlord and the ISP that manages the connection with them to get a static IP...and they pretty much tell me to leave them the hell alone...

What can I do to make it so I can just say

ping LinuxA
or ping LinuxB

stuff like that so I don't have to keep physicly going to a machine that is suppose to be remotely accessable. (And use to be before DHCP was a must)....

Thanks Guys & Gals
Who is Participating?
NetminderConnect With a Mentor Commented:
User resolved; closed, 250 points refunded.
Site Admin
If you are getting internt accessible IP addresses you can use a free dynamic DNS service like or DynDNS.  These services are for people just like you, I use them myself.  These services allow you to have a DNS name like

Everytime your IP changes, your computer will automaticly update the DNS record with the new IP.  There are a 100 different ways to do this, but your best bet is to follow the directions on the dynamic DNS service site that you end up choosing.  Let me knwo if you need more help or information.   Just google dynamic DNS.
EHart7Author Commented:
hummm.. guess I forgot something....(sorry enkrypter), Thanks for the speed-E responce though...

what if I told you the entire network for the apartment complex was on its own subnet (they are using NAT) so they only have to pay for one real IP. and their isn't any port forwarding only outbound connections are allowed....
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to and use offer code ‘EXPERTS’ to get 10% off your first purchase.

You could always get your own router, and run your pc's on your own subnet with static ip's, programmed to go out to the inet via the router, which acts as a dhcp client on your apartment's subnet.
EHart7Author Commented:
Thats got some draw backs that are keeping me away too...

If I do a subnet of the subnet to put my machines in then all my machines can have static IP addresses and that solves that problem but then I can't access my room mates machines out side my prived subnet or vise-versa. in addition all the cabling in the four bedroom apartement is built into the walls and its a really big place so I don't really feel like runing wires from one end of the house to the other... I think the one time I "had" to do that it required a 75' cable to reach......
You could try running SAMBA on the Linux boxes, and make one behave as a WINS server.  Each time the others join the network, they'll broadcast their "NetBIOS name" and IP address, and the WINS server will update its database....

EHart7Author Commented:
Hey everyone thanks for your responces but I think I just figured it out on my own...

Its a feature/services that a DNS server is suppose to maintain. In my case its the router in my building that is providing the internal DHCP, NAT, and DNS services... aparently when a DHCP request is made from a client it has the ability to pass a DNS Name to the DNS server to be associated with on the respective network....

I found the settings in red hat under "System Settings -> Networking" Under the devices tab select the connection you want to change and then click edit. The under the DHCP settings their is a text blank thats labeled "Hostname" And I think you have to have the check box checked that says "Obtain DNS information from provider"(meaning the DHCP  provider)

For future reference of people having this same problem and not having the RedHat Network tool or RedHat all together here is a list of files that contain my hostname on my system after changed the text blank menchined above.


Hope this helps.... bottom line is it can be done without samba/wins/etc... and its a function of the DNS/DHCP server(s)

Again... Thanks everone
EHart7Author Commented:
I was also informed by a freind running Debian that this site
was able to help him adapt the /etc/sysconfig/..../ifcfg-eth0 to the Debian distro
Because the /etc/sysconfig/..../ifcfg-eth0  seems to be a redhat & fedora thing (only)

so for other distro's check out this link... which tells how to change your DHCP / DNS obtained hostname
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.