Renew IP from DHCP - Networking

This is a discussion on Renew IP from DHCP - Networking ; 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 ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Renew IP from DHCP

  1. Renew IP from DHCP

    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!

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

  3. Re: Renew IP from DHCP


    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

  4. Re: Renew IP from DHCP

    Henning Hasemann 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/


  5. Re: Renew IP from DHCP

    > 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

  6. Re: Renew IP from DHCP

    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 to Thread