Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 09-21-2003, 03:45 AM   #1
LQ Newbie
Registered: Sep 2003
Posts: 2

Rep: Reputation: 0
DHCP: 1 hostname, 2 IP addresses, only 1 is reachable?

I recently set up an ADSL connection on my Debian Woody machine. I obtain an IP address via DHCP. This all appears to work fine - I can ping everywhere, receive email, and so forth. While playing around with setting up Apache, I noticed that my IP address as obtained by DHCP doesn't appear to match my hostname when I look it up with the host command. Moreover, I can ping my machine with one of my IP addresses, but not the 2nd or the hostname (which resolves to the 2nd address). The details:

> cat /etc/network/interfaces
# Loopback interface - always
auto lo
iface lo inet loopback

# use dhcp:
auto eth0
iface eth0 inet dhcp


> ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:DA:05:B2:C3
inet addr: Bcast: Mask:
RX packets:34090 errors:0 dropped:0 overruns:0 frame:0
TX packets:25548 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:34243659 (32.6 MiB) TX bytes:2991102 (2.8 MiB)
Interrupt:11 Base address:0x6500

lo Link encap:Local Loopback
inet addr: Mask:
RX packets:2353 errors:0 dropped:0 overruns:0 frame:0
TX packets:2353 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:783598 (765.2 KiB) TX bytes:783598 (765.2 KiB)


> iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination


> host domain name pointer

> host has address

[note that the hostname doesn't resolve to the same IP]

> ping
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=255 time=0.3 ms
64 bytes from icmp_seq=1 ttl=255 time=0.1 ms

> ping
PING ( 56 data bytes
[no further output]

> ping
PING ( 56 data bytes
[no further output]

A friend elsewhere on the internet has the same results - she can ping the first IP, but the 2nd and the hostname are unreachable.

Soo.... what's going on here?
Old 09-21-2003, 07:06 AM   #2
Senior Member
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
The record came from your ISP registering the ip space so that mail servers can reverse lookup your ip number and validate your location.

The second record came from the dns servers of your ISP, which look to advertise a different name series...

It is quite common to have a domain name showing a different ip number (hopefully the correct one) from the reverse lookups in ARPA.
The ARPA records would show who the numbers are registered to and the dns would show who the names are registered to.

Last edited by peter_robb; 09-21-2003 at 07:09 AM.
Old 09-21-2003, 09:46 PM   #3
LQ Newbie
Registered: Sep 2003
Posts: 2

Original Poster
Rep: Reputation: 0
Guess I have some more reading to do. Thanks for the pointers.


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
Automatically renewing DHCP addresses? irishbear Linux - Networking 6 01-21-2005 12:53 PM
Multiple addresses on one NIC via DHCP - possible? babzog Linux - Networking 0 03-25-2004 11:43 AM
DHCP excluding IP addresses AndyJ Linux - Networking 8 03-03-2003 04:09 PM
5 DHCP addresses and 7 machines GAVollink Linux - Networking 2 01-25-2003 05:23 PM
Finding all ip addresses from your dhcp servers J-Stew Linux - Networking 1 08-27-2002 08:19 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:13 AM.

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