Aggressive DHCP

Hi,

I’ve just set a static IP for my RPi (which is where my Volumio runs):

[code]
root@volumio:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.4
netmask 255.255.255.0
gateway 192.168.1.254
nameserver 208.67.220.220
nameserver 208.67.222.222[/code]
However, after about 20 min, the volumio IP address switches back to a new one given by my DHCP server, which in fact leases IP addresses every 20 min.
After I modified the above file I also ran:

sudo /etc/init.d/networking restart

In the end I succeeded in telling my router that my RPi had in fact a static address by doing the following:

  • set static IP to my RPi
  • switch my router off
  • switch my RPi off
  • switch my router on
  • wait for my router to be up and running and then switch my RPi on

Is this normal behavior for a router or I have a particularly aggressive DHCP server embedded into it?

The concern here is that DHCP servers can switch IP’s while Volumio is running (happened to my) leading people believe that Volumio becomes unresponsive, when in fact it’s just changed IP address.

On your router you should be able to set a Static Lease rule based on the MAC address of your RPi. With this DHCP will send a specific IP address to the RPi. That way you don’t have to worry about configuring a static IP on the RPi and your router won’t assign it any other IP than what you specify. Saves lots of network confusion on both ends.