Debian: Odd IP address problem

Discussion in 'Installation/Configuration' started by KenKnight, Oct 15, 2006.

  1. KenKnight

    KenKnight Member

    Hi all,

    How bout this for strange. I am rebuildling one of my servers from scratch and I put the following into the interfaces file;

    ===========================
    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    auto eth0
    iface eth0 inet static
    address 192.168.10.11
    netmask 255.255.255.0
    network 192.168.10.0
    broadcast 192.168.10.255
    gateway 192.168.10.1
    mtu 1450


    =============================

    Then I issue a networking restart. This lasts about 10 mins and then the interface reverts back to a DHCP address.

    Anybody have any suggestions?

    ************EDIT************

    Not sure what was causing it, but it has stopped. Amazingly it did it about 10 or 12 times.
    Thanks,
    Ken
     
    Last edited: Oct 16, 2006
  2. dave_n_finch

    dave_n_finch New Member

    Same Problem

    I am having the same problem. the only difference is that i am using ubuntu 6.06 ITS.

    Anybody got any ideas??

    Thanks
     
  3. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/network/interfaces? What's the output of
    Code:
    ifconfig
    ?
     
  4. dave_n_finch

    dave_n_finch New Member

    Hi Falko,

    Thanks for the reply. The problem has gone away - a simple reboot seems to have sorted it!

    /etc/network/interfaces is set to use a static address and ifconfig was showing the address from the DHCP server.

    /etc/init.d network restart would change the IP address to the static address (and ifconfig would confirm this) but after about 5-10 mins it would go back to the DHCP address.

    I am always very hesitant to suggest that something is a bug when i don't have in depth knowledge of the intended / expected behavior but this does seem to me to indeed be a bug. In any case hopefully this thread will help out anybody that has a similar problem with Debian or Ubuntu.

    Dave
     
  5. Nap

    Nap Member

    I am using DHCP on my LAN and have setup RESERVED addresses for my servers. I have a Firewall/router and have been using port forwarding on it direct traffic to the respective machines/ports.

    I've been using this method for a couple years on my Windows domain controller, LAN Printer, and Windows workstations. It's also been working fine for me with my Debian server over the last 2 months.

    I know some would argue against it, but it's been fine for me.

    Cheers,
    Nap
     
  6. Jaypoc

    Jaypoc New Member

    I have 2 Ubuntu 6.06 LTS servers I recently installed as Virtual Machines under VMWare Server 1.0 that do this. When I restart networking the IP used by the servers is the assigned IP, but about 20 to 30 minutes later, the IP reverts to the originally assigned DHCP IP address.

    My /etc/network/interfaces shows:

    -- --
    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    auto eth0
    iface eth0 inet static
    address 192.168.10.40
    netmask 255.255.255.0
    network 192.168.10.0
    broadcast 192.168.10.255
    gateway 192.168.10.1
    -- --

    The second VM has the IP of 192.168.10.41. They both revert back to 192.168.10.193 and 194. Sometimes WHILE I'm logged in via SSH. The connection will freeze on me, and when I log back in at the console or check the VMWare mui, I can see the IP addresses changed.

    ipconfig shows the DHCP ip address.
    Running /etc/init.d/networking restart restores the Static IP

    The host system (running VMWare) is also Ubuntu 6.06LTS and its IP remains static all the time.

    I'm going to try a hard-reboot and see if that works when I get home tonight (of the main host PC)

    Any other ideas/suggestions?
     
  7. Nap

    Nap Member

    Check the duration of the DHCP IP lease?
     
  8. Jaypoc

    Jaypoc New Member

    What's the thought process behind checking that?

    The server is not configured for DHCP so there shouldn't be anyDHCP lease. The question is not how long will it be assigned the IP, but why is it being assigned an IP when configured for static IP to begin with.

    Is it possible for a DHCP server to force an IP change on a NIC somehow?

    The gatway (192.168.10.1) is my DHCP server/NAT Router (Running M0n0wall)
    The hosts IP is 192.168.10.20 and is static and does not change
    The virtual machines IPs are set static to 192.168.10.40 and 192.168.10.41 but revert to 192.168.10.192 and 192.168.10.193 respectively.
     
  9. falko

    falko Super Moderator ISPConfig Developer

    This shouldn't happen if you have static IP addresses in /etc/network/interfaces.
    Maybe a cron job is changing your network settings?
     
  10. Jaypoc

    Jaypoc New Member

    Seems rebooting the virtual server was enouh. It's been about 12 hours and the IP has not gone back to a DHCP address. Weird! I thought I did reboot it after configuring it. Maybe not.
     

Share This Page