LinuxQuestions.org
Visit Jeremy's Blog.
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 11-09-2004, 08:49 PM   #1
pbr
LQ Newbie
 
Registered: Nov 2004
Posts: 2

Rep: Reputation: 0
How to get new ip address w/dhclient


Every once in a while my cable/modem drops the internet connection and assigns me a new IP Address when it connects again.

I can't get back internet service on the linux box unless I force an ip address update.

When I lose the connection does linux notice? Will it try to keep using the old IP Address as long as it thinks the lease is good?

Is there some way to configure dhclient to get a new address automatically without me?

Thanks.

pbr
 
Old 11-09-2004, 09:40 PM   #2
ranger_nemo
Senior Member
 
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
Have you tried "ifdown eth0 && ifup eth0" ? When it brings it back up, it should try to get a valid IP from the DHCP server.

I have a similar problem, on a ClarkConnect box routing my home network. If the cable cuts out for awhile, the box automatically assigns eth0 a 192.168.x.y IP. When the cable comes back up, it resets to a real IP, but iptables is borked. I read somewhere that a "service firewall restart" clears it up, but haven't had the chance to test it, yet.
 
Old 11-10-2004, 02:36 PM   #3
pbr
LQ Newbie
 
Registered: Nov 2004
Posts: 2

Original Poster
Rep: Reputation: 0
I can get things working in several ways, just that I need it to update things when I'm not at the computer. I host several websites on my linux machine and they stop working until I do the update.

-pbr
 
  


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
how to request a specific ip address with dhclient hypexr Linux - Networking 4 09-15-2005 10:07 PM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM
dhclient ip address disagrees length shpung Linux - Wireless Networking 2 02-27-2005 12:12 PM
Can't receive Dynamic IP address in FC2 with dhclient neolith_god Fedora 1 05-31-2004 09:17 PM
dhclient not getting an address ToTLaugher Linux - Networking 6 11-09-2003 05:03 AM

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

All times are GMT -5. The time now is 03:25 AM.

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