Re: dhclient & switching networks
Derek Broughton <firstname.lastname@example.org> writes:
> When I connect to my network at home through the lan (wired) connection of a
> Linksys WRT54G router, I get an address in the 192.168.1.* range, assigned
> by the DHCP server in the router. Next morning when I connect at work,
> dhclient immediately gives me the same IP.
> Sep 8 08:44:18 othello dhclient: DHCPDISCOVER on eth0 to 255.255.255.255
> port 67 interval 4
> Sep 8 08:44:18 othello dhclient: DHCPOFFER from 192.168.1.1
> Sep 8 08:44:18 othello dhclient: DHCPREQUEST on eth0 to 255.255.255.255
> port 67
> Sep 8 08:44:18 othello dhclient: DHCPACK from 192.168.1.1
This is the report from the connection at your work place?
> My questions are:
> Am I right that there is really a server on 192.168.1.1 (I can't ping it)?
> How could I find out?
Get a normal address and then:
ifconfig eth0:1 192.168.1.107 netmask 255.255.255.0
> Or is it simply reusing the lease without really calling the DHCP server -
> if so, why would it _say_ it sent the DHCPDISCOVER? (this just doesn't
> seem at all likely to me).
It does appear that something funny is going on.
> How can I prevent getting assigned the 192.168.1.* address at work (I'm
> currently using dhcp3-client, ifupdown, ifplugd & whereami). The really
> simple solution is to delete the lease file before booting, but it seems so
> inelegant! (Not to mention that it loses the whole point of having a lease
> One final question, why wasn't there a lease from 142.2.*.* (there's at
> least two different DHCP servers there) in my lease file already, from
> yesterday? They give lease times of one month. Am I just using the wrong
> DHCP client (so many choices, so little time :-))
Make sure you have dhcp3-client, I had lots of funny problems till I
switched to that version.