LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-28-2006, 05:09 AM   #1
richearle
LQ Newbie
 
Registered: Jul 2006
Posts: 4

Rep: Reputation: 0
IP adrs work but DNS won't resolve my name


The guy has left and I'm now holding the baby ! I don't know much about Linux or networks ! Question is, I've installed a new unmanned unit at a site and using ifconfig I can see it's been given an IP address. I can Putty to it fine. It is supposed to have a name which is resolved by the network (owned by a big multination company) but I can't connect (or putty) using it's name. This is one of about a dozen units across the country and all the existing units work fine. Is there any command I can give the unit (via putty - I'm not at site now) to tell the network to learn it's name and resolve it. I don't want to go round putting fixed ip address into all the stations that connect to it (anyway what if the IP adrs changed). I figure there must be some kind of DNS or something that needs telling to use to update. Is there a linux command to force this to happen? Thanks for your help guys - sorry if I'm a thickie! - Rich
 
Old 07-28-2006, 05:28 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
this is all down to the rest of your network, not the linux box itself. it's up to your DNS & DHCP servers to arrange between the two of them to instigate a DNS update frmo the DHCP request that got the IP in the first place. if the dynamic updates are not happening on yoru infrastructure, you'd then need to add it to DNS manually. You've not said a thing about what the rst of your infrastructure runs on though, windows? linux? a network can not learn host names, a box sitting on the network learns them from information passed to it from other servers. Windows does a bunch of crap with it's domain integration where a machine in a domain can tell a windows domain controller to update it's DNS but this doesn't extend to Linux.
 
Old 07-28-2006, 05:43 AM   #3
richearle
LQ Newbie
 
Registered: Jul 2006
Posts: 4

Original Poster
Rep: Reputation: 0
More info

Thanks for your help Chris. This network is owned by a major petro-chemicals company and I've got no idea what systems or OS they are using. Frustratingly it's v. hard to get any help or co-operation from their IT dept. All I know is there's an active network wire that plugs into our box ! I took the old box out (which was still working with the same site name I need) and that was on Ip adrs xx.xx.xx.21 I put the new unit in which was called new2 and it got adrs xx.xx.xx.20. I then changed /etc/hostname using nano and rebooted it. The contents of resolv.conf look to be the same as other sites that are working. I had hoped that the DNS would sort things out given time (but it's now had about 20 hours and not done so). Somebody told me you get some kind of lease on the IP adrs and it might fix when that renews - but I don't know if I have to be waiting weeks or minutes ! I don't believe it will ever fix itself now. Cheers - Rich
 
Old 07-28-2006, 08:23 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
There's not really a whole heap you can do, especially not without knowing what is behind your dhcp and dns. obviosuly it's a *huge* security issue if someone in your position could put a box on the network and have the name of your choosing suddenly being associated with that box. what if you choose a name that's used elsewhere? you could take over the main mail server name etc...

When a DHCP request is made by a server it will often pass along the hostname in the request for reference. often ip addresses are assigned by hostname explicitly, as opposed to by mac address, or indescriminantly from a pool. as you got an ip address on dhcp after doing nothign centrally you clearly have an open DHCP pool to pull from. i would *guess* that the orginial box pulled a lease down from DHCP and a DHCP guy made that address reserved for that MAC address. and the DNS name was stuck to that IP one way or another.

what happens if you ping the hostname you are after? does it resolve to the old address still? if so i would suggest that you should possibly look at a mac spoof on the new box so the DHCP requests appear to be coming from the old addres - OR - take the nic out of the old machine and reuse it, if possible. if you want to try a spoof, check here: http://whoozoo.co.uk/mac-spoof-linux.htm but there are still other issues that would affect how the DHCP server assigns the address. not least you already have a lease, so by default your box will ask to keep the same address regardless. you can probably delete the lease file which tends to live somewhere like /var/spool/dhcp/leases or similar.

one last thing is to just stop using DHCP and use the old IP address. if this address is based on DHCP though the lease may well expire and be dished out to somethign else on the network too, which would be nasty.

these are most definitely hacks and workarounds though.... nothign beats talking to the sysadmins and getting their view of things.
 
Old 07-28-2006, 09:30 AM   #5
richearle
LQ Newbie
 
Registered: Jul 2006
Posts: 4

Original Poster
Rep: Reputation: 0
When I ping the name it resolves to the old ip adrs and so fails. So I am going to try to spoof the MAC adrs as you say. Thanks v. much for your help. - Rich
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dns client cannot resolve on dns server jtvillegas Linux - Software 3 03-12-2016 03:30 PM
DNS can't resolve gmail.com but can resolve everything else? TongueTied Linux - Networking 2 01-24-2006 03:39 AM
DNS Resolve? b0rgri0t Slackware 1 01-04-2006 02:00 PM
Can't resolve DNS through IP MASQERADING Amir Linux - Networking 3 09-13-2003 12:48 AM
if no DNS in /etc/resolve.conf then??? farhan Linux - General 4 03-14-2003 06:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration