Find the answer to your Linux question:
Results 1 to 6 of 6
Hello everyone, I often switch my machine's connection between two seperate networks for various reasons I won't go into, but I was wondering if there's a way to explicitly request ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942

    Explicit DHCP request


    Hello everyone,

    I often switch my machine's connection between two seperate networks for various reasons I won't go into, but I was wondering if there's a way to explicitly request an IP address from a DHCP server without rebooting.

    Thanks in advance!

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,906
    You can just start your networking again, depending on distro try:

    service network restart

    or

    /etc/init.d/network restart

    do either as root.
    Linux user #126863 - see http://linuxcounter.net/

  3. #3
    Linux Engineer
    Join Date
    Mar 2005
    Posts
    1,431
    Or, if you use BSD style init:
    /etc/rc.d/network restart

    or

    /etc/rc.d/dhclient restart

    ...or something similar

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Belgium
    Posts
    1,429
    Slackware: # dhcpcd -kn
    ** Registered Linux User # 393717 and proud of it ** Check out www.zenwalk.org
    ** Zenwalk 2.8 - Xfce 4.4 beta 2- 2.6.17.6 kernel = Slack on steroids! **

  6. #5
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942
    I must have screwed something up pretty bad...now I can't do any networking at all, and even if I reboot, eth0 is still down on startup...What did I do?

    Thanks in advance for the help.

  7. #6
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Belgium
    Posts
    1,429
    # ifconfig eth0 up
    #dhcpcd
    # dhcpcd -n
    # ifconfig eth0
    ** Registered Linux User # 393717 and proud of it ** Check out www.zenwalk.org
    ** Zenwalk 2.8 - Xfce 4.4 beta 2- 2.6.17.6 kernel = Slack on steroids! **

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •