You are not logged in.

#1 2005-10-20 17:16:57

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Problem getting DHCP IP address

At home,  my network is working; I can connect to my ISP  dhcp server to get access to my  DSL internet service.

However, I'm having problem connecting to the University network. I gave my MAC address to the sysadmin and could connect with /etc/rc.d/network start. The next day, it wasn't working.  After some unsuccessful troubleshooting, the sysadmin restarted the dhcp server and I could connect easily. The sysadmin told me that the problem was on my side as other laptops can connect to the network. He also told me that the problem might be a small glitch in my drivers, that they might need to be updated. BTW, I can't connect in Windows XP either.

After trying to connect, I get a

eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
eth0: no IPv6 routers present

message in dmesg. Could that be the problem ? Tonight, I'll check if I get the same message at home.
I'm using the stock kernel. Should I try with 2.6.14-rc... ? Or with a certain patchset? I'm not sure what to do.  I would like to pin-point the problem. Searching forums and googling didn't really help.
My network card is (output of lspci):

Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

and I'm using the 8139too module.

Offline

#2 2005-10-20 17:31:46

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Problem getting DHCP IP address

Ok, when eth0 is connected, check and see if dhcpcd is still running.  If it *is*, then there may be other issues.  However, if it is not, that is where your problem lies.

The rc.d/network script will call "dhcpcd -k" when it shuts down, telling the dhcp server "I'm done with this ip", however, if dhcpcd is not running, the -k call does nothing.

If dhcpcd is *NOT* running, it has to do with infinite lease times - that is, dhcpcd auto-discovers the lease time from the server.  The server must have it set to infinate, so you're going to have to force a lease time.

Try tossing "-l 1800" in /etc/conf.d/dhcpcd (or whatever the actual file is), as that will give you a lease of 30 minutes.  In most situations, you IP will not flip every 30 minutes, it will remain the same, as dhcpcd will just recheck "hey, is this IP still ok for me?"

Offline

#3 2005-10-20 17:58:13

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Problem getting DHCP IP address

eth0: RealTek RTL8139 at 0xe0f30000, 00:0e:2e:33:6f:99, IRQ 17
eth0:  Identified 8139 chip type 'RTL-8100B/8139D'
eth0: link up, 100Mbps, full-duplex, lpa 0x41E1
eth0: no IPv6 routers present

from my dmesg....


Mr Green

Offline

#4 2005-10-21 00:02:32

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Problem getting DHCP IP address

phrakture wrote:

Ok, when eth0 is connected, check and see if dhcpcd is still running.

I'm not sure if I understand this sentence... Anyway, here's some update.  I'm  home where my network works. I have two dhcpd process running:

/usr/sbin/dhcpcd -t 30 -h Erix eth0

I still have the

eth0: link up, 100Mbps, full-duplex, lpa 0x41E1
eth0: no IPv6 routers present

message in dmesg so it's probably not IPv6 related.

Offline

#5 2005-10-21 18:02:34

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Problem getting DHCP IP address

$ ps a | grep dhcp
 1912 pts/5    S+     0:00 dhcpcd -t 30 -h animus -l 3600 wlan0

It should remain running, except in the case of an infinate lease.

Offline

#6 2005-10-25 16:12:52

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Problem getting DHCP IP address

phrakture wrote:

Try tossing "-l 1800" in /etc/conf.d/dhcpcd

I tried that but it still doesn't work at the university. Also, there is no dhcpd running at the university. I assume that it' because the network is not running. I've also tried to start dhcpd manually before doing /etc/rc.d/network start but without success.

Any more ideas?

I might try to compile kernel 2.6.14-rc5 to see if it can solve the problem. :?

Offline

#7 2005-10-25 19:33:33

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Problem getting DHCP IP address

Snowman wrote:
phrakture wrote:

Try tossing "-l 1800" in /etc/conf.d/dhcpcd

I tried that but it still doesn't work at the university. Also, there is no dhcpd running at the university. I assume that it' because the network is not running. I've also tried to start dhcpd manually before doing /etc/rc.d/network start but without success.

Any more ideas?

Yes.

The thing is, my laptop used to do this exact same thing... I'd reboot and couldn't dhcp my wireless connection - I'd restart the router and BAM, it worked.

For the longest time, I thought it was just a shitty connection.

Here's the happenings:
Laptop sends a DHCP request, router assigns the IP, infinite lease time
Laptop shuts down/whatever
Laptop tries DHCP again, router sees that it's already mapped (infinite lease), and does nothing, expecting the laptop to know it already has an IP

It's an issue with infinite leases and crappy routers... you have to get in a cycle of forced timed leases.  add the lease time to your DHCP args (it can't hurt one way or the other), then have the sysadmin restart the dhcp server again.

From there, /etc/rc.d/network start, do your thing, and do not forget to /etc/rc.d/network stop - as it's your laptop controlling the lease time, not the server.

Windows computer don't suffer this problem, because they are not allowed to use infinite leases, they have a max of like 32hours or something goofy.

On routers offering up infinite leases, you need to explicitly release your IP when you're done (dhcpcd -k wlan0) or else it keeps it.

Technically though, I think you could set a static IP to the same IP dhcp gave you, and as long as you setup the routes correctly, it might work....

Offline

Board footer

Powered by FluxBB