I followed up on the subject and found out the problem is not restricted to the wlan module. It seems I cannot set two interfaces to the same route any more. I have to unconfigure the other device and reload the module of the device to be configured.
It might be not a bug but a feature, but now I have to think of a new way of how to switch between the devices for internet connection. So far, I set the two of them to the same route and used ifplugd.
Below, I state the interface config file and my commands trying to change the device with their results.
The commented lines in /etc/network/interfaces I only just now commented out. Now after boot, no route and device is set and after doing either ifup wlan0 or ifup eth0, the device works. But I cannot just ifdown the device and ifup the other any more.
Quote:
/etc/network/interfaces
auto lo
iface lo inet loopback
#allow-hotplug eth0
iface eth0 inet static
address 192.168.178.21
broadcast 192.168.178.255
dns-nameservers 192.168.178.1
dns-search 192.168.178.1
gateway 192.168.178.1
netmask 255.255.255.0
network 192.168.178.0
#auto wlan0
iface wlan0 inet static
address 192.168.178.26
broadcast 192.168.178.255
dns-nameservers 192.168.178.1
dns-search 192.168.178.1
gateway 192.168.178.1
netmask 255.255.255.0
network 192.168.178.0
wpa-psk ****
wpa-ssid ****
Quote:
ifup wlan0
wlan0 works!
Quote:
# route
Kernel-IP-Routentabelle
Ziel Router Genmask Flags Metric Ref Use Iface
default fritz.box 0.0.0.0 UG 0 0 0 wlan0
192.168.178.0 * 255.255.255.0 U 0 0 0 wlan0
Quote:
# ifup eth0
RTNETLINK answers: File exists
Failed to bring up eth0.
# route
Kernel-IP-Routentabelle
Ziel Router Genmask Flags Metric Ref Use Iface
default fritz.box 0.0.0.0 UG 0 0 0 wlan0
192.168.178.0 * 255.255.255.0 U 0 0 0 wlan0
192.168.178.0 * 255.255.255.0 U 0 0 0 eth0
Quote:
# modprobe -r r8169
# modprobe r8169
# ifup eth0
RTNETLINK answers: File exists
Failed to bring up eth0.
# route
Kernel-IP-Routentabelle
Ziel Router Genmask Flags Metric Ref Use Iface
default fritz.box 0.0.0.0 UG 0 0 0 wlan0
192.168.178.0 * 255.255.255.0 U 0 0 0 wlan0
192.168.178.0 * 255.255.255.0 U 0 0 0 eth0
Quote:
# ifdown wlan0
# ifup eth0
RTNETLINK answers: File exists
Failed to bring up eth0.
Quote:
# modprobe -r r8169
# modprobe r8169
# ifup eth0
eth0 works!
Quote:
# ifup wlan0
RTNETLINK answers: File exists
Failed to bring up wlan0.
Quote:
# modprobe -r brcmsmac
# modprobe brcmsmac
# ifup wlan0
RTNETLINK answers: File exists
Failed to bring up wlan0.
Quote:
# ifdown eth0
# ifup wlan0
RTNETLINK answers: File exists
Failed to bring up wlan0.
Quote:
# modprobe -r brcmsmac
# modprobe brcmsmac
# ifup wlan0
wlan0 works!
Quote:
# route
Kernel-IP-Routentabelle
Ziel Router Genmask Flags Metric Ref Use Iface
default fritz.box 0.0.0.0 UG 0 0 0 wlan0
192.168.178.0 * 255.255.255.0 U 0 0 0 wlan0
|