Link to home
Start Free TrialLog in
Avatar of EHart7
EHart7

asked on

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
Avatar of enkrypter
enkrypter

If you are getting internt accessible IP addresses you can use a free dynamic DNS service like http://www.zoneedit.com or DynDNS.  These services are for people just like you, I use them myself.  These services allow you to have a DNS name like mylinuxpc.dyndns.com

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.
Avatar of EHart7

ASKER

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....
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.
Avatar of EHart7

ASKER

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....

Avatar of EHart7

ASKER

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.

/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/networking/devices/ifcfg-eth0
/etc/sysconfig/networking/profiles/default/ifcfg-eth0
/etc/sysconfig/networking/profiles/defaultCopy0/ifcfg-eth0

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
ASKER CERTIFIED SOLUTION
Avatar of Netminder
Netminder

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of EHart7

ASKER

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

http://www.cpqlinux.com/hostname.html