LinuxQuestions.org
Help answer threads with 0 replies.
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 02-28-2012, 10:32 AM   #1
sleepylight
Member
 
Registered: Apr 2004
Location: Joppa
Posts: 30

Rep: Reputation: 16
Cannot sort out how my IP is being resolved


Hi all,

I have a set of servers that I moved from a 192.168.1.x network to 131.92.54.x, and they don't seem to be resolving their names correctly. I'm pretty stumped, so I'll just start by listing what I have right now. (I've obscured the domain since this is a work machine. I do assure you though, they are consistant)

First, the IP is being obtained correctly via DHCP:

[max@icarus ~]$ /sbin/ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:30:48:8B:35:0E
inet addr:131.92.54.133 Bcast:131.92.54.191 Mask:255.255.255.128
inet6 addr: fe80::230:48ff:fe8b:350e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
[snip]

Second, the name is correctly resolved by nslookup:
[max@icarus ~]$ nslookup icarus
Server: 131.92.54.130
Address: 131.92.54.130#53

Name: icarus.xxxxxx.xxx
Address: 131.92.54.133

Finally, my /etc/hosts file is as simple as can be:

[max@icarus ~]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

However, if I run a command like ping:
[max@icarus ~]$ ping icarus
PING icarus.xxxxxx.xxx (192.168.1.6) 56(84) bytes of data.

--- icarus.modsim.mil ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms

Boom! I get the old IP. This must be listed in a file somewhere, but I can't find it. I've checked everything in /etc/sysconfig that looks plausible and I jsut don't see an IP listed anywhere. Has anyone else had this issue? I'm running CentOS 5.6.

-Max
 
Old 02-28-2012, 10:48 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
What is in your /etc/nsswitch.conf file - specifically the hosts: line?

What is in your /etc/resolv.conf? Does it specify domain to search?

What happens if you use dig instead of nslookup? It should give you more information as to what server responded.

What happens if you do nslookup, ping and "dig -x" on the two IPs (old and new)?

What happens if you do nslookup, ping and dig on the fully qualified domain name (FQDN) instead of just the short name? (That is icaraus.example.com rather than just icarus.)

In our work environment we have 4 Windows DNS servers for internal use (and 2 Linux for external). I've seen scenarios where one or more of the Windows DNS servers had the wrong (old) IP cached and had to have the Windows admins clear the cache. Similarly Linux DNS (BIND) can cache so it may be you need to check for a cached entry. (Cached entries typically go away within 48-72 hours by themselves.)
 
Old 02-28-2012, 12:35 PM   #3
sleepylight
Member
 
Registered: Apr 2004
Location: Joppa
Posts: 30

Original Poster
Rep: Reputation: 16
So, nsswitch.conf is pretty boring:
[snip]
hosts: files nis dns
[snip]

Also, although there are hosts published via NIS, they aren't applicable:
131.92.54.130 zeus.xxxxxx.xxx zeus
131.92.54.131 hera.xxxxxx.xxx hera
131.92.50.70 filer.xxxxxx.xxx filer

resolv.conf doesn't provide much more information either.

[max@icarus ~]$ cat /etc/resolv.conf
; generated by /sbin/dhclient-script
search xxxxxxx.xxx
nameserver 131.92.54.130


Ok... I just started playing with dig and now everything seems to be working. I only have the one DNS server, so I'm sure it isn't a server side issue, but perhaps a client side caching problem. I removed a bad IP line out of the /etc/hosts file before lunch (when I sent the initial email), and nothing was working. Now, without changing anything it's 2 hours later and things appear to be fine. I wonder if there isn't some sort of local caching that I'm unaware of.

I just found another box with the same issue. We'll see if this doesn't resolve itself.

I'm not sure it's "fixed", but it is working.

-Max
 
Old 02-28-2012, 01:12 PM   #4
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
Glad it is working for you.

"nslookup" is actually "deprecated" in favor of "host" though many systems still (or only) have nslookup. Dig gives you a lot more information based on the flags you use. You can even get dig for your Windows systems if you want. Whenever troubleshooting lookups dig should be your tool of choice.
 
  


Reply

Tags
dns, hostname, ipv4


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Is there a sort of 2nd SSH daemon server, sort of JAILKIT, in the debian repositories frenchn00b Debian 5 06-20-2010 04:03 AM
Can I use GNU sort to sort one field in order, another in reverse? zombieite Linux - Newbie 4 04-27-2009 12:23 AM
php sort help - sort numerical descending then by alphabetical? RavenLX Programming 3 03-11-2009 08:35 AM
selection sort compiles but does not sort the array as desired ganesha Programming 2 04-20-2008 07:44 AM
Is there a line limit with the sort utility? Trying to sort 130 million lines of text gruffy Linux - General 4 08-10-2006 08:40 PM


All times are GMT -5. The time now is 06:59 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration