Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
LeTuXOffline
Post subject: RTNETLINK answers: File exists - Failed to bring up wlan0  PostPosted: 25.05.2012, 13:45



Joined: 2011-05-15
Posts: 13
Location: Germany
Status: Offline
Hi,

after last d-u. wlan doesn't work any more after start. After doing ifup wlan0, I get the message stated in the subject line.

Aunt g**gle tells me some route is already set before trying to set the correct one, but "route" doesn't show any route for wlan0.

I found a workaround, though:

modprobe -r brcmsmac */ my wlan module
modprobe brcmsmac
ifup wlan0


Does anyone know what could have gone wrong and how to fix it without including the aforementioned lines in /etc/rc.local?

Edit:
including the lines in /etc/rc.local doesn't even work. I have to enter them manually.
 
 View user's profile Send private message  
Reply with quote Back to top
LeTuXOffline
Post subject:   PostPosted: 29.05.2012, 16:09



Joined: 2011-05-15
Posts: 13
Location: Germany
Status: Offline
this issue is still unsolved.

What's funny:
After boot, wavelan (xfce wlan monitor) says wlan0 is connected with a poor signal.
But "ifdown wlan0" returns "wlan0 is not configured".

"ifup wlan0" gives "RTNETLINK answers: File exists - Failed to bring up wlan0"

      Quote:
ifconfig:

wlan0 Link encap:Ethernet Hardware Adresse 1c:65:9d:79:2b:19
inet Adresse:192.168.178.26 Bcast:192.168.178.255 Maske:255.255.255.0
inet6-Adresse: fe80::1e65:9dff:fe79:2b19/64 Gültigkeitsbereich:Verbindung
UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1
RX packets:17 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:1000
RX bytes:5852 (5.7 KiB) TX bytes:752 (752.0 B)

..while wlan is not working!

-----

      Quote:
modprobe -r brcmsmac
modprobe brcmsmac
ifup wlan0


works!

But including this in /etc/rc.local or /etc/init.d/networking shows no effect. I have to do this manually after boot.


      Quote:
lspci | grep Network
12:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01)
 
 View user's profile Send private message  
Reply with quote Back to top
LeTuXOffline
Post subject:   PostPosted: 31.05.2012, 11:59



Joined: 2011-05-15
Posts: 13
Location: Germany
Status: Offline
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
 
 View user's profile Send private message  
Reply with quote Back to top
slhAdministrator
Post subject:   PostPosted: 31.05.2012, 12:05



Joined: 2010-08-25
Posts: 747

Status: Online!
You can never do that, at least not if you expect it to work (and not switch continuously and semi-randomly between the conflicting routes).
 
 View user's profile Send private message  
Reply with quote Back to top
LeTuXOffline
Post subject:   PostPosted: 31.05.2012, 14:25



Joined: 2011-05-15
Posts: 13
Location: Germany
Status: Offline
      slh wrote:
You can never do that, at least not if you expect it to work (and not switch continuously and semi-randomly between the conflicting routes).


It used to work: ifdown wlan0; ifup eth0
when I wanted to surf wired, and vice versa.

Now I guess I have to write a script doing ifconfig and route.
 
 View user's profile Send private message  
Reply with quote Back to top
slhAdministrator
Post subject:   PostPosted: 31.05.2012, 14:53



Joined: 2010-08-25
Posts: 747

Status: Online!
You can have two interfaces prepared for the same subnet, but only one of them can be active at the same time - so you must down the active interface first, before you can up the previously inactive one. modprobe/ rmmod isn't needed anywhere (it may even be harmful, due to the device detection events, triggering on allow-hotplug).
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio