LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-20-2005, 08:11 AM   #1
irishbear
LQ Newbie
 
Registered: Dec 2004
Location: Dublin, Ireland
Distribution: SuSE 9.1 Personal
Posts: 4

Rep: Reputation: 0
Question Automatically renewing DHCP addresses?


Hi there,

Where I work, we're starting to investigate using Linux as a desktop platform (at the moment we're testing using Ubuntu), instead of Windows. However, a lot of our users have laptops, and we're having a strange problem with DCHP.

We have our lan split into different subnets; so for example, our finance department might have have IP addresses in the x.x.160.x range, while our IT department might have addresses in the x.x.64.x range, etc..

If a laptop is connected to the network when it boots up, it'll pick up an appropriate address via DHCP just fine. If you pull out the network cable, the machine detects that it's disconnected (verified by the Network Monitor panel applet). However, if we then take that laptop and reconnect it to the network from a connection in a different subnet, while the machine detects that it's reconnected, it doesn't automatically renegotiate a new address via DHCP, and attempts to use the old one.

If we do a manual release/renew using 'sudo ifdown eth0' followed by a 'sudo ifup eth0', then we get a valid new address fine; but the machine won't do this automatically.

I've had a look around via Google, but haven't found anything useful. Is there any way to set this up?

Thanks for your help!


John
 
Old 01-20-2005, 08:30 AM   #2
snecklifter
Member
 
Registered: Mar 2004
Location: UK/West Yorkshire/Huddersfield
Distribution: Fedora 7
Posts: 982

Rep: Reputation: 30
dhclient eth0
should grab an address automatically from your subnet's DHCP server. Thats a one step process. Otherwise you could put that into a shell script if you wanted to clickety-click.
Regards
Chris
 
Old 01-20-2005, 08:33 AM   #3
irishbear
LQ Newbie
 
Registered: Dec 2004
Location: Dublin, Ireland
Distribution: SuSE 9.1 Personal
Posts: 4

Original Poster
Rep: Reputation: 0
Is there any way to get Linux to automate this though? I mean, for example under Windows, if a network connection has been disconnected, and then reconnected, Windows will go and contact the DHCP server to request a new address automatically - the user doesn't have to do anything, and after a few seconds their computer is up and working again, regardless of what subnet they're now connected to.

Is there any way to do that in Linux?

Thanks again!
 
Old 01-20-2005, 01:50 PM   #4
stakhous
Member
 
Registered: May 2003
Location: PA
Posts: 82

Rep: Reputation: 15
Thats odd, I have a dhcp server set up on my RedHat 9 box. It seems to be reassigned IP information whenever its disconncted(same goes for my WinXp computer). Maybe double check your dhcpd.conf file?

my 2 cents
 
Old 01-20-2005, 02:00 PM   #5
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Haven't use this myself ( no laptop ) but have a look at ifplugd
 
Old 01-21-2005, 10:49 AM   #6
irishbear
LQ Newbie
 
Registered: Dec 2004
Location: Dublin, Ireland
Distribution: SuSE 9.1 Personal
Posts: 4

Original Poster
Rep: Reputation: 0
stakhous: Well in our case we're not running DHCP servers directly on the client machines - this problem is definitly something in the local Linux setup on each laptop.

homey: Thanks a million! Just downloaded and installed ifplugd, worked like a charm! If anyone else is having the same problem we are having, I recommend giving ifplugd a go, worked flawlessly here
 
Old 01-21-2005, 11:53 AM   #7
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Quote:
I recommend giving ifplugd a go, worked flawlessly here
Cool Beans!
 
  


Reply



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
Renewing DHCP Lease JimKyle Linux - Networking 10 07-18-2004 06:54 PM
dhcp clients not renewing lease tuxguy Linux - Networking 0 03-21-2004 11:27 AM
DHCP excluding IP addresses AndyJ Linux - Networking 8 03-03-2003 03:09 PM
5 DHCP addresses and 7 machines GAVollink Linux - Networking 2 01-25-2003 04:23 PM
Finding all ip addresses from your dhcp servers J-Stew Linux - Networking 1 08-27-2002 07:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:09 PM.

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