have to manually restart networking to get wireless connection



I am using Xubuntu Feisty 7.04 with BCM4306 wireless chip with WPA1. I
am trying to get it connected on boot up.

This is my /etc/network/interfaces:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.11.2
netmask 255.255.255.0
gateway 192.168.11.1

auto wlan0
iface wlan0 inet static
address 192.168.11.5
gateway 192.168.11.1
dns-nameservers 192.168.11.1
netmask 255.255.255.0
wpa-driver wext
wpa-ssid LAPTOP
wpa-ap-scan 1
wpa-proto WPA
wpa-pairwise TKIP
wpa-group TKIP
wpa-key-mgmt WPA-PSK
wpa-psk
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

However I have to restart networking two time after the boot to get it
working:
~$ sudo /etc/init.d/networking restart
* Reconfiguring network
interfaces... RTNETLINK
answers: File exists
run-parts: /etc/network/if-up.d/avahi-autoipd exited with return code
2

[ OK ]
I have put a script in /etc/rcS.d to restart the network during
booting, but still I have to do it manually again after the boot-up to
get the connection. I tried to use network-manager but it does not
connect at all. Wicd works but connects only after 5-10 attempts. Any
help will be highly appreciated.

Please see below some additional info:

:~$ route -n
Kernel IP routeing table
Destination Gateway Genmask Flags Metric Ref
Use Iface
192.168.11.0 0.0.0.0 255.255.255.0 U 0 0
0 eth0
192.168.11.0 0.0.0.0 255.255.255.0 U 0 0
0 wlan0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0
0 eth0
0.0.0.0 192.168.11.1 0.0.0.0 UG 0 0
0 wlan0
0.0.0.0 192.168.11.1 0.0.0.0 UG 0 0
0 eth0

~$ iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wlan0 IEEE 802.11g ESSID:"LAPTOP"
Mode:Managed Frequency:2.437 GHz Access Point:
00:16:01:A1:0F:56
Bit Rate=24 Mb/s Tx-Power:8 dBm
RTS thr=2347 B Fragment thr=2346 B
Power Management:off
Link Quality:56/100 Signal level:-60 dBm Noise level:-96
dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:40:D0:3E:35:93
inet addr:192.168.11.2 Bcast:192.168.11.255 Mask:
255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:11 Base address:0xa000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:737 errors:0 dropped:0 overruns:0 frame:0
TX packets:737 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:66850 (65.2 KiB) TX bytes:66850 (65.2 KiB)

wlan0 Link encap:Ethernet HWaddr 00:30:BD:95:1E:CE
inet addr:192.168.11.5 Bcast:192.168.11.255 Mask:
255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6915 errors:0 dropped:0 overruns:0 frame:0
TX packets:7713 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1561562 (1.4 MiB) TX bytes:846987 (827.1 KiB)
Interrupt:5 Memory:e4000000-e4002000

~$ iwlist scan
lo Interface doesn't support scanning.

eth0 Interface doesn't support scanning.

wlan0 Scan completed :
Cell 01 - Address: 00:16:01:A1:0F:56
ESSID:"LAPTOP"
Protocol:IEEE 802.11b
Mode:Managed
Frequency:2.437 GHz (Channel 6)
Quality:65/100 Signal level:-54 dBm Noise
level:-96 dBm
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 22 Mb/
s
6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/
s
36 Mb/s; 48 Mb/s; 54 Mb/s
Extra:bcn_int=200
Extra:atim=0
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Cell 02 - Address: 00:1B:2F:7B:C3:C6
ESSID:"NEIGHBOURS"
Protocol:IEEE 802.11b
Mode:Managed
Frequency:2.412 GHz (Channel 1)
Quality:35/100 Signal level:-73 dBm Noise
level:-96 dBm
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
11 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36
Mb/s
48 Mb/s; 54 Mb/s
Extra:bcn_int=100
Extra:atim=0
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK

:~$ cat /etc/modprobe.d/ndiswrapper
alias wlan0 ndiswrapper

:~$ cat /etc/resolv.conf
nameserver 62.24.199.13
nameserver 62.24.199.23

.



Relevant Pages