Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unable to find IP address / host name lookup failure with DHCP (dhclient)

806 views
Skip to first unread message

Jeroen Van Goey

unread,
Mar 30, 2004, 1:24:45 PM3/30/04
to
I'm unable to make contact with the internet. I get an "Unable to find
IP
address for server name "localhost.localdomain" - Host name lookup
failure" error message. The step-by-step procedure I've followed so
far.

I have a Fast Ethernet 10/100M PCI network card from Genius on a linux
PC running Fedora core 1, kernel 2.4.22-1.2115.nptl and GNOME. My
system recognizes the networkcard, because at bootup, I see (using the
command "dmesg | grep eth0"):
eth0: RealTek RTL8139 Fast Ethernet at 0xc48bd000, 00:40:f4:6f:b4:90,
IRQ 11
eth0: Identified 8139 chip type 'RTL-8100B/8139D'
divert: freeing divert_blk for eth0
divert: allocating divert_blk for eth0
eth0: RealTek RTL8139 Fast Ethernet at 0xc48d6000, 00:40:f4:6f:b4:90,
IRQ 11
eth0: Identified 8139 chip type 'RTL-8100B/8139D'
eth0: link up, 10Mbps, half-duplex, lpa 0x0000

The output of "cat /proc/ioports" is:
0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0070-007f : rtc
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
01f0-01f7 : ide0
0213-0213 : isapnp read
02f8-02ff : serial(auto)
0378-037a : parport0
037b-037f : parport0
03c0-03df : vga+
03f6-03f6 : ide0
03f8-03ff : serial(auto)
0a79-0a79 : isapnp write
0cf8-0cff : PCI conf1
4000-403f : Intel Corp. 82371AB/EB/MB PIIX4 ACPI
5000-501f : Intel Corp. 82371AB/EB/MB PIIX4 ACPI
d000-dfff : PCI Bus #01
e000-e01f : Intel Corp. 82371AB/EB/MB PIIX4 USB
e000-e01f : usb-uhci
e400-e4ff : Realtek Semiconductor Co., Ltd.
RTL-8139/8139C/8139C+ <-----
e400-e4ff : 8139too <-----
f000-f00f : Intel Corp. 82371AB/EB/MB PIIX4 IDE
f000-f007 : ide0


So I presumed the driver is 8139too, which I loaded -I think-
succesfully (using "modprobe 8139too io=0e400 irq=11"), because
"lsmod" gives me:
Module Size Used by Not tainted
soundcore 6468 0 (autoclean)
ide-cd 35776 0 (autoclean)
cdrom 33728 0 (autoclean) [ide-cd]
parport_pc 19076 1 (autoclean)
lp 9060 0 (autoclean)
parport 37056 1 (autoclean) [parport_pc lp]
autofs 13364 0 (autoclean) (unused)
8139too 16808 1 <---------
mii 3992 0 [8139too] <---------
ipt_REJECT 4344 1 (autoclean)
ipt_state 1080 5 (autoclean)
ip_conntrack 29256 1 (autoclean) [ipt_state]
iptable_filter 2444 1 (autoclean)
ip_tables 15776 3 [ipt_REJECT ipt_state
iptable_filter]
floppy 58012 0 (autoclean)
sg 36492 0 (autoclean) (unused)
scsi_mod 108168 1 (autoclean) [sg]
microcode 4700 0 (autoclean)
keybdev 2976 0 (unused)
hid 24708 0 (unused)
usb-uhci 26380 0 (unused)
usbcore 79168 1 [hid usb-uhci]
mousedev 5556 1 (autoclean)
input 5888 0 (autoclean) [keybdev hid mousedev]
ext3 71300 2
jbd 52084 2 [ext3]

I adapted /etc/modules.conf to:
alias usb-controller usb-uhci
alias eth0 8139too
options 8139too io=0e400 irq=11

I'm not sure if that was entirely correct. Are 2 aliasses allowed? Is
my choice for IRQ=11 correct? On "cat /proc/interrupts" both my
ethernetcard and my USB are listed on 11, both won't this give any
confusion?
CPU0
0: 748046 XT-PIC timer
1: 10625 XT-PIC keyboard
2: 0 XT-PIC cascade
8: 1 XT-PIC rtc
11: 81790 XT-PIC usb-uhci, eth0 <---------
12: 60518 XT-PIC PS/2 Mouse
14: 154475 XT-PIC ide0
NMI: 0
ERR: 0


Ik heb dan /etc/modules.conf aangepast tot:
alias usb-controller usb-uhci
alias eth0 8139too
options 8139too io=0e400 irq=11

I then went on to configure my network with the command
"redhat-config-network", which gives a GUI. In the tab "Devices" I
selected "New" > Ethernet connection > RTL-8139/8139C/8139C+ (eth0) >
automatically obtain IP adress settings with DHCP. When I then save
and select my eth0, there is the error message "checking for IP
information for eth0... Failed"

If I start DHCP Client manually (command "dhclient"), I get the
(error)message:
Listening on LPF/eth0/00:40:f4:6f:b4:90
Sending on LPF/eth0/00:40:f4:6f:b4:90
Listening on LPF/lo/
Sending on LPF/lo/
Sending on Socket/fallback
DHCPDISCOVER on lo to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on lo to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on lo to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 16
DHCPDISCOVER on lo to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on lo to 255.255.255.255 port 67 interval 21
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on lo to 255.255.255.255 port 67 interval 1
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

In /var/log/cups/error_log.1 I find this line:
E [27/Mar/2004:00:21:53 -0500] StartListening: Unable to find IP
address for server name "localhost.localdomain" - Host name lookup
failure

Where did I go wrong, or what did I forget?
Thanks for the help.

Jan Geertsma

unread,
Mar 30, 2004, 3:56:07 PM3/30/04
to
wow lot's of input, that's good ...

* I guess that 0e400 for io-port should strictly be 0xe400, the 0x denoting
hexadecimal numbers
* The driver will find the io and the irq's themselves (especially PCI
devices) so don't specify them
* sharing irq's is ok as long as the irq is not reserved in the bios (or set
to isa)
* use "ifconfig" and "ifconfig -a" to see the current status and the status
of all the devices.
* personally I use netconf to set my network. only filling in dhcp eth0 and
8139too but you can also use the alternative driver.
* "ifup eth0" brings up the networkcard via nice scripts, which will also
call the dhcp client of your choice, "ifdown eth0" does the oposite.
* optionally, put localhost.localdomain with ip-address 127.0.0.1 in the
/etc/hosts file to get rid of the localhost warning...
* if this all fails start looking at the dchp server ... does it need extra
parameters, does it expect a certain mac-address from your network card. and
is your broadcasts working (which you can check with tcpdump)

here are my relevant settings to show you a working 8139too

[jan@eliro /]$ cat /etc/modules.conf
alias eth1 8139too

[jan@eliro /]$ cat /proc/pci
Bus 1, device 9, function 0:
Ethernet controller: Accton Technology Corporation SMC2-1211TX (rev 16).
IRQ 9.
Master Capable. Latency=64. Min Gnt=32.Max Lat=64.
I/O at 0x3000 [0x30ff].
Non-prefetchable 32 bit memory at 0xf4101400 [0xf41014ff].
(and sharing irq 9 with the usbport)

[jan@eliro /]$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:02:B3:66:7D
inet addr:129.186.0.42 Bcast:129.186.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:220970 errors:0 dropped:0 overruns:0 frame:0
TX packets:356440 errors:0 dropped:0 overruns:3 carrier:0
collisions:120934 txqueuelen:100
RX bytes:17077270 (16.2 Mb) TX bytes:505910976 (482.4 Mb)
Interrupt:9 Base address:0x4400

goodluck, Jan

"Jeroen Van Goey" <peak_...@yahoo.com> wrote in message
news:c8619276.04033...@posting.google.com...

Jeroen Van Goey

unread,
Mar 30, 2004, 6:18:45 PM3/30/04
to
> * use "ifconfig" and "ifconfig -a" to see the current status and the
status
> of all the devices.
This is my output. If I compare it to yours, I see missing IPs for inet
addr, Bcast and Mask.
eth0 Link encap:Ethernet HWaddr 00:40:F4:6F:B4:90

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:236210 errors:0 dropped:0 overruns:0 frame:0
TX packets:845 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14275029 (13.6 Mb) TX bytes:288990 (282.2 Kb)
Interrupt:11 Base address:0x6000

lo Link encap:Local Loopback
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:5939 errors:0 dropped:0 overruns:0 frame:0
TX packets:5939 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5271644 (5.0 Mb) TX bytes:5271644 (5.0 Mb)

> * "ifup eth0" brings up the networkcard via nice scripts,

Gave the same error as before. BTW, I use a dutch interface, so I roughly
translated my error message into "Checking for IP information for eth0...
Failed", but the actual errormessage that is shown in english is
"Determining IP information for eth0.... Failed" (should help those who are
googling for this phrase).

> * if this all fails start looking at the dchp server ... does it need
extra
> parameters, does it expect a certain mac-address from your network card.
and
> is your broadcasts working (which you can check with tcpdump)

I don't understand much of this, but on
http://users.pandora.be/bdr/DHCP/dhcp.html the command "tcpdump -n -i
eth0 -l -s 500 -x udp port 67 or port 68 | tee dhcp_dump" was recommended.
That gave me some output like this:

22:49:31.034343 0.0.0.0.bootpc > 255.255.255.255.bootps: xid:0x9c874c12
vend-rfc1048 DHCP:DISCOVER PR:SM+BR+TZ+DG+DN+NS+HN+YD+YS+NTP [tos 0x10]
4510 0148 0000 0000 1011 a996 0000 0000
ffff ffff 0044 0043 0134 f4bf 0101 0600
9c87 4c12 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0040 f46f b490 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 6382 5363 3501 0137
0a01 1c02 030f 060c 2829 2aff 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000

I can't get much out of this, but sometimes I recognized something, like in:

52:21.988678 81.83.160.1.bootps > 255.255.255.255.bootpc: xid:0x3abb2391
flags:0x8000 Y:81.83.160.26 G:81.83.160.1 ether 0:0:39:bb:23:91 vend-rfc1048
DHCP:OFFER SID:195.130.132.97 LT:7200 SM:255.255.240.0
NS:195.130.131.4,195.130.130.4 DN:"pandora.be" RSZ:576 TTL:64
BR:255.255.255.255 RN:3600 RB:3601 HN:"toshiba" DG:81.83.160.1
4500 0160 f72c 0000 ff11 d20b 5153 a001
Where "pandora.be" is the name of the ISP which provides me with dynamic
IPs.

Some more info that I was able to squeeze out of my machine:
The contents of my /etc/sysconfig/networking/devices/ifcfg-eth0 file:
USERCTL=yes
PEERDNS=yes
TYPE=Ethernet
DEVICE=eth0
HWADDR=00:40:f4:6f:b4:90
BOOTPROTO=dhcp

The following came from a log file. A lot of things are not yet filled in.
Should I change and add them in in ifcfg-eth0 manually, or should dhclient
(or some other program) do that for me?
Mon Mar 29 10:10:31 2004: -+ //etc/sysconfig/networking/devices/ifcfg-eth0
NETMASK=''
DOMAIN=''
BOOTPROTO='dhcp'
HWADDR='00:40:f4:6f:b4:90'
DEVICE='eth0'
IPADDR=''
DHCP_HOSTNAME=''
TYPE='Ethernet'
GATEWAY=''
PEERDNS='yes'
USERCTL='no'
ONBOOT='yes'
NETWORK
BROADCAST
DOMAIN
DHCP_HOSTNAME
IPADDR
NETMASK
GATEWAY

>* personally I use netconf to set my network.

This command was not on my computer, but I will try to find it online, and
compile it on my computer. Thanks for the help, and any other pointers in
the good direction are appreciated.
Jeroen

Jan Geertsma

unread,
Mar 31, 2004, 1:51:26 PM3/31/04
to
Things that I see from your info:

* your io-address is 0x6000 and not 0xe400....
* your interfacecard actually has lots of traffic while it was up. (13Mb
received ???)
* you actually get an dhcp-offer by the looks of your tcpdump trace. so the
response looks ok
* are you sure that you don't have a very strict firewall setup (iptables or
something like that) that also blocks incoming dhcp offers.
* netconfig is part of linuxconf, which is a nice tool, but there should be
other nice gui's as well (setup?)

goodluck. Jan

"Jeroen Van Goey" <peak_...@yahoo.com> wrote in message
news:c8619276.04033...@posting.google.com...

Jeroen Van Goey

unread,
Apr 1, 2004, 5:45:49 AM4/1/04
to
"Jan Geertsma" <j...@islief.com> wrote in message news:<c4f3v8$7o7$1@phys-

> * your io-address is 0x6000 and not 0xe400....

I deleted "options 8139too io=0xe400 irq=11" completley, because my
PCI card should be able to detetect that herself. My etc/modules.conf
file looks as follows:


alias usb-controller usb-uhci
alias eth0 8139too

/etc/hosts is:
127.0.0.1 localhost.localdomain localhost

> * are you sure that you don't have a very strict firewall setup (iptables or
> something like that) that also blocks incoming dhcp offers.

I was also beginning to think that it maybe could be a firewall issue.
The output from "iptables -L -n -v" is:
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source
destination
2728 303K RH-Firewall-1-INPUT all -- * * 0.0.0.0/0
0.0.0.0/0

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source
destination
0 0 RH-Firewall-1-INPUT all -- * * 0.0.0.0/0
0.0.0.0/0

Chain OUTPUT (policy ACCEPT 277 packets, 55759 bytes)
pkts bytes target prot opt in out source
destination

Chain RH-Firewall-1-INPUT (2 references)
pkts bytes target prot opt in out source
destination
277 55759 ACCEPT all -- lo * 0.0.0.0/0
0.0.0.0/0
0 0 ACCEPT icmp -- * * 0.0.0.0/0
0.0.0.0/0
icmp type 255
0 0 ACCEPT esp -- * * 0.0.0.0/0
0.0.0.0/0
0 0 ACCEPT ah -- * * 0.0.0.0/0
0.0.0.0/0
0 0 ACCEPT all -- * * 0.0.0.0/0
0.0.0.0/0
state RELATED,ESTABLISHED
0 0 ACCEPT tcp -- * * 0.0.0.0/0
0.0.0.0/0
state NEW tcp dpt:25
0 0 ACCEPT tcp -- * * 0.0.0.0/0
0.0.0.0/0
state NEW tcp dpt:80
0 0 ACCEPT tcp -- * * 0.0.0.0/0
0.0.0.0/0
state NEW tcp dpt:21
0 0 ACCEPT tcp -- * * 0.0.0.0/0
0.0.0.0/0
state NEW tcp dpt:22
2451 247K REJECT all -- * * 0.0.0.0/0
0.0.0.0/0
reject-with icmp-host-prohibited

And the output of "route -n" is:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref
Use Iface
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0
0 lo
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0
0 lo

Are there any other commands that you need to determine if it's a
firewall issue? I will be happy to post them.

I'm not sure it's relevant, but when the fibrecable from the ISP comes
into my house, it goes to a switch> From there one cable goes to a
Windows PC, and one to an ex-Windows-now-Limux PC (mine, the one with
troubles):

printer
/
pc1 (windows)
\
\
Switch/hub--------cablemodem-----fibrecable-------myISP---------Internet
/
/
pc2 (Linux)

I mention this, because another tought was that I should search the
solution into masquarading, gateways, etc.

> * your interfacecard actually has lots of traffic while it was up. (13Mb
> received ???)
> * you actually get an dhcp-offer by the looks of your tcpdump trace. so the
> response looks ok

Ah, soma good news as well. The light at the end of the tunnel is in
sight. (Just hoping itæ„€ not another freight train comming my
direction ;)

Thanks for the support, looking forward to the feedback.
Jeroen

Christoph Scheurer

unread,
Apr 4, 2004, 4:55:36 PM4/4/04
to
On 1 Apr 2004 02:45:49 -0800

Open up the UDP Port 68 for the DHCP Replies


> Are there any other commands that you need to determine if it's a
> firewall issue? I will be happy to post them.
>
> I'm not sure it's relevant, but when the fibrecable from the ISP comes
> into my house, it goes to a switch> From there one cable goes to a
> Windows PC, and one to an ex-Windows-now-Limux PC (mine, the one with
> troubles):
>
> printer
> /
> pc1 (windows)
> \
> \
> Switch/hub--------cablemodem-----fibrecable-------myISP---------Internet
> /
> /
> pc2 (Linux)
>
> I mention this, because another tought was that I should search the
> solution into masquarading, gateways, etc.
>

Do you get more than 1 dynamic IP from your ISP? Else you need to setup a Router with NAT enabled
and hook up your Clients behind it.

Greets

Chris Scheurer

0 new messages