0

i have configured both eth0 and wlan with static ip according to this post:

Setting up WiFi and Ethernet

It works fine. But if I reboot The pi; Eth0 gets the assined ip even without the cable plugged in. Similar thing happen when I reboot with the Ethernet cable plugged in; Now I get a functional ip but if I unplug it, ifconfig still show the static ip.

What is wrong?

/etc/network/interfaces

auto lo
iface lo inet loopback

allow-hotplugin eth0
iface eth0 inet static
address 192.168.1.150
gateway 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255

auto wlan0
iface wlan0 inet static
address 192.168.1.151
network 192.168.1.0
broadcast 192.168.1.255
netmask 255.255.255.0
wpa-ssid MYWIFI
wpa-psk *** 

iface default inet dhcp

/etc/default/ifplugd

INTERFACES="eth0"
HOTPLUG_INTERFACES="eth0"
ARGS="-q -f -u0 -d10 -w -I"
SUSPEND_ACTION="stop"
CESCO
  • 111
  • 2

1 Answers1

3

Nothing is wrong.

You have asked for a static IP address and that's what you have got.

If you don't want a static IP address then use dynamic, that way an IP address will be assigned when the ethernet cable is plugged in.

joan
  • 71,852
  • 5
  • 76
  • 108