Results 1 to 4 of 4

Thread: static ip problems: ubuntu reverts back to DHCP on its own

  1. #1
    Join Date
    Aug 2006
    Location
    Charlotte, North Carolina
    Beans
    232
    Distro
    Ubuntu 8.04 Hardy Heron

    static ip problems: ubuntu reverts back to DHCP on its own

    I've faithfully followed the instructions on changing my server to a static IP address here:
    http://www.howtoforge.com/perfect-se...ntu8.04-lts-p3
    and it works fine. I get a static IP and have internet access. I can access the machine remotely. The problem I'm having is that after a certain amount of time (about 20 minutes) the computer changes itself back to DCHP. I can run "sudo /etc/init.d/networking restart" and get the static IP back, but 20 mintues later it changes back to DHCP again. It happens quite consistently -- I've seen it happen three times now. Here is my configuration file: (with my IP address starred out)

    Code:
    david@nighthawk:~$ more /etc/network/interfaces 
    #This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eth0
    iface eth0 inet static
            address ***.***.***.104
            netmask 255.255.255.0
            network ***.***.***.0
            gateway ***.***.***.1
            broadcast ***.***.***.255
    I'm having a problem similar to the one described here:
    http://ubuntuforums.org/showthread.p...s+back+to+DHCP
    Mine is slightly different, though -- his IP changes back to DHCP after he resets the computer; mine goes back to DHCP after about 20 minutes without a reset.

    Any suggestions would be greatly appreciated.
    Last edited by davidshere; May 20th, 2008 at 03:44 PM.

  2. #2
    Join Date
    May 2008
    Location
    Galax, Va
    Beans
    41
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: static ip problems: ubuntu reverts back to DHCP on its own

    I had a similar problem, I could use dhcp and get online/share files just fine, but when I setup my static address I couldn't get online at all (or share files). After several times of going back and fourth trying things it finally started working on it's own for no apparent reason....

  3. #3
    Join Date
    Aug 2006
    Location
    Charlotte, North Carolina
    Beans
    232
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: static ip problems: ubuntu reverts back to DHCP on its own

    I gave it a while to make sure...

    rebooting the machine seems to have solved this problem.

  4. #4
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: static ip problems: ubuntu reverts back to DHCP on its own

    If it hadn't already fixed itself, you could uncomment this section of /etc/dhcp3/dhclient.conf and embed your information:
    Code:
    #alias {
    #  interface "eth0";
    #  fixed-address 192.5.5.213;
    #  option subnet-mask 255.255.255.255;
    #}
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

Bookmarks

Posting Permissions

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