Discussion:
Can't get DHCP IP, may be avahi related
J. Pablo Fernández
2007-06-26 17:50:58 UTC
Permalink
Hello Kubuntuers,
I am experiencing strange problems. I have two notebooks running Kubuntu which
have problems getting an IP by DHCP. I've experienced the same issues in
three different networks, two wlans and one corporate lan with hundreds of
other computers just working (some Windows, some Mac OS X and some Linux).
Basically the sympthon is that I don't get any IP address. eth0 has no IP(v4)
address and there's an eth0:avahi (virtual?) device with a private IP. Now,
with enoughs restarts and ifdown ifups I get an IP. I can be 100% sure but it
seems that whenever I get an IP the eth0:avahi interfare is not present... I
am starting to be suspicious of this avahi thing.
At the corporate network, when I finally get an IP address, it still doesn't
work. Now the sympthon is that I can ping the nameservers but they don't
reply to any DNS query. Fair enough, let's see what's going on... a tcpdump
doesn't show anything... and I am not talking about DNS, not even the pings
are shown, and when I cancel it (^C) I get this:
$ tcpdump
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
18:29:54.910460 arp who-has 172.26.128.68 tell 169.254.9.96

1 packets captured
495 packets received by filter
148 packets dropped by kernel

Why are there packets dropped? I don't have any firewall in place, my iptables
are empty.
If I keep ifdowning/ifuping, eventually it works, but it takes a lot of tries.

Furthermore, my routing table seems to have some remains of this avahi thing:
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.28.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
0.0.0.0 172.28.3.254 0.0.0.0 UG 0 0 0 eth0

but I don't have the avahi thing anymore so I don't have any IPs in the 169...
network:

1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
inet 172.28.3.205/24 brd 172.28.3.255 scope global eth0

Isn't it invalid to have such a route? I've tried deleting it, maybe I've got
the syntax wrong, but I couldn't do it:

pupeno at silver:~$ sudo route del 169.254.0.0
SIOCDELRT: No such process

Any ideas what's going on and/or how to fix it? Anyone experiencing something
similar?

Thank you
--
J. Pablo Fern?ndez <pupeno at pupeno.com> (http://pupeno.com)
Terence Simpson
2007-06-26 23:34:29 UTC
Permalink
Post by J. Pablo Fernández
Hello Kubuntuers,
I am experiencing strange problems. I have two notebooks running Kubuntu which
have problems getting an IP by DHCP. I've experienced the same issues in
three different networks, two wlans and one corporate lan with hundreds of
other computers just working (some Windows, some Mac OS X and some Linux).
Basically the sympthon is that I don't get any IP address. eth0 has no IP(v4)
address and there's an eth0:avahi (virtual?) device with a private IP. Now,
with enoughs restarts and ifdown ifups I get an IP. I can be 100% sure but it
seems that whenever I get an IP the eth0:avahi interfare is not present... I
am starting to be suspicious of this avahi thing.
At the corporate network, when I finally get an IP address, it still doesn't
work. Now the sympthon is that I can ping the nameservers but they don't
reply to any DNS query. Fair enough, let's see what's going on... a tcpdump
doesn't show anything... and I am not talking about DNS, not even the pings
$ tcpdump
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
18:29:54.910460 arp who-has 172.26.128.68 tell 169.254.9.96
1 packets captured
495 packets received by filter
148 packets dropped by kernel
Why are there packets dropped? I don't have any firewall in place, my iptables
are empty.
If I keep ifdowning/ifuping, eventually it works, but it takes a lot of tries.
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.28.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
0.0.0.0 172.28.3.254 0.0.0.0 UG 0 0 0 eth0
but I don't have the avahi thing anymore so I don't have any IPs in the 169...
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
inet 172.28.3.205/24 brd 172.28.3.255 scope global eth0
Isn't it invalid to have such a route? I've tried deleting it, maybe I've got
No, that's the avahi route.
Post by J. Pablo Fernández
pupeno at silver:~$ sudo route del 169.254.0.0
SIOCDELRT: No such process
Any ideas what's going on and/or how to fix it? Anyone experiencing something
similar?
Thank you
It's unlikely that avahi would stop you getting an IP address, you only
get an avahi address when you don't get a DHCP/static IP address. Avahi
won't do anything if you can get a normal IP address.

Terence
J. Pablo Fernández
2007-06-28 20:35:08 UTC
Permalink
Post by Terence Simpson
Post by J. Pablo Fernández
Furthermore, my routing table seems to have some remains of this avahi
thing: $ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface 172.28.3.0 0.0.0.0 255.255.255.0 U 0 0
0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0
0 eth0 0.0.0.0 172.28.3.254 0.0.0.0 UG 0
0 0 eth0
but I don't have the avahi thing anymore so I don't have any IPs in the
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen
1000 inet 172.28.3.205/24 brd 172.28.3.255 scope global eth0
Isn't it invalid to have such a route? I've tried deleting it, maybe I've
No, that's the avahi route.
I know it is an avahi route, but as far as I know, to have a route you have to
have an IP for that route, and I have the avahi route without any avahi IP.
Post by Terence Simpson
Post by J. Pablo Fernández
pupeno at silver:~$ sudo route del 169.254.0.0
SIOCDELRT: No such process
Any ideas what's going on and/or how to fix it? Anyone experiencing
something similar?
Thank you
It's unlikely that avahi would stop you getting an IP address, you only
get an avahi address when you don't get a DHCP/static IP address. Avahi
won't do anything if you can get a normal IP address.
Ok, then it's not avahi, it is something else and avahi running is just part
of the sympthon.
--
J. Pablo Fern?ndez <pupeno at pupeno.com> (http://pupeno.com)
Michel D'HOOGE
2007-06-27 11:24:32 UTC
Permalink
Post by J. Pablo Fernández
whenever I get an IP the eth0:avahi interfare is not present
I'd say it is normal. That interface is only created to provide minimalistic
connectivity. As soon as you have a "real" IP address, avahi auto-ip is no
longer needed.

You can also have a look at
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/40125

Cheers
--
Michel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/kubuntu-users/attachments/20070627/29217ffc/attachment.pgp
J. Pablo Fernández
2007-06-28 20:42:17 UTC
Permalink
Post by Michel D'HOOGE
Post by J. Pablo Fernández
whenever I get an IP the eth0:avahi interfare is not present
I'd say it is normal. That interface is only created to provide
minimalistic connectivity. As soon as you have a "real" IP address, avahi
auto-ip is no longer needed.
Ok, so it is normal to have the avahi device... but I'd say it is not normal
to have it so hard to get a DHCP address.
Post by Michel D'HOOGE
You can also have a look at
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/40125
That's not my bug... actually, once I have the IP, I keep hibernating and
resuming because it goes on successfully getting an IP address. As soon as I
reboot I'll spend the next two hours trying to get an IP.
--
J. Pablo Fern?ndez <pupeno at pupeno.com> (http://pupeno.com)
Michel D'HOOGE
2007-06-29 15:57:35 UTC
Permalink
Post by J. Pablo Fernández
once I have the IP, I keep hibernating and
resuming because it goes on successfully getting an IP address. As soon as
I reboot I'll spend the next two hours trying to get an IP.
Did you try?
- killing avahi
sudo /etc/init.d/avahi-daemon stop
- killing network manager
sudo killall NetworkManager
- shutting down the interface
sudo ifdown eth0; sleep 5; sudo ifup eth0
- starting a new DHCP request
sudo killall dhclient3; sudo dhclient eth0

Alone, or all together ?
--
Michel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/kubuntu-users/attachments/20070629/ac3e5a9c/attachment.pgp
J. Pablo Fernández
2007-06-30 10:07:44 UTC
Permalink
Post by Michel D'HOOGE
Post by J. Pablo Fernández
once I have the IP, I keep hibernating and
resuming because it goes on successfully getting an IP address. As soon
as I reboot I'll spend the next two hours trying to get an IP.
Did you try?
- killing avahi
sudo /etc/init.d/avahi-daemon stop
Yes.
Post by Michel D'HOOGE
- killing network manager
sudo killall NetworkManager
No.
Post by Michel D'HOOGE
- shutting down the interface
sudo ifdown eth0; sleep 5; sudo ifup eth0
Yes.
Post by Michel D'HOOGE
- starting a new DHCP request
sudo killall dhclient3; sudo dhclient eth0
No.

I am going to try the things I haven't tried.
--
J. Pablo Fern?ndez <pupeno at pupeno.com> (http://pupeno.com)
Earl Violet
2007-06-30 06:41:26 UTC
Permalink
Post by Michel D'HOOGE
Post by J. Pablo Fernández
once I have the IP, I keep hibernating and
resuming because it goes on successfully getting an IP address.
As soon as
Post by J. Pablo Fernández
I reboot I'll spend the next two hours trying to get an IP.
some of this is beyond my understanding. However, did you try the
live CD to see if that will work? That might give some clues.

Earl


URL http://deserthowler.cjb.net
Instant messenger: earlcoyote
ICQ:64033496



____________________________________________________________________________________
Don't get soaked. Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather
Loading...