Re: Renew IP from DHCP



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."
.



Relevant Pages

  • Re: eth0 failure
    ... be that it screws up the DHCP server in the combined hub/ ADSL router. ... Where is the DHCP conf file on Linux? ... As far as I am aware, am not using dynamic ranges or host identifiers ... but it just wont see eth0 ...
    (comp.os.linux.networking)
  • DHCP client question
    ... so computers the only other Linux boxes are our FTP server (running Debian) ... The problem is that whenever the DHCP server goes does for whatever reason ... eth0 on my Linux workstation loses it's IP address. ...
    (comp.os.linux.networking)
  • Wireless card looses conection and locks up. Help!
    ... I have been having trouble with a Netgear wireless card ... The eth0 inerface now claims that it's busy and only a hard ... Sep 4 10:27:11 linux su: pam_unix2: session started for user root, ... Shutting down network interfaces: ...
    (comp.os.linux.networking)
  • Re: [SLE] SuSE cant chew gum & walk
    ... dev ppp0 proto kernel scope link src 204.250.144.59 ... I set the eth0 IP address to 192.168.0.10 ... dev ppp0 proto kernel scope link src 204.250.144.5 ...
    (SuSE)
  • Re: Ethernet order
    ... > I added this Linux box on the network to play with and wanted it to ... connect to the internet via that Westell device, ... The last route, with some sort of "catch all" destination 0.0.0.0, is ... Your ISP's router would go via eth0 to that device. ...
    (comp.os.linux.networking)