Networking Forums

Networking Forums > Computer Networking > Linux Networking > Renew IP from DHCP

Reply
Thread Tools Display Modes

Renew IP from DHCP

 
 
Hugo
Guest
Posts: n/a

 
      08-28-2007, 03:15 AM
Hi,

how can I renew my IP address of my linux PC from the DHCP server? I know I
can do a ifconfig eth0 down (and up) but that way I don't get any
messages. I have the problem that sometimes my Linux PC doesn't get an IP
from my DHCP server (build in in router). I would like to see some error
message when trying to get the IP. Something like the windows
ipconfig /renew.

Thanks!
 
Reply With Quote
 
 
 
 
Balwinder S Dheeman
Guest
Posts: n/a

 
      08-28-2007, 04:53 AM
On 08/28/2007 08:45 AM, Hugo wrote:
> Hi,
>
> how can I renew my IP address of my linux PC from the DHCP server? I know I
> can do a ifconfig eth0 down (and up) but that way I don't get any
> messages. I have the problem that sometimes my Linux PC doesn't get an IP
> from my DHCP server (build in in router). I would like to see some error
> message when trying to get the IP. Something like the windows
> ipconfig /renew.


Hum, my crystal ball has failed to guess as to what distro are you
using; on Debian/Ubuntu machines all you have to do is append/add the
following lines in /etc/network/interfaces:

auto eth0
iface eth0 dhcp

try 'man interfaces' for further details.

and use 'ifup eth0' or 'ifdown eth0' instead of the ifconfig.

To find/see error messages either use xconsole or search log files in
your /var/log directory; the /var/log/syslog and, or /var/log/messages
are good candidates, all these may contain or not depends on version
your syslog daemon and its configuration.

I have not tested, but almost all the Unix/Linux commands can also be
run in verbose mode; do read the manpage for all those commands which
you want to use and, or master.

PS: I could also have explained, how to do that on a Fedora/Redhat and
Gentoo or even the FreeBSD, but leaving that for you as an exercise

Hints: dhclient and pump

--
Dr Balwinder S "bsd" Dheeman Registered Linux User: #229709
Anu'z Linux@HOME Machines: #168573, 170593, 259192
Chandigarh, UT, 160062, India Gentoo, Fedora, Debian/FreeBSD/XP
Home: http://cto.homelinux.net/~bsd/ Visit: http://counter.li.org/
"If you have time to waste, please waste it somewhere else, not here."
 
Reply With Quote
 
Henning Hasemann
Guest
Posts: n/a

 
      08-28-2007, 05:09 AM

Usually I do (quick & dirty):

* kill any old dhclient for that interface
* run dhclient ethX

I sometimes forgot the kill which didnt seem to have any negative
effects though I wont recommend it here.

Henning

--
GPG Public Key:
http://keyserver.ganneff.de:11371/pk...D6D36D41911851
Fingerprint: 344F 4072 F038 BB9E B35D E6AB DDD6 D36D 4191 1851
 
Reply With Quote
 
Mark Hobley
Guest
Posts: n/a

 
      08-28-2007, 07:08 AM
Henning Hasemann <(E-Mail Removed)> wrote:
> Usually I do (quick & dirty):
>
> * kill any old dhclient for that interface
> * run dhclient ethX


Out of interest can you just:
dhclient -r
dhclient eth0

or is it necessary to kill the client?

Mark.

--
Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE

Email: markhobley at hotpop dot donottypethisbit com

http://markhobley.yi.org/

 
Reply With Quote
 
Henning Hasemann
Guest
Posts: n/a

 
      08-28-2007, 09:37 AM
> Out of interest can you just:
> dhclient -r
> dhclient eth0


I guess so, I didnt know -r nor did I read dhclients manpage up to
now

Henning

--
GPG Public Key:
http://keyserver.ganneff.de:11371/pk...D6D36D41911851
Fingerprint: 344F 4072 F038 BB9E B35D E6AB DDD6 D36D 4191 1851
 
Reply With Quote
 
Balwinder S Dheeman
Guest
Posts: n/a

 
      08-28-2007, 07:59 PM
On 08/28/2007 03:07 PM, Henning Hasemann wrote:
>> Out of interest can you just:
>> dhclient -r
>> dhclient eth0

>
> I guess so, I didnt know -r nor did I read dhclients manpage up to
> now


Do you think, anyone of us contributing something creative by providing
silly answers to a silly question?

IMHO, neither the Usenet is a chat room nor a training session, please,
please don't waste your and, or others time and resources.

Let the OP do his/her homework, the problem in his/her question has
nothing to do with *Linux Networking* and, or COLN.

--
Dr Balwinder S "bsd" Dheeman Registered Linux User: #229709
Anu'z Linux@HOME Machines: #168573, 170593, 259192
Chandigarh, UT, 160062, India Gentoo, Fedora, Debian/FreeBSD/XP
Home: http://cto.homelinux.net/~bsd/ Visit: http://counter.li.org/
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCP requests for renew roshak31 Windows Networking 2 03-10-2008 08:31 AM
DHCP Renew Failing Kevin Windows Networking 2 04-13-2006 09:18 PM
DHCP Renew after VLAN Change MC Windows Networking 6 01-05-2006 06:39 PM
dhcp won't release/renew triwest Windows Networking 2 12-20-2003 05:52 PM
DHCP Lease Renew/Release Stu Windows Networking 3 11-16-2003 05:29 AM



1 2 3 4 5 6 7 8 9 10 11