PDA

View Full Version : HOWTO: Wireless Security - WPA1, WPA2, LEAP, etc.


Pages : 1 2 3 4 5 6 7 [8]

daniel.pool
August 28th, 2009, 11:25 AM
Hi,

I've recently had to rebuild my machine and I'm unable to get the wireless card working. I've previously had it working using the RT2870 drivers and WPA using the instructions on this and another thread (http://ubuntuforums.org/showthread.php?p=7600077#post7600077) which provides info on how to get the drivers working.

For some reason this time around I just can't get the wireless working properly. As requested by the OP, here are my files for inspection:

Output of route:


Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 ra0
default 192.168.1.254 0.0.0.0 UG 100 0 0 ra0Output of iwconfig:

ra0 Ralink STA ESSID:"[detail removed]" Nickname:"RT2870STA"
Mode:Managed Frequency=2.437 GHz Access Point: 00:22:69:2A:C8:1B
Bit Rate=130 Mb/s
RTS thr:off Fragment thr:off
Encryption key:[Detail removed]
Link Quality=100/100 Signal level:-52 dBm Noise level:-71 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0Output of iwlist:

ra0 Scan completed :
Cell 01 - Address: 00:22:69:2A:C8:1B
Protocol:802.11b/g/n
ESSID:"[detail removed]"
Mode:Managed
Frequency:2.437 GHz (Channel 6)
Quality:96/100 Signal level:-52 dBm Noise level:-92 dBm
Encryption key:on
Bit Rates:130 Mb/s
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSKOutput of lshw -C network

*-network DISABLED
description: Ethernet interface
product: MCP78S [GeForce 8200] Ethernet
vendor: nVidia Corporation
physical id: a
bus info: pci@0000:00:0a.0
logical name: eth0
version: a2
serial: 00:23:54:19:a8:bf
size: 100MB/s
capacity: 1GB/s
width: 32 bits
clock: 66MHz
capabilities: pm msi ht bus_master cap_list ethernet physical mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=forcedeth driverversion=0.61 duplex=full latency=0 link=yes maxlatency=20 mingnt=1 module=forcedeth multicast=yes port=MII speed=100MB/s
*-network
description: Wireless interface
physical id: 1
logical name: ra0
serial: 00:1c:df:d1:a0:c9
capabilities: ethernet physical wireless
configuration: broadcast=yes ip=192.168.1.25 multicast=yes wireless=Ralink STAOutput of /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#auto eth0
#iface eth0 inet dhcp
#iface eth0 inet static
#address 192.168.1.25
#netmask 255.255.255.0
#gateway 192.168.1.254


#wireless configuration
auto ra0
#iface ra0 inet dhcp
iface ra0 inet static
address 192.168.1.25
gateway 192.168.1.254
dns-nameservers 192.168.1.254
netmask 255.255.255.0
wpa-driver wext
wpa-ssid [detail removed]
wpa-ap-scan 1
wpa-proto WPA
wpa-pairwise TKIP
wpa-group TKIP
wpa-key-mgmt WPA-PSK
wpa-psk [detail removed]Output of ifdown -v ra0

Configuring interface ra0=ra0 (inet)
run-parts --verbose /etc/network/if-down.d
run-parts: executing /etc/network/if-down.d/postfix
run-parts: executing /etc/network/if-down.d/wpasupplicant
route del default gw 192.168.1.254 metric 100 ra0
ifconfig ra0 down
run-parts --verbose /etc/network/if-post-down.d
run-parts: executing /etc/network/if-post-down.d/wireless-tools
run-parts: executing /etc/network/if-post-down.d/wpasupplicantOutput of ifup -v ra0

Configuring interface ra0=ra0 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/dhclient3-apparmor
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
wpa_supplicant: wpa-driver wext
wpa_supplicant: /sbin/wpa_supplicant -B -P /var/run/wpa_supplicant.ra0.pid -i ra0 -D wext -q -s -C /var/run/wpa_supplicant
Starting /sbin/wpa_supplicant...
wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1

ifconfig ra0 192.168.1.25 netmask 255.255.255.0 up
route add default gw 192.168.1.254 metric 100 ra0
run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/mountnfs
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/openssh-server
run-parts: executing /etc/network/if-up.d/postfix
run-parts: executing /etc/network/if-up.d/wpasupplicant
root@HTPC:/home/htpc# ifdown -v ra0
Configuring interface ra0=ra0 (inet)
run-parts --verbose /etc/network/if-down.d
run-parts: executing /etc/network/if-down.d/postfix
run-parts: executing /etc/network/if-down.d/wpasupplicant
route del default gw 192.168.1.254 metric 100 ra0 The interface seems to get the static IP given to it and it sees the AP, I thought that it might be a dns problem as it can't resolve anything, but it also doesn't connect via IP addresses. I tried connecting using DHCP and it fails to get a lease, so my guess is that the interface isn't connecting and something in the wpa_supplicant is breaking (confirmed I guess by the wpa_supplicant daemon failing on startup). What is breaking though I don't know, and I'm pretty sure that I have done nothing different since my last working build (which was a few days ago).

Oh, just thought I should add that I've tried various combinations of WPA/RSN and CCMP/TKIP with the interfaces config. The AP seems to support WPA 1 & 2 and CCMP and TKIP on the pairwise. The current config is what was previously working.

Thanks in advance for any help
~Dan

wieman01
August 29th, 2009, 04:21 AM
Hi daniel.pool,

Two things... What happens when you ping your router after trying to connect?

Second, can you connect when all security is turned off? And what about WEP security, does that work?

wieman01

daniel.pool
August 29th, 2009, 02:22 PM
Wieman,

Thanks for your response.

What happens when you ping your router after trying to connect?

I get Destination unreachable

Second, can you connect when all security is turned off? And what about WEP security, does that work?

I tried setting up an open network and interestingly this didn't work either. The information came up exactly as before but I wasn't able to connect through. I hadn't tried this earlier because I'd gotten it working on WPA before and was sure it was something in config I hadn't done right ... looks like it might be a driver issue instead if I can't connect full stop :-(

wieman01
August 30th, 2009, 04:11 AM
Wieman,

Thanks for your response.

I tried setting up an open network and interestingly this didn't work either. The information came up exactly as before but I wasn't able to connect through. I hadn't tried this earlier because I'd gotten it working on WPA before and was sure it was something in config I hadn't done right ... looks like it might be a driver issue instead if I can't connect full stop :-(
Hello,

Alright, that's what you have to work on then. You are close, but you need to fix your adapter first before we go ahead. Please open a new thread and feel free to post the link here.

wieman01

daniel.pool
August 30th, 2009, 11:23 AM
Hello,

Alright, that's what you have to work on then. You are close, but you need to fix your adapter first before we go ahead. Please open a new thread and feel free to post the link here.

wieman01

Hey,

I downgraded the driver version from the 2.2 version to the 2.1.2 that I would have used a few months back. It appears that the latest version is broken. I've posted on the ubuntu support thread (http://ubuntuforums.org/showpost.php?p=7870385&postcount=57) for the ralink 2870sta adaptor that I use and will see if I can raise a bug report with ralink themselves.

The wpa_supplicant stuff connected straight off once the driver was replaced, though I still get the occasional message that wpa_supplicant daemon couldn't start even though the connection is working fine :confused:

root@HTPC:/home/htpc# /etc/init.d/networking restart
* Reconfiguring network interfaces...
wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1

Xkutzy
September 6th, 2009, 09:26 AM
This is a bump for my last post in this thread (#1750). Has anyone got any thoughts?

Thanks,

Xkutzy

ugm6hr
September 6th, 2009, 09:42 AM
This is a bump for my last post in this thread (#1750). Has anyone got any thoughts?

I would suggest you search for posts relating to your device.

Essentially, some people found it works out of the box, some didn't. It worked better with the serialmonkey drivers in general than the default legacy ones. The serialmonkey drivers are now in the Jaunty kernel.

Xkutzy
September 13th, 2009, 03:46 PM
Thanks for the tip Ugm6hr. I did a bit of further research as suggested. From what I gather the ealier versions of the serial monkey driver that were incorporated into the Hardy kernel were by their own admission a bit buggy.
I didn't fancy installing a later version of that driver. Too much hassle every time there is a new kernel. So I did a fresh install of Jaunty instead. Wireless with WPA worked straight out of the box. I've almost finished getting things the way I want them. Just one or two issues with some web sites in Firefox. But that's a job for another day.

kevdog
September 13th, 2009, 07:19 PM
serialmonkey drivers finally contained in the jaunty kernel -- wow -- its about time. Thank you to whom ever made this happen!!! Can't wait until the release date!!!

bud_man
October 20th, 2009, 02:42 AM
I tried following the steps for WPA1, static IP address, but I can't seem to get it up and running. I'm fairly new to this stuff and I'm running out of ideas. I think it might have to do with the Ethernet interface because it says "*-network DISABLED", but I'm not sure.
The system that I'm trying to get the internet to work on is Ubuntu Studio 9.04, and the weird thing about it is that I can get my other partition, Ubuntu 9.04, to get wireless access except for that one.

buddy@roz:~$ sudo /etc/init.d/networking restart
* Reconfiguring network interfaces...
wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
* if-up.d/mountnfs[wlan0]: waiting for interface eth0 before doing NFS mounts
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

wmaster0: unknown hardware address type 801
wmaster0: unknown hardware address type 801
Listening on LPF/eth0/00:16:d4:8b:35:30
Sending on LPF/eth0/00:16:d4:8b:35:30
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 19
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 19
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 1
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
[ OK ]
buddy@roz:~$ sudo lshw -C network
*-network
description: Wireless interface
product: PRO/Wireless 3945ABG [Golan] Network Connection
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:04:00.0
logical name: wmaster0
version: 02
serial: 00:19:d2:1e:42:99
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list logical ethernet physical wireless
configuration: broadcast=yes driver=iwl3945 ip=192.168.1.100 latency=0 module=iwl3945 multicast=yes wireless=IEEE 802.11abg
*-network DISABLED
description: Ethernet interface
product: RTL8101E/RTL8102E PCI Express Fast Ethernet controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:05:00.0
logical name: eth0
version: 01
serial: 00:16:d4:8b:35:30
size: 10MB/s
capacity: 100MB/s
width: 64 bits
clock: 33MHz
capabilities: pm vpd msi pciexpress bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half latency=0 link=yes module=r8169 multicast=yes port=MII speed=10MB/s
*-network DISABLED
description: Ethernet interface
physical id: 2
logical name: pan0
serial: a6:6c:2f:48:09:e0
capabilities: ethernet physical
configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A link=yes multicast=yes

buddy@roz:~$ sudo iwlist scan
lo Interface doesn't support scanning.

eth0 Interface doesn't support scanning.

wmaster0 Interface doesn't support scanning.

wlan0 Scan completed :
Cell 01 - Address: 00:22:6B:53:69:FD
ESSID:"Margarita1"
Mode:Master
Channel:1
Frequency:2.412 GHz (Channel 1)
Quality=31/100 Signal level:-90 dBm Noise level=-127 dBm
Encryption key:on
IE: Unknown: 000A4D617267617269746131
IE: Unknown: 010882848B9624B0486C
IE: Unknown: 030101
IE: Unknown: 050400010000
IE: Unknown: 2A0104
IE: Unknown: 2F0104
IE: Unknown: 32048C129860
IE: Unknown: DD0E0050F204104A0001101044000102
IE: Unknown: DD090010180200F4000000
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
12 Mb/s; 48 Mb/s
Extra:tsf=00000066b4bca183
Extra: Last beacon: 1418ms ago
Cell 02 - Address: 00:18:39:3F:D8:1F
ESSID:<some_name>
Mode:Master
Channel:6
Frequency:2.437 GHz (Channel 6)
Quality=88/100 Signal level:-44 dBm Noise level=-127 dBm
Encryption key:on
IE: Unknown: 0003726F7A
IE: Unknown: 010882848B962430486C
IE: Unknown: 030106
IE: Unknown: 050400010000
IE: Unknown: 2A0104
IE: Unknown: 2F0104
IE: Unknown: 32040C121860
IE: Unknown: DD060010180202F4
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
12 Mb/s; 48 Mb/s
Extra:tsf=000000fe690103b6
Extra: Last beacon: 384ms ago
Cell 03 - Address: 00:11:E3:3E:A2:8F
ESSID:"M_Network"
Mode:Master
Channel:6
Frequency:2.437 GHz (Channel 6)
Quality=31/100 Signal level:-90 dBm Noise level=-127 dBm
Encryption key:on
IE: Unknown: 00094D5F4E6574776F726B
IE: Unknown: 010882848B962430486C
IE: Unknown: 030106
IE: Unknown: 050400010000
IE: Unknown: 2A0100
IE: Unknown: 2F0100
IE: Unknown: 32040C121860
IE: Unknown: DD06001018020100
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
12 Mb/s; 48 Mb/s
Extra:tsf=0000005327e59187
Extra: Last beacon: 730ms ago

pan0 Interface doesn't support scanning.

buddy@roz:~$ sudo lshw -C network
*-network
description: Wireless interface
product: PRO/Wireless 3945ABG [Golan] Network Connection
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:04:00.0
logical name: wmaster0
version: 02
serial: 00:19:d2:1e:42:99
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list logical ethernet physical wireless
configuration: broadcast=yes driver=iwl3945 latency=0 module=iwl3945 multicast=yes wireless=IEEE 802.11abg
*-network DISABLED
description: Ethernet interface
product: RTL8101E/RTL8102E PCI Express Fast Ethernet controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:05:00.0
logical name: eth0
version: 01
serial: 00:16:d4:8b:35:30
size: 10MB/s
capacity: 100MB/s
width: 64 bits
clock: 33MHz
capabilities: pm vpd msi pciexpress bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half latency=0 link=yes module=r8169 multicast=yes port=MII speed=10MB/s
*-network DISABLED
description: Ethernet interface
physical id: 2
logical name: pan0
serial: a6:6c:2f:48:09:e0
capabilities: ethernet physical
configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A link=yes multicast=yes

buddy@roz:~$ lsmod
Module Size Used by
nls_iso8859_1 13440 1
nls_cp437 15104 1
vfat 21120 1
fat 65840 1 vfat
usb_storage 94912 1
cbc 12288 62
aes_x86_64 16384 63
aes_generic 36264 1 aes_x86_64
i915 75272 2
drm 124432 3 i915
ppdev 16904 0
bridge 64160 0
stp 11268 1 bridge
bnep 23168 2
joydev 20864 0
lp 20676 0
parport 50188 2 ppdev,lp
arc4 10240 2
snd_hda_intel 557236 2
ecb 11392 3
pcmcia 48080 0
snd_pcm_oss 52352 0
snd_mixer_oss 25088 1 snd_pcm_oss
snd_pcm 98056 2 snd_hda_intel,snd_pcm_oss
snd_seq_dummy 11524 0
snd_seq_oss 42496 0
snd_seq_midi 15872 0
snd_rawmidi 33664 1 snd_seq_midi
iwl3945 111736 0
snd_seq_midi_event 16640 2 snd_seq_oss,snd_seq_midi
mac80211 253832 1 iwl3945
snd_seq 66848 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_mid i_event
iTCO_wdt 21632 0
yenta_socket 35724 1
iTCO_vendor_support 12420 1 iTCO_wdt
led_class 13064 1 iwl3945
rsrc_nonstatic 19584 1 yenta_socket
sdhci_pci 16896 0
snd_timer 33544 2 snd_pcm,snd_seq
tifm_7xx1 14976 0
sdhci 27396 1 sdhci_pci
snd_seq_device 16276 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi ,snd_seq
pcmcia_core 50004 3 pcmcia,yenta_socket,rsrc_nonstatic
tifm_core 18056 1 tifm_7xx1
cfg80211 43552 2 iwl3945,mac80211
pcspkr 11136 0
intel_agp 39280 1
psmouse 64028 0
serio_raw 14468 0
input_polldev 12816 0
snd 79432 13 snd_hda_intel,snd_pcm_oss,snd_mixer_oss,snd_pcm,sn d_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_de vice
soundcore 17312 1 snd
snd_page_alloc 18832 2 snd_hda_intel,snd_pcm
video 29204 0
output 11648 1 video
ohci1394 42548 0
ieee1394 110176 1 ohci1394
r8169 46724 0
mii 14464 1 r8169
fbcon 50048 0
tileblit 11264 1 fbcon
font 17024 1 fbcon
bitblit 14464 1 fbcon
softcursor 10368 1 bitblit

buddy@roz:~$ sudo wpa_supplicant -Dwext -iwlan0 -c wpa_supplicant.conf
Failed to read or parse configuration '/home/buddy/wpa_supplicant.conf'.
buddy@roz:~$ sudo gedit /etc/resolv.conf
buddy@roz:~$ sudo ln -s /etc/init.d/wireless-network /etc/rcS.d/S40wireless-network
ln: creating symbolic link `/etc/rcS.d/S40wireless-network': File exists
buddy@roz:~$ sudo gedit /etc/init.d/wireless-network
buddy@roz:~$ lspci -v | less

04:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
Subsystem: Intel Corporation Device 1040
Flags: bus master, fast devsel, latency 0, IRQ 2299
Memory at d8000000 (32-bit, non-prefetchable) [size=4K]
Capabilities: <access denied>
Kernel driver in use: iwl3945
Kernel modules: iwl3945

05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 01)
Subsystem: Toshiba America Info Systems Device ff00
Flags: bus master, fast devsel, latency 0, IRQ 2300
I/O ports at 4000 [size=256]
Memory at da000000 (64-bit, non-prefetchable) [size=4K]
[virtual] Expansion ROM at d4000000 [disabled] [size=64K]
Capabilities: <access denied>
Kernel driver in use: r8169
Kernel modules: r8169

buddy@roz:~$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:16:d4:8b:35:30
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:252 Base address:0x8000

eth0:avahi Link encap:Ethernet HWaddr 00:16:d4:8b:35:30
inet addr:169.254.5.36 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
Interrupt:252 Base address:0x8000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:106 errors:0 dropped:0 overruns:0 frame:0
TX packets:106 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7916 (7.9 KB) TX bytes:7916 (7.9 KB)

pan0 Link encap:Ethernet HWaddr a6:6c:2f:48:09:e0
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:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr 00:19:d2:1e:42:99
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.255
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)

wmaster0 Link encap:UNSPEC HWaddr 00-19-D2-1E-42-99-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING 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)

buddy@roz:~$ iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wmaster0 no wireless extensions.

wlan0 IEEE 802.11abg ESSID:""
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Tx-Power=15 dBm
Retry min limit:7 RTS thr:off Fragment thr=2352 B
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

pan0 no wireless extensions.

buddy@roz:~$ sudo gedit /etc/network/interfaces

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet static
address 192.168.1.100
netmask 255.255.255.255
wpa-driver wext
wpa-conf managed
wpa-essid <some_name>
wpa-ap-scan 1
wpa-proto WPA
wpa-pairwise TKIP
wpa-group TKIP
wpa-key-mgmt WPA-PSK
wpa-psk <some_key>

auto eth0
iface eth0 inet dhcp

Any help is greatly appreciated! Thanks!

doixanh
November 1st, 2009, 11:04 AM
Sorry to bump this old thread, but I'm really confused about my wireless problem.

It's my Dell Vostro 1500 laptop. I installed the wireless card successfully (using ndiswrapper) in Hardy. After a clean format/install of Karmic, the problem started. I cannot connect to the AP. Encryption is WPA2 RSN, CCMP, PSK. I followed the first post but I still cannot connect to it. I also tried to reset the WPA2 password but no luck yet.

The wireless LED is on.

These are output from the commands
dx@dx-ubuntu:~$ lspci | grep Broadcom\ Corporation
03:00.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX (rev 02)
0c:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)
dx@dx-ubuntu:~$ lshw -C network
WARNING: you should run this program as super-user.
*-network
description: Wireless interface
product: BCM4312 802.11b/g
vendor: Broadcom Corporation
physical id: 0
bus info: pci@0000:0c:00.0
logical name: wlan0
version: 01
serial: 00:1e:4c:48:65:ea
width: 64 bits
clock: 33MHz
capabilities: bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=ndiswrapper+bcmwl5 driverversion=1.55+Broadcom,09/20/2007, 4.170. latency=0 multicast=yes wireless=IEEE 802.11g
resources: irq:17 memory:f9ffc000-f9ffffff
*-network
description: Ethernet interface
product: BCM4401-B0 100Base-TX
vendor: Broadcom Corporation
physical id: 0
bus info: pci@0000:03:00.0
logical name: eth0
version: 02
serial: 00:1d:09:bf:f5:a4
width: 32 bits
clock: 33MHz
capabilities: bus_master cap_list ethernet physical
configuration: broadcast=yes driver=b44 driverversion=2.0 ip=192.168.254.102 latency=64 multicast=yes
resources: irq:17 memory:f9bfe000-f9bfffff
dx@dx-ubuntu:~$ cat /etc/modprobe.d/blacklist
blacklist b43
blacklist b43legacy
blacklist wl
dx@dx-ubuntu:~$ cat /etc/modprobe.d/ndiswrapper
alias wlan0 ndiswrapper
install ndiswrapper modprobe -r b43 b44 b43legacy ssb; modprobe --ignore-install ndiswrapper $CMDLINE_OPTS; modprobe ssb; modprobe b44;
dx@dx-ubuntu:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet dhcp
# address 192.168.254.199
# gateway 192.168.254.1
# dns-nameservers 192.168.254.1
# netmask 255.255.255.0
wpa-driver wext
wpa-ssid dnxp
wpa-ap-scan 1
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wpa-psk xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
(I replaced my psk)

And this is my problem : I cannot connect to my AP to get IP
dx@dx-ubuntu:~$ sudo ifup -v wlan0
Configuring interface wlan0=wlan0 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
wpa_supplicant: wpa-driver wext
wpa_supplicant: /sbin/wpa_supplicant -s -B -P /var/run/wpa_supplicant.wlan0.pid -i wlan0 -D wext -C /var/run/wpa_supplicant
Starting /sbin/wpa_supplicant...
wpa_supplicant: sendsigs omission pidfile not created
wpa_supplicant: ctrl_interface socket located at /var/run/wpa_supplicant/wlan0
wpa_supplicant: wpa-ap-scan 1 -- OK
wpa_supplicant: configuring network block -- 0
wpa_supplicant: wpa-ssid "dnxp" -- OK
wpa_supplicant: wpa-psk ***** -- OK
wpa_supplicant: wpa-pairwise CCMP -- OK
wpa_supplicant: wpa-group CCMP -- OK
wpa_supplicant: wpa-key-mgmt WPA-PSK -- OK
wpa_supplicant: wpa-proto RSN -- OK
wpa_supplicant: enabling network block 0 -- OK

dhclient3 -e IF_METRIC=100 -pf /var/run/dhclient.wlan0.pid -lf /var/lib/dhcp3/dhclient.wlan0.leases wlan0
Internet Systems Consortium DHCP Client V3.1.2
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/wlan0/00:1e:4c:48:65:ea
Sending on LPF/wlan0/00:1e:4c:48:65:ea
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 21
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/upstart
run-parts: executing /etc/network/if-up.d/wpasupplicant
Can someone help me to solve this problem? Thanks!

kevdog
November 1st, 2009, 11:50 AM
Couple of suggestions I would make and a few comments:

#1 - Do you know your bcmwl5 driver actually support wpa2.

#2 - Confirm you can actually do wpa1 with your current setup if possible.

#3 - Try to do a manual connection at the command line and a wpa_supplicant.conf file (as explained by the link in my signature) rather than going for network manager. This isn't meant as a permanent solution rather than a means of discovery to what this current problem represents.

doixanh
November 1st, 2009, 11:59 AM
Thanks for your quick reply, kevdog.

#1 - Do you know your bcmwl5 driver actually support wpa2.

yes, I successfully used it in Hardy.

#2 - Confirm you can actually do wpa1 with your current setup if possible.

I reconfigured my access point to WPA1, and I still have same problem under Karmic. Windows connects to my AP using old (WPA2) and this new configuration (WPA1) with no problem.

#3 - Try to do a manual connection at the command line and a wpa_supplicant.conf file (as explained by the link in my signature) rather than going for network manager. This isn't meant as a permanent solution rather than a means of discovery to what this current problem represents.

I didn't use any network manager at all. I only installed ndiswrapper-utils-1.9, wpasupplicant and I manually edited the "interfaces" file. I also tried to use wifi-radar and wicd, no luck. After trying these packages with no success, I removed them immediately.

Anyway I will try your solution.

/edit : I tried manually connecting, no luck yet.
Current setup is WPA1, and these are the output:
dx@dx-ubuntu:~$ sudo ifconfig wlan0 down
dx@dx-ubuntu:~$ sudo dhclient -r wlan0
There is already a pid file /var/run/dhclient.pid with pid 1512
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.2
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/wlan0/00:1e:4c:48:65:ea
Sending on LPF/wlan0/00:1e:4c:48:65:ea
Sending on Socket/fallback
dx@dx-ubuntu:~$ sudo wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -dd Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ap_scan=1
ctrl_interface='/var/run/wpa_supplicant'
Line: 4 - start of a new network block
ssid - hexdump_ascii(len=4):
64 6e 78 70 dnxp
scan_ssid=0 (0x0)
proto: 0x1
key_mgmt: 0x2
PSK (ASCII passphrase) - hexdump_ascii(len=9): [REMOVED]
pairwise: 0x8
group: 0x8
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Priority group 0
id=0 ssid='dnxp'
Interface wlan0 set UP - waiting a second for the driver to complete initialization
SIOCGIWRANGE: WE(compiled)=22 WE(source)=18 enc_capa=0xf
capabilities: key_mgmt 0xf enc 0xf flags 0x0
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:1e:4c:48:65:ea
wpa_driver_wext_set_wpa
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_countermeasures
wpa_driver_wext_set_drop_unencrypted
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
WPS: UUID based on MAC address - hexdump(len=16): f3 65 df c1 39 c0 55 13 8c 52 ed 21 2a bd 81 cc
WPS: Build Beacon and Probe Response IEs
WPS: * Version
WPS: * Wi-Fi Protected Setup State (0)
WPS: * Version
WPS: * Wi-Fi Protected Setup State (0)
WPS: * Response Type (2)
WPS: * UUID-E
WPS: * Manufacturer
WPS: * Model Name
WPS: * Model Number
WPS: * Serial Number
WPS: * Primary Device Type
WPS: * Device Name
WPS: * Config Methods (0)
WPS: * RF Bands (3)
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
Using existing control interface directory.
ctrl_iface bind(PF_UNIX) failed: Address already in use
ctrl_iface exists and seems to be in use - cannot override it
Delete '/var/run/wpa_supplicant/wlan0' manually if it is not used anymore
Failed to initialize control interface '/var/run/wpa_supplicant'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.

Failed to add interface wlan0
State: DISCONNECTED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wpa_driver_wext_set_wpa
wpa_driver_wext_set_drop_unencrypted
wpa_driver_wext_set_countermeasures
No keys have been configured - skip key clearing
Cancelling scan request
Cancelling authentication timeout
WEXT: Operstate: linkmode=0, operstate=6
and try iwconfig

dx@dx-ubuntu:~$ iwconfig
lo no wireless extensions.

wlan0 IEEE 802.11g ESSID:"dnxp"
Mode:Managed Frequency:2.437 GHz Access Point: 00:1A:70:94:FC:A8
Bit Rate=54 Mb/s Tx-Power:32 dBm
RTS thr:2347 B Fragment thr:2346 B
Power Management:off
Link Quality:54/100 Signal level:-61 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

eth0 no wireless extensions.
and then try getting IP

dx@dx-ubuntu:~$ sudo dhclient wlan0
Internet Systems Consortium DHCP Client V3.1.2
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/wlan0/00:1e:4c:48:65:ea
Sending on LPF/wlan0/00:1e:4c:48:65:ea
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
My current wpa_supplicant.conf for current WPA1 setup:

ap_scan=1
ctrl_interface=/var/run/wpa_supplicant

network={
ssid="dnxp"
scan_ssid=0
proto=WPA
key_mgmt=WPA-PSK
psk="pure-key-here"
pairwise=TKIP
group=TKIP
}
and my current "interfaces" file

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet dhcp
# address 192.168.254.199
# gateway 192.168.254.1
# dns-nameservers 192.168.254.1
# netmask 255.255.255.0
# wpa-driver wext
# wpa-ssid dnxp
# wpa-ap-scan 2
# wpa-proto WPA
# wpa-pairwise TKIP
# wpa-group TKIP
# wpa-key-mgmt WPA-PSK
# wpa-psk xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Any help please?

kevdog
November 1st, 2009, 06:26 PM
I saw this examining your output:

Failed to initialize control interface '/var/run/wpa_supplicant'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.

doixanh
November 2nd, 2009, 02:58 AM
Ok I got it solved. My problem is the same as the one described here (http://ubuntuforums.org/showpost.php?p=8082022&postcount=4).

The drawback is that I have to manually use wpa_supplicant and run renice every boot. Kinda annoying but no fix to this time.

Thank you kevdog. :popcorn:

kevdog
November 2nd, 2009, 03:25 AM
I have no idea why the renice command works for you since a nice value of +19 is actually almost the lowest priority available (+20). I actually looked at the link you provided but the link within the link actually didn't provide any information. That's pretty good detective work on your part since I've never seen this command used in conjunction with wpa_supplicant.

darkod
December 2nd, 2009, 06:50 AM
Sorry if this is covered in any post, but there are 177 pages already. :) I also tried googling for 2 days.

Can someone please give instructions how to use wlan0 as soft AP? Not directly as ad-hoc but as soft AP. I heard that improves signal strength and/or security. I would definitely want to use WPA2 with that if possible.
I have been searching for any software about this, but no luck. I don't mind setting it up in /etc/network/interfaces in fact it might be better that way.
From reading around setting Master mode of the adapter is the main thing.
Do I just add that line and use the rest of the settings as per this how-to?
My usb N wi-fi adapter is still in the post but from what I could find out it seems to use Ralink RT2870 chip, if that helps. I am searching for tutorials to be ready when it arrives. :)

I basically want to share my desktop eth0 connected to the internet with my netbook. The netbook has integrated G (in ubuntu reported as ath5k I think), and I'm waiting for the usb N for the desktop. Any help greatly appreciated.

PS. It might be good idea to add soft AP section or modification instructions to the original how-to, during these 2 days I saw many threads asking for soft AP solution but no answer.

urrfaust
December 6th, 2009, 01:42 PM
Hi everyone,

I'm having a problem with my wireless connection.
I use WPA2-AES with an Intel 2915abg adapter. I get the Ip address from the dhcp server but then after a few seconds the connection drops. Sometimes the connection stays on but I have no access to DNS server. Could it be a ipw2200 driver error? Or a configuration error? I tried all sorts of tips given here on this forum but to no avail. Funny thing is that I tried the same card on Windows XP SP3 and it has the same problem: I get IP address but then no DNS connection. With a friend who knows about networking, we looked at the DNS server logs and apparently the server gets corrupted requests (ICMP for example) from the wireless adapter.
It works fine with WPA(1) and WEP.
Any clue?

Using Karmic 9.10 kernel 2.6.31-16-generic and latest ipw2200 drivers

Thanks a lot.

Here are some info:

lspci
02:02.0 Network controller: Intel Corporation PRO/Wireless 2915ABG [Calexico2] Network Connection (rev 05)


lsmod:


lsmod | grep ipw2200
ipw2200 140292 0
libipw 43148 1 ipw2200
lib80211 6432 2 ipw2200,libipw


Route:

Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.255.255.192 U 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth1
default 10.0.0.1 0.0.0.0 UG 0 0 0 eth0



/etc/network$ iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

irda0 no wireless extensions.

eth1 unassociated Mode:Managed Frequency=2.467 GHz
Access Point: Not-Associated Bit Rate:0 kb/s Tx-Power=20 dBm
Sensitivity=8/0
Retry limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0



/etc/network$ sudo iwlist scan
lo Interface doesn't support scanning.

eth0 Interface doesn't support scanning.

irda0 Interface doesn't support scanning.

eth1 Scan completed :
Cell 01 - Address: 00:1F:C6:53:0E:17
ESSID:"karli"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.412 GHz (Channel 1)
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
Quality=41/100 Signal level=-76 dBm
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Extra: Last beacon: 4028ms ago
Cell 02 - Address: 00:02:CF:9B:F7:DA
ESSID:"WPK"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.417 GHz (Channel 2)
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
Quality=68/100 Signal level=-59 dBm
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
Extra: Last beacon: 1604ms ago
Cell 03 - Address: 00:02:CF:9B:F7:DB
ESSID:"VOIP"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.417 GHz (Channel 2)
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
Quality=70/100 Signal level=-58 dBm
Extra: Last beacon: 1604ms ago
Cell 04 - Address: 00:24:36:AE:0E:BF
ESSID:"UNYP"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.427 GHz (Channel 4)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 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
Quality=39/100 Signal level=-77 dBm
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
Extra: Last beacon: 13632ms ago
Cell 05 - Address: 06:24:36:AE:0E:BF
ESSID:"Peter Cizek's Guest Network"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.427 GHz (Channel 4)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 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
Quality=35/100 Signal level=-79 dBm
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
Extra: Last beacon: 3952ms ago
Cell 06 - Address: 00:1C:F0:48:A8:62
ESSID:"chameleoun"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.437 GHz (Channel 6)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 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
Quality=39/100 Signal level=-77 dBm
Extra: Last beacon: 3928ms ago
Cell 07 - Address: 00:B0:0C:42:2A:A0
ESSID:"Studna"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.437 GHz (Channel 6)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 11 Mb/s
9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Quality=33/100 Signal level=-80 dBm
IE: WPA Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
Extra: Last beacon: 3912ms ago
Cell 08 - Address: 00:E0:98:B7:38:A5
ESSID:"tauri"
Protocol:IEEE 802.11b
Mode:Master
Frequency:2.447 GHz (Channel 8)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s
Quality=41/100 Signal level=-76 dBm
Extra: Last beacon: 3824ms ago
Cell 09 - Address: 00:1B:2F:4D:5F:B0
ESSID:"SWAMP"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.462 GHz (Channel 11)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 9 Mb/s; 11 Mb/s
6 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Quality=51/100 Signal level=-70 dBm
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Extra: Last beacon: 1276ms ago
Cell 10 - Address: 00:24:01:90:E7:04
ESSID:"Marquez"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.462 GHz (Channel 11)
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; 48 Mb/s; 18 Mb/s; 24 Mb/s
36 Mb/s; 54 Mb/s
Quality=35/100 Signal level=-79 dBm
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Extra: Last beacon: 13456ms ago
Cell 11 - Address: XXX
ESSID:"APEIRON"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.467 GHz (Channel 12)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 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
Quality=85/100 Signal level=-33 dBm
IE: IEEE 802.11i/WPA2 Version 1
ESSID:"CARONTE"
Protocol:IEEE 802.11b
Mode:Master
Frequency:2.467 GHz (Channel 12)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s
Quality=64/100 Signal level=-62 dBm
Extra: Last beacon: 1256ms ago
Cell 13 - Address: 00:23:F8:8B:4D:C0
ESSID:"lotos111"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.447 GHz (Channel 8)
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
Quality=31/100 Signal level=-81 dBm
Extra: Last beacon: 3824ms ago
Cell 14 - Address: 00:23:F8:8B:4D:C1
ESSID:"VOIP"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.447 GHz (Channel 8)
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
Quality=33/100 Signal level=-80 dBm
Extra: Last beacon: 3864ms ago

/etc/network$ sudo lshw -C network
*-network:0
description: Wireless interface
product: PRO/Wireless 2915ABG [Calexico2] Network Connection
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:02:02.0
logical name: eth1
version: 05
serial: XXX
width: 32 bits
clock: 33MHz
capabilities: pm bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=ipw2200 driverversion=1.2.2kmprq firmware=ABG:9.0.5.27 (Dec 12 2007) latency=64 link=no maxlatency=24 mingnt=3 multicast=yes wireless=unassociated
resources: irq:11 memory:d0200000-d0200fff



sudo cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth1
iface eth1 inet dhcp
wpa-driver wext
wpa-conf managed
wpa-ssid APEIRON
wpa-ap-scan 2
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wpa-psk XXX



sudo ifdown -v eth1
Configuring interface eth1=eth1 (inet)
run-parts --verbose /etc/network/if-down.d
run-parts: executing /etc/network/if-down.d/avahi-autoipd
run-parts: executing /etc/network/if-down.d/upstart
run-parts: executing /etc/network/if-down.d/wpasupplicant
dhclient3 -r -pf /var/run/dhclient.eth1.pid -lf /var/lib/dhcp3/dhclient.eth1.leases eth1
There is already a pid file /var/run/dhclient.eth1.pid with pid 5338
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.2
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth1/XXX
Sending on LPF/eth1/XXX
Sending on Socket/fallback
DHCPRELEASE on eth1 to 172.16.0.1 port 67
ifconfig eth1 down
run-parts --verbose /etc/network/if-post-down.d
run-parts: executing /etc/network/if-post-down.d/avahi-daemon
run-parts: executing /etc/network/if-post-down.d/wireless-tools
run-parts: executing /etc/network/if-post-down.d/wpasupplicant




sudo ifup -v eth1
Configuring interface eth1=eth1 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
wpa_supplicant: wpa-driver wext
wpa_supplicant: /sbin/wpa_supplicant -s -B -P /var/run/wpa_supplicant.eth1.pid -i eth1 -D wext -C /var/run/wpa_supplicant
Starting /sbin/wpa_supplicant...
wpa_supplicant: sendsigs omission pidfile not created
wpa_supplicant: ctrl_interface socket located at /var/run/wpa_supplicant/eth1
wpa_supplicant: wpa-ap-scan 2 -- OK
wpa_supplicant: configuring network block -- 0
wpa_supplicant: wpa-ssid "APEIRON" -- OK
wpa_supplicant: wpa-psk ***** -- OK
wpa_supplicant: wpa-pairwise CCMP -- OK
wpa_supplicant: wpa-group CCMP -- OK
wpa_supplicant: wpa-key-mgmt WPA-PSK -- OK
wpa_supplicant: wpa-proto RSN -- OK
wpa_supplicant: enabling network block 0 -- OK

dhclient3 -e IF_METRIC=100 -pf /var/run/dhclient.eth1.pid -lf /var/lib/dhcp3/dhclient.eth1.leases eth1
Internet Systems Consortium DHCP Client V3.1.2
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth1/XXX
Sending on LPF/eth1/XXX
Sending on Socket/fallback
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
DHCPOFFER of 172.16.0.7 from 172.16.0.1
DHCPREQUEST of 172.16.0.7 on eth1 to 255.255.255.255 port 67
DHCPACK of 172.16.0.7 from 172.16.0.1
bound to 172.16.0.7 -- renewal in 16748 seconds.
run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/avahi-autoipd
run-parts: executing /etc/network/if-up.d/avahi-daemon
run-parts: executing /etc/network/if-up.d/ethtool
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/upstart
run-parts: executing /etc/network/if-up.d/wpasupplicant

staffann
December 12th, 2009, 06:40 AM
I had some problems when following the guide in the first post in this thread.

Although my Philips router uses WPA2, it uses wpa-groun TKIP and not CCMP. I realised that by the command iwlist wlan1 scan which gave the following result my network:



wlan1 Scan completed :
Cell 01 - Address: 00:1A:2A:2E:4D:BC
ESSID:"staffan"
Protocol:IEEE 802.11g
Mode:Managed
Frequency:2.437 GHz (Channel 6)
Quality:28/100 Signal level:-78 dBm Noise level:-96 dBm
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
12 Mb/s; 24 Mb/s; 36 Mb/s; 9 Mb/s; 18 Mb/s
48 Mb/s; 54 Mb/s
Extra:bcn_int=100
Extra:atim=0
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
Preauthentication Supported
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK



After that I could connect to the router but the dns servers didn't work. I still haven't been able to get dns running the way that is described in the post. Instead I manually edited resolv.conf and added my dns server there:

nameserver 192.168.1.2


That in combination with this interface file works:

auto lo
iface lo inet loopback

auto wlan1
iface wlan1 inet static
address 192.168.1.102
gateway 192.168.1.2
dns-nameservers 192.168.1.2
netmask 255.255.255.0
wpa-driver wext
wpa-ssid *MyNetwork*
wpa-ap-scan 1
wpa-proto RSN
wpa-pairwise CCMP
wpa-group TKIP
wpa-key-mgmt WPA-PSK
wpa-psk *MyCode*


Does anyone know why the dns-nameservers part of the interfaces file doesn't do its job? I use Ubuntu 9.10.

wieman01
December 12th, 2009, 11:05 AM
Please post the content of "/etc/resolv.conf".

Also could you ping your router please and see what happens?

staffann
December 12th, 2009, 11:25 AM
Is the question to me?
My /etc/resolv.conf was empty to start with. Now I've manually added my router as a dns server in that file. The content is shown in my previous post - there isn't anything else. The thing is that the howto in the first post doesn't say I have to add anything in resolv-conf. I thought the line "dns-nameservers 192.168.1.2" in the /etc/network/interface file should do the job but it didn't seem to work. Is it supposed to? Is the howto in the first post of this thread incorrect?

I could ping my router without problems. The problem was just with the dns.

Oh, and the reason I started manually editing these files was that the System->Preferences->Network Connections didn't work. It did sporadically but very unfrequently succeed to connect. I removed my network from there before adding things into the interface file.

wieman01
December 12th, 2009, 01:14 PM
Hi Staffann,

Yes, it was directed at you.

I think the problem has indeed something to do with resolv.conf. It a problem that I had before, therefore I was asking. Could you post the contents please?

I am pretty sure you are very close!

staffann
December 12th, 2009, 03:38 PM
Hi!
Before I edited it, it was empty. Now I've added the following line:
nameserver 192.168.1.2

This line makes the dns work.

wieman01
December 13th, 2009, 11:53 AM
Hi!
Before I edited it, it was empty. Now I've added the following line:
nameserver 192.168.1.2

This line makes the dns work.
That's exactly what I was going to get at. :-) The DNS needs an entry in this file and occasionally, it does not get updated.

Well done!

Alligator
December 21st, 2009, 01:46 PM
Stumped - I can't get the wireless to work. I'm using 9.10 and 9.04 wireless worked on a different network. i.e. the one at work, but I'm now retired. Wired works fine. I have a router/firewall from my IP with wireless capability.
The following is the suggested info from this post.

ronh@ronh-laptop:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
link-local * 255.255.0.0 U 0 0 0 wlan0

ronh@ronh-laptop:~$ iwconfig

wlan0 IEEE 802.11abgn ESSID:""
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Tx-Power=15 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0


ronh@ronh-laptop:~$ sudo iwlist scan

wlan0 Scan completed :
Cell 01 - Address: 00:1A:C4:63:F6:09
Channel:7
Frequency:2.442 GHz (Channel 7)
Quality=37/70 Signal level=-73 dBm
Encryption key:on
ESSID:"2WIRE762"
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
Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
Mode:Master
Extra:tsf=00000000b51a8181
Extra: Last beacon: 2870ms ago
IE: Unknown: 00083257495245373632
IE: Unknown: 010882848B0C12961824
IE: Unknown: 030107
IE: Unknown: 0706555320010B1B
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: Unknown: 2A0100
IE: Unknown: 32043048606C
Cell 02 - Address: 00:23:51:4C:6D:89
Channel:2
Frequency:2.417 GHz (Channel 2)
Quality=31/70 Signal level=-79 dBm
Encryption key:on
ESSID:"2WIRE795"
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
Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
Mode:Master
Extra:tsf=0000006422052306
Extra: Last beacon: 3230ms ago
IE: Unknown: 00083257495245373935
IE: Unknown: 010882848B0C12961824
IE: Unknown: 030102
IE: Unknown: 0706555320010B1B
IE: Unknown: 2A0100
IE: Unknown: 32043048606C


ronh@ronh-laptop:~$ sudo lshw -C network
*-network
description: Ethernet interface
product: NetXtreme BCM5764M Gigabit Ethernet PCIe
vendor: Broadcom Corporation
physical id: 0
bus info: pci@0000:02:00.0
logical name: eth0
version: 10
serial: 00:1d:72:ed:4a:9e
capacity: 1GB/s
width: 64 bits
clock: 33MHz
capabilities: pm vpd msi pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.99 firmware=5764m-v3.34 latency=0 link=no multicast=yes port=twisted pair
resources: irq:30 memory:f3000000-f300ffff
*-network
description: Wireless interface
product: Wireless WiFi Link 5100
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:03:00.0
logical name: wmaster0
version: 00
serial: 00:21:6b:06:45:0c
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list logical ethernet physical wireless
configuration: broadcast=yes driver=iwlagn latency=0 multicast=yes wireless=IEEE 802.11abgn
resources: irq:29 memory:f3100000-f3101fff
*-network DISABLED
description: Ethernet interface
physical id: 4
logical name: vboxnet0
serial: 0a:00:27:00:00:00
capabilities: ethernet physical
configuration: broadcast=yes multicast=yes

ronh@ronh-laptop:~$ sudo cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp
wpa-driver wext
wpa-ssid 00:1a:c4:63:f6:09
wpa-ap-scan 1
wpa-proto WPA RSN
wpa-pairwise TKIP CCMP
wpa-group TKIP CCMP
wpa-key-mgmt WPA-PSK
wpa-psk <my_code>

ronh@ronh-laptop:~$ sudo ifdown -v wlan0
Configuring interface wlan0=wlan0 (inet)
run-parts --verbose /etc/network/if-down.d
run-parts: executing /etc/network/if-down.d/50firestarter
* Stopping the Firestarter firewall...
...done.
* Starting the Firestarter firewall...
...fail!
run-parts: /etc/network/if-down.d/50firestarter exited with return code 2
run-parts: executing /etc/network/if-down.d/avahi-autoipd
run-parts: executing /etc/network/if-down.d/upstart
run-parts: executing /etc/network/if-down.d/wpasupplicant
dhclient3 -r -pf /var/run/dhclient.wlan0.pid -lf /var/lib/dhcp3/dhclient.wlan0.leases wlan0
There is already a pid file /var/run/dhclient.wlan0.pid with pid 2351
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.2
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/wlan0/00:21:6b:06:45:0c
Sending on LPF/wlan0/00:21:6b:06:45:0c
Sending on Socket/fallback
ifconfig wlan0 down
run-parts --verbose /etc/network/if-post-down.d
run-parts: executing /etc/network/if-post-down.d/avahi-daemon
run-parts: executing /etc/network/if-post-down.d/wireless-tools
run-parts: executing /etc/network/if-post-down.d/wpasupplicant
wpa_supplicant: terminating wpa_supplicant daemon via pidfile /var/run/wpa_supplicant.wlan0.pid
Stopped /sbin/wpa_supplicant (pid 1176).


ronh@ronh-laptop:~$ sudo ifup -v wlan0
Configuring interface wlan0=wlan0 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
wpa_supplicant: wpa-driver wext
wpa_supplicant: /sbin/wpa_supplicant -s -B -P /var/run/wpa_supplicant.wlan0.pid -i wlan0 -D wext -C /var/run/wpa_supplicant
Starting /sbin/wpa_supplicant...
wpa_supplicant: sendsigs omission pidfile not created
wpa_supplicant: ctrl_interface socket located at /var/run/wpa_supplicant/wlan0
wpa_supplicant: wpa-ap-scan 1 -- OK
wpa_supplicant: configuring network block -- 0
wpa_supplicant: wpa-ssid "00:1a:c4:63:f6:09" -- OK
wpa_supplicant: wpa-psk ***** -- OK
wpa_supplicant: wpa-pairwise TKIP CCMP -- OK
wpa_supplicant: wpa-group TKIP CCMP -- OK
wpa_supplicant: wpa-key-mgmt WPA-PSK -- OK
wpa_supplicant: wpa-proto WPA RSN -- OK
wpa_supplicant: enabling network block 0 -- OK

dhclient3 -e IF_METRIC=100 -pf /var/run/dhclient.wlan0.pid -lf /var/lib/dhcp3/dhclient.wlan0.leases wlan0
Internet Systems Consortium DHCP Client V3.1.2
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/wlan0/00:21:6b:06:45:0c
Sending on LPF/wlan0/00:21:6b:06:45:0c
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/50firestarter
* Stopping the Firestarter firewall...
...done.
* Starting the Firestarter firewall...
...fail!
run-parts: /etc/network/if-up.d/50firestarter exited with return code 2
run-parts: executing /etc/network/if-up.d/avahi-autoipd
run-parts: executing /etc/network/if-up.d/avahi-daemon
run-parts: executing /etc/network/if-up.d/ethtool
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/upstart
run-parts: executing /etc/network/if-up.d/wpasupplicant

ronh@ronh-laptop:~$ uname -a
Linux ronh-laptop 2.6.31-16-generic #53-Ubuntu SMP Tue Dec 8 04:02:15 UTC 2009 x86_64 GNU/Linux

ronh@ronh-laptop:~$ sudo dhclient wlan0
Internet Systems Consortium DHCP Client V3.1.2
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/wlan0/00:21:6b:06:45:0c
Sending on LPF/wlan0/00:21:6b:06:45:0c
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
No DHCPOFFERS received.
No working leases in persistent database - sleeping.


Firewall is Firestarter

Network settings
Internet detect devices wlan0
Local network connected devices wlan0

enable DHCP

keep existing DHCP configuration

ronh@ronh-laptop:~$ cat /etc/resolv.conf
# Generated by NetworkManager

wieman01
December 21st, 2009, 05:40 PM
Hello Alligator,

I have been using WICD for a while which you find in the repositories. Would this be an option for you? Or do you need a command line configuration?

Alligator
December 22nd, 2009, 10:35 AM
I will give this a try. Thank you.

wieman01
December 22nd, 2009, 01:39 PM
I will give this a try. Thank you.
It's the most obvious solution if everything fails at the moment. Give it a go and let me know if it works out for you.

Alligator
December 28th, 2009, 12:06 AM
It doesn't work. I get an error message - unable to find ip address.

lightsabersetc
January 16th, 2010, 05:46 PM
Hey everyone, I have been working on this for a while now and am absolutely stumped. Basically, what i am attempting to do is make my ubuntu box into a gateway for my network. I have everything working thru hard wire, but I simply cant get the wireless to work. No matter what I do, I cannot get my wireless card to transmit an essid and allow nodes to connect. I have tried assigning it in the interfaces file (shown below), and I have also tried manually modifying it using the iwconfig command. Here is the topology:
eth1: internet WAN
eth2: ethernet out to LAN
ra0: wireless out to LAN

Here is a copy of my /etc/network/interfaces file:

auto lo
iface lo inet loopback
auto eth2
iface eth2 inet static
address 192.168.0.102
netmask 255.255.255.0
broadcast 192.168.0.0
network 192.168.0.0
auto eth1
iface eth1 inet dhcp

auto ra0
iface ra0 inet static
address 192.168.2.102
netmask 255.255.255.0
broadcast 192.168.2.0
network 192.168.2.0
#wireless-mode Ad-Hoc
#wireless-essid laz
wpa-driver wext
wpa-ssid las
wpa-ap-scan 1
wpa-proto WPA RSN
wpa-pairwise TKIP CCMP
wpa-group TKIP CCMP
wpa-key-mgmt WPA-PSK
wpa-psk 56a72e371fd87baef20cda1a198f2972e479890dbe982ed336 de33293c20d891 [CODE]

route command:
[CODE]Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 * 255.255.255.0 U 0 0 0 ra0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth2
98.160.136.0 * 255.255.252.0 U 0 0 0 eth1
link-local * 255.255.0.0 U 1000 0 0 eth2
default ip98-160-136-1. 0.0.0.0 UG 100 0 0 eth1

ifconfig:
eth1 Link encap:Ethernet HWaddr 00:1a:66:4b:51:b0
inet addr:98.160.137.113 Bcast:98.160.139.255 Mask:255.255.252.0
inet6 addr: fe80::21a:66ff:fe4b:51b0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:890686 errors:744 dropped:0 overruns:0 frame:744
TX packets:614991 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1068172509 (1.0 GB) TX bytes:73325990 (73.3 MB)

eth2 Link encap:Ethernet HWaddr 00:25:11:73:89:75
inet addr:192.168.0.102 Bcast:192.168.0.0 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:26 Base address:0xe000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:542 errors:0 dropped:0 overruns:0 frame:0
TX packets:542 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:56456 (56.4 KB) TX bytes:56456 (56.4 KB)

ra0 Link encap:Ethernet HWaddr 00:1a:ef:07:4b:4a
inet addr:192.168.2.102 Bcast:192.168.2.0 Mask:255.255.255.0
inet6 addr: fe80::21a:efff:fe07:4b4a/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:5416 errors:0 dropped:0 overruns:0 frame:0
TX packets:8712 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:599565 (599.5 KB) TX bytes:0 (0.0 B)
Interrupt:22

ifdown -v ra0 && ifup -v ra0:

Configuring interface ra0=ra0 (inet)
run-parts --verbose /etc/network/if-down.d
run-parts: executing /etc/network/if-down.d/avahi-autoipd
run-parts: executing /etc/network/if-down.d/clamav-freshclam-ifupdown
run-parts: executing /etc/network/if-down.d/openvpn
run-parts: executing /etc/network/if-down.d/upstart
run-parts: executing /etc/network/if-down.d/wpasupplicant

ifconfig ra0 down
run-parts --verbose /etc/network/if-post-down.d
run-parts: executing /etc/network/if-post-down.d/avahi-daemon
run-parts: executing /etc/network/if-post-down.d/bridge
run-parts: executing /etc/network/if-post-down.d/wireless-tools
run-parts: executing /etc/network/if-post-down.d/wpasupplicant
wpa_supplicant: terminating wpa_supplicant daemon via pidfile /var/run/wpa_supplicant.ra0.pid
Stopped /sbin/wpa_supplicant (pid 31784).
wpa_supplicant: removing /lib/init/rw/sendsigs.omit.d/wpasupplicant.wpa_supplicant.ra0.pid
Configuring interface ra0=ra0 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/bridge
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
wpa_supplicant: wpa-driver wext
wpa_supplicant: /sbin/wpa_supplicant -s -B -P /var/run/wpa_supplicant.ra0.pid -i ra0 -D wext -C /var/run/wpa_supplicant
Starting /sbin/wpa_supplicant...
wpa_supplicant: creating sendsigs omission pidfile: /lib/init/rw/sendsigs.omit.d/wpasupplicant.wpa_supplicant.ra0.pid
wpa_supplicant: ctrl_interface socket located at /var/run/wpa_supplicant/ra0
wpa_supplicant: wpa-ap-scan 1 -- OK
wpa_supplicant: configuring network block -- 0
wpa_supplicant: wpa-ssid "las" -- OK
wpa_supplicant: wpa-psk ***** -- OK
wpa_supplicant: wpa-pairwise TKIP CCMP -- OK
wpa_supplicant: wpa-group TKIP CCMP -- OK
wpa_supplicant: wpa-key-mgmt WPA-PSK -- OK
wpa_supplicant: wpa-proto WPA RSN -- OK
wpa_supplicant: enabling network block 0 -- OK

ifconfig ra0 192.168.2.102 netmask 255.255.255.0 broadcast 192.168.2.0 up

run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/avahi-autoipd
run-parts: executing /etc/network/if-up.d/avahi-daemon
run-parts: executing /etc/network/if-up.d/clamav-freshclam-ifupdown
run-parts: executing /etc/network/if-up.d/ethtool
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/openssh-server
run-parts: executing /etc/network/if-up.d/openvpn
run-parts: executing /etc/network/if-up.d/upstart
run-parts: executing /etc/network/if-up.d/wpasupplicant


Last, but not least-iwconfig:
lo no wireless extensions.

eth2 no wireless extensions.

ra0 RT2860 Wireless ESSID:"" Nickname:"RT2860STA"
Mode:Auto Frequency=2.437 GHz Bit Rate=1 Mb/s
RTS thr:off Fragment thr:off
Encryption key:off
Link Quality=10/100 Signal level:0 dBm Noise level:-87 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

eth1 no wireless extensions.


During the ifup command, you can even see where the system "successfully" assigns the essid and psk to the device. Am i missing a step somewhere or is my syntax just incorrect? Any help would be greatly appreciated :)

gregkane
January 25th, 2010, 07:20 PM
I've been struggling to get a laptop working with ubunto 9.10 since last week. The install left me with no ip connectivity. The wired jack is either malfunctioning or my Gig switch and this laptop just can't auto negotiated to 100Mbs.

Anyway I've read a good bit of this thread and applied the recommended wpa config for WPA2. The only change is that "dmesg" tells me that my wlan1 interface is using the "arusb-xp" ndis driver.

when I restarted the network it tells me:
...wpa-supplicant /sbin/wpa_supplicant daemon failed to start run-parts /etc/network/if-pre-up.d/wpasupplicant exited with return code 1

iwconfig shows wlan1 active

ifconfig shows wlan1 OK and that is has the static IP I assigned

sudo iwlist scan shows wlan1 up and active on 2 bands

any ideas?

Thanks

savyboy24
February 16th, 2010, 10:17 PM
Will the first page of this guide work for my linksys wpc45g ver 2 wireless card, on Ubuntu 8.04.4 Hardy, on a old dell latitude?

boubbin
February 17th, 2010, 11:01 AM
Hello,

I managed to get this thing working.
I have one problem tho:
The icon next to my clock (nm-applet but in kubuntu) wont show the signal or any other information anymore. This also means that i cannot connect to any other wifi network besides the one spesified in interfaces file.

The only way to connect to internet is now via this interface i made

EDIT: I also found out that boot will take 10s longer cause of the dhcp request that is made to my router.

How to fix this ?

wieman01
February 17th, 2010, 02:24 PM
EDIT: I also found out that boot will take 10s longer cause of the dhcp request that is made to my router.

How to fix this ?

You could use a static IP address instead.

boubbin
February 17th, 2010, 06:38 PM
You could use a static IP address instead.
ok, thats not really a concern, but how bout when im outside of my home and i cant use the network applet to select another wifi network... that is my problem

wieman01
February 18th, 2010, 04:52 PM
ok, thats not really a concern, but how bout when im outside of my home and i cant use the network applet to select another wifi network... that is my problem
Then I would not follow this approach, but only use the network applet. It is able to handle WPA security, you don't need this tutorial in fact.

savyboy24
February 18th, 2010, 09:10 PM
Wieman any idea what I should do about not getting a WPA signal on my Dell laptop? http://ubuntuforums.org/showthread.php?t=1406854

NFAD
April 11th, 2010, 02:00 PM
I'm new to Ubuntu, and I have been trying for 2 weeks to get an wireless internet connection and a private LAN connection working with iptables and MAC spoofing. I FINALLY got it working and I wanted to post my solution somewhere, so I decided here because this thread helped me the most.


Completely remove Network Manager or Wicd.

sudo aptitude remove network-manager
sudo aptitude purge network-manager

Follow the instructions in this post.
Broadcast and network are not needed.
IMPORTANT: Ensure your netmasks are different!!!
I am also using pre-up to load macchanger and iptables before any of the network settings are applied. Macchanger automatically spoofs my mac address before iptables is brought up. The order of the pre-up's are very important!

# loopback interface
auto lo
iface lo inet loopback

# Marvell
auto eth0
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.248

# D-link
auto wlan0
iface wlan0 inet static
address 10.0.0.11
netmask 255.255.255.0
gateway 10.0.0.1
wpa-driver wext
wpa-ssid BLAH
wpa-ap-scan 1
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wpa-psk BLAH
pre-up macchanger -a wlan0
pre-up iptables-restore < /etc/iptables.rulesiptables: https://help.ubuntu.com/community/IptablesHowTo

macchanger: http://linux.die.net/man/1/macchanger

derelict888
April 15th, 2010, 01:03 PM
Hey Wieman thanks for that howto, lots there and I've almost got myself setup. I've got a server (no gui) that I'm trying to move from wired to wireless networking (dont ask). I think I have it setup but wireless only works when wired is on and active. Here is my /etc/network/interfaces;
# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo

iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.11
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.1
dns-search [domain]

# WiFi Adapter
auto ath0
iface ath0 inet static
address 192.168.1.10
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.1
dns-search [domain]
wpa-driver madwifi
wpa-ssid Derelict
wpa-ap-scan 1
wpa-proto RSN
wpa-pairwise TKIP
wpa-group TKIP
wpa-key-mgmt WPA-PSK
wpa-psk X.......this is correct.........X

I created a script to restart network when the server starts up, since I was having trouble with WiFi not starting up correctly. So here is iwconfig on my server;
iwconfig ath0
ath0 IEEE 802.11g ESSID:"Derelict" Nickname:""
Mode:Managed Frequency:2.437 GHz Access Point: 00:40:10:10:00:03
Bit Rate:24 Mb/s Tx-Power:18 dBm Sensitivity=1/1
Retry:off RTS thr:off Fragment thr:off
Encryption key:A2AA-4A9E-B452-E812-5F30-6D3E-46C4-32C8 Security mode:restricted
Power Management:off
Link Quality=51/70 Signal level=-45 dBm Noise level=-96 dBm
Rx invalid nwid:221457 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

So it looks like its working and I can see that MAC address on my router. However if I disconnect ethernet from my server, or if I comment out the eth0 section of my /etc/network/interfaces and restart the server, I get nothing. Any ideas? Here are the "stumped" troubleshooting results;
root@media-server:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
localnet * 255.255.255.0 U 0 0 0 eth0
localnet * 255.255.255.0 U 0 0 0 ath0
default 192.168.1.1 0.0.0.0 UG 100 0 0 ath0
default 192.168.1.1 0.0.0.0 UG 100 0 0 eth0
root@media-server:~# iwconfig
lo no wireless extensions.

eth1 no wireless extensions.

eth0 no wireless extensions.

wifi0 no wireless extensions.

ath0 IEEE 802.11g ESSID:"Derelict" Nickname:""
Mode:Managed Frequency:2.437 GHz Access Point: 00:40:10:10:00:03
Bit Rate:54 Mb/s Tx-Power:18 dBm Sensitivity=1/1
Retry:off RTS thr:off Fragment thr:off
Encryption key:**F3-**A0-**DA-**86-**15-**1F-**AB-**27 Security mode:restricted
Power Management:off
Link Quality=51/70 Signal level=-45 dBm Noise level=-96 dBm
Rx invalid nwid:222357 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

root@media-server:~# iwlist scan
lo Interface doesn't support scanning.

eth1 Interface doesn't support scanning.

eth0 Interface doesn't support scanning.

wifi0 Interface doesn't support scanning.

ath0 Scan completed :
Cell 01 - Address: **:**:**:**:AB:F2
ESSID:"Vesta"
Mode:Master
Frequency:2.462 GHz (Channel 11)
Quality=3/70 Signal level=-92 dBm Noise level=-95 dBm
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
12 Mb/s; 48 Mb/s
Extra:bcn_int=100
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK

Cell 03 - Address: 00:40:10:10:00:03
ESSID:"Derelict"
Mode:Master
Frequency:2.437 GHz (Channel 6)
Quality=50/70 Signal level=-45 dBm Noise level=-95 dBm
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
12 Mb/s; 48 Mb/s
Extra:bcn_int=100
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK

root@media-server:~# lshw -C network
*-network:0
description: Wireless interface
product: AR5212/AR5213 Multiprotocol MAC/baseband processor
vendor: Atheros Communications Inc.
physical id: 6
bus info: pci@0000:05:06.0
logical name: wifi0
version: 01
serial: **:**:**:**:2c:d4
width: 32 bits
clock: 33MHz
capabilities: pm bus_master cap_list logical ethernet physical wireless
configuration: broadcast=yes driver=ath_pci ip=192.168.1.10 latency=168 maxlatency=28 mingnt=10 module=ath_pci multicast=yes wireless=IEEE 802.11g
*-network:1 DISABLED
description: Ethernet interface
product: 88E8001 Gigabit Ethernet Controller
vendor: Marvell Technology Group Ltd.
physical id: c
bus info: pci@0000:05:0c.0
logical name: eth1
version: 13
serial: **:**:**:**:c1:67
capacity: 1GB/s
width: 32 bits
clock: 66MHz
capabilities: pm vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=skge driverversion=1.13 firmware=N/A latency=32 link=no maxlatency=31 mingnt=23 module=skge multicast=yes port=twisted pair

I actually have 2 wired NICs, not sure why the other didn't show - 192.168.1.11 isn't showing. Oh well...

EDIT: I see that my driver from lshw shows ath_pci but I'm specifying madwifi, that the cause?

derelict888
April 19th, 2010, 04:56 PM
Anyone? Bueler?

I changed the driver from madwifi to ath_pci but that didn't change anything.
:confused:

derelict888
April 19th, 2010, 11:39 PM
Figured it out, I had to drop my eth0 routes. If anyone needs the syntax I used I can dig it up.

padapada
May 31st, 2010, 02:09 PM
Just wanted to let you know that I finally have succes.

Network-manager is finally working for me:
- Lucid
- WPA2-PSK
- Intel 4965AGN

I could not work network-manager before, so managed=false in nm-system-settings.conf and
this in /etc/network/interfaces:
auto wlan0
iface wlan0 inet dhcp
wpa-driver wext
wpa-ssid <my-ssid>
wpa-ap-scan 1
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wpa-psk <my-psk>

prupert
June 25th, 2010, 11:47 AM
I wrote a little How To on my blog based on this guide, but for Lucid, since that is what many people are running now:

http://www.prupert.co.uk/2010/06/25/how-to-configure-wireless-wifi-networking-in-ubuntu-via-the-command-line-cli/ (http://www.prupert.co.uk/2010/06/25/how-to-configure-wireless-wifi-networking-in-ubuntu-via-the-command-line-cli/)

BriarHood
July 6th, 2010, 10:20 PM
I am having similar issues. After entering


lspci -v | grep -i Network
sudo lshw -C network

This is what I have

*-network
description: Ethernet interface
product: NetXtreme BCM5751 Gigabit Ethernet PCI Express
vendor: Broadcom Corporation
physical id: 0
bus info: pci@0000:02:00.0
logical name: eth0
version: 01
serial: 00:12:3f:1a:57:8e
size: 100MB/s
capacity: 1GB/s
width: 64 bits
clock: 33MHz
capabilities: pm vpd msi pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.102 duplex=full firmware=5751-v3.29a ip=68.3.54.55 latency=0 link=yes multicast=yes port=twisted pair speed=100MB/s
resources: irq:16 memory:dfdf0000-dfdfffff
*-network
description: Instant Wireless Network PC Card
product: ISL37300P
vendor: The Linksys Group, Inc.
physical id: 0
version: RevA
slot: Socket 0
resources: irq:3
*-network
description: Wireless interface
physical id: 2
logical name: eth1
serial: 00:06:25:0b:80:9a
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=orinoco driverversion=0.15 firmware=Intersil 1.4.2 link=no multicast=yes wireless=IEEE 802.11b

One light is solid, the other is blinking. Network manager recognizes it because wireless networks is accessible, but no networks show up, even when I know I am near them. I have no idea what to do and have tried almost everything I could find. Many reinstalls later, I'm stuck in the same position. Can anyone help?

jarviser
July 7th, 2010, 04:42 AM
If that is a laptop with a PCMCIA Linksys Instant wifi card see here http://manpages.ubuntu.com/manpages/lucid/man4/if_wi.4freebsd.html

iSpyCreativity
August 15th, 2010, 12:16 PM
Some users reported (including myself) that the network has to be restarted every time after startup... Apparently this is a bug.

Here is a workaround that helps restart the network during boot so that one does not have to do it manually after logging on to the system.

Create startup script:

Add this line & save file:

Change permission (executable):

Create symbolic link:

[Note: You may have to choose a boot sequence other than S40.]

Restart...

I'm new to all this Ubuntu malarkey, and followed these steps through curiosity but instead of auto connecting to a wifi connection like I'd hopes it attempts to but never succeeds; so I end up having to manually disconnect the attempt and then manually connect to the desired router. Could someone please walk me through back tracking these changes?

It would be greatly appreciated, thanks in advance.

jarviser
August 15th, 2010, 01:31 PM
If you are referring to this...

Create startup script:
Quote:
sudo gedit /etc/init.d/wireless-network
Add this line & save file:
Quote:
/etc/init.d/networking restart
Change permission (executable):
Quote:
sudo chmod +x /etc/init.d/wireless-network
Create symbolic link:
Quote:
sudo ln -s /etc/init.d/wireless-network /etc/rcS.d/S40wireless-network
[Note: You may have to choose a boot sequence other than S40.]

Then firstly (if you are new to Linux) I would suggest not running scripts opr fixes that were written in 2006 - a lot has happened since then, including this being unnecessary in latest Ubuntu. WPA works out of the box in 9.xx and 10.04

Secondly you should have printed the whole thing as it was 180 pages ago and took some finding

Thirdly you need to remove the symbolic link by

sudo rm /etc/rcS.d/S40wireless-network

finally delete the extra line in the script you edited

sudo gedit /etc/init.d/wireless-network and delete the line . If it was the only line
then delete the whole script.

No guarantees this will work or is safe.

wieman01
August 16th, 2010, 04:05 PM
Maybe we should really have this thread closed by the admins. Not sure if it's still relevant...

wieman01
August 16th, 2010, 04:05 PM
Maybe we should really have this thread closed by the admins. Not sure if it's still relevant...

iSpyCreativity
August 16th, 2010, 06:24 PM
If you are referring to this...

Create startup script:
Quote:
sudo gedit /etc/init.d/wireless-network
Add this line & save file:
Quote:
/etc/init.d/networking restart
Change permission (executable):
Quote:
sudo chmod +x /etc/init.d/wireless-network
Create symbolic link:
Quote:
sudo ln -s /etc/init.d/wireless-network /etc/rcS.d/S40wireless-network
[Note: You may have to choose a boot sequence other than S40.]

Then firstly (if you are new to Linux) I would suggest not running scripts opr fixes that were written in 2006 - a lot has happened since then, including this being unnecessary in latest Ubuntu. WPA works out of the box in 9.xx and 10.04

Secondly you should have printed the whole thing as it was 180 pages ago and took some finding

Thirdly you need to remove the symbolic link by

sudo rm /etc/rcS.d/S40wireless-network

finally delete the extra line in the script you edited

sudo gedit /etc/init.d/wireless-network and delete the line . If it was the only line
then delete the whole script.

No guarantees this will work or is safe.

Thanks for the tips ;)

mrmylanman
December 4th, 2010, 09:51 AM
Hey all;

I am attempting to get my wireless interface to work on my laptop (seeing how far I can go without GUI!) and it isnt associating with the access point. Here is the output of the commands listed in the OP:

Note, the AP I am trying to connect to is "wireless".

Log of route
Sat Dec 4 08:25:50 2010

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
link-local * 255.255.0.0 U 1000 0 0 eth1
default 192.168.1.1 0.0.0.0 UG 100 0 0 eth1

Log of iwconfig
Sat Dec 4 08:26:26 2010

lo no wireless extensions.

eth0 no wireless extensions.

eth1 IEEE 802.11 Access Point: Not-Associated
Link Quality:5 Signal level:0 Noise level:166
Rx invalid nwid:0 invalid crypt:0 invalid misc:0

Log of sudo iwlist scan
Sat Dec 4 08:27:55 2010

lo Interface doesn't support scanning.

eth0 Interface doesn't support scanning.

eth1 Scan completed :
Cell 01 - Address: 00:22:75:B2:F1:1C
ESSID:"wireless"
Mode:Managed
Frequency:2.452 GHz (Channel 9)
Quality:5/5 Signal level:-30 dBm Noise level:-91 dBm
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 9 Mb/s
18 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 12 Mb/s
24 Mb/s; 48 Mb/s
Cell 02 - Address: 0C:D5:02:17:F9:0B
ESSID:"westell8057"
Mode:Managed
Frequency:2.437 GHz (Channel 6)
Quality:1/5 Signal level:-85 dBm Noise level:-83 dBm
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
12 Mb/s; 48 Mb/s

Log of sudo lshw -C network
Sat Dec 4 08:30:03 2010

*-network
description: Wireless interface
product: BCM4322 802.11a/b/g/n Wireless LAN Controller
vendor: Broadcom Corporation
physical id: 0
bus info: pci@0000:02:00.0
logical name: eth1
version: 01
serial: 00:26:5e:81:61:68
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=wl0 driverversion=5.60.48.36 ip=192.168.1.195 latency=0 multicast=yes wireless=IEEE 802.11abgn
resources: irq:18 memory:f0200000-f0203fff
*-network DISABLED
description: Ethernet interface
product: RTL8101E/RTL8102E PCI Express Fast Ethernet controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:08:00.0
logical name: eth0
version: 02
serial: 00:21:cc:3b:f2:29
size: 10MB/s
capacity: 100MB/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half latency=0 link=yes multicast=yes port=MII speed=10MB/s
resources: irq:43 ioport:a000(size=256) memory:f0410000-f0410fff memory:f0400000-f040ffff memory:f0420000-f043ffff

auto lo
iface lo inet loopback

#auto eth0
#iface eth0 inet dhcp

auto eth1
iface eth1 inet static
address 192.168.1.195
gateway 192.168.1.1
dns-nameservers 8.8.8.8
netmask 255.255.255.0
wpa-driver wext
wpa-ssid wireless
wpa-ap-scan 1
wpa-proto RSN
wpa-pairwise TKIP CCMP
wpa-group TKIP CCMP
wpa-key-mgmt WPA-PSK
wpa-psk 4d654660a791a199f0aaabb5a961f37e24507903e270ebd736 b50eb63e9e82ef

Log of sudo ifdown -v eth1
Sat Dec 4 08:30:52 2010

Configuring interface eth1=eth1 (inet)
run-parts --verbose /etc/network/if-down.d
run-parts: executing /etc/network/if-down.d/avahi-autoipd
run-parts: executing /etc/network/if-down.d/upstart
run-parts: executing /etc/network/if-down.d/wpasupplicant
route del default gw 192.168.1.1 metric 100 eth1
ifconfig eth1 down
run-parts --verbose /etc/network/if-post-down.d
run-parts: executing /etc/network/if-post-down.d/avahi-daemon
run-parts: executing /etc/network/if-post-down.d/wireless-tools
run-parts: executing /etc/network/if-post-down.d/wpasupplicant
wpa_supplicant: terminating wpa_supplicant daemon via pidfile /var/run/wpa_supplicant.eth1.pid
Stopped /sbin/wpa_supplicant (pid 1991).
wpa_supplicant: removing /lib/init/rw/sendsigs.omit.d/wpasupplicant.wpa_supplicant.eth1.pid

Log of sudo ifup -v eth1
Sat Dec 4 08:31:01 2010

Configuring interface eth1=eth1 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
wpa_supplicant: wpa-driver wext
wpa_supplicant: /sbin/wpa_supplicant -s -B -P /var/run/wpa_supplicant.eth1.pid -i eth1 -D wext -C /var/run/wpa_supplicant
wpa_supplicant: creating sendsigs omission pidfile: /lib/init/rw/sendsigs.omit.d/wpasupplicant.wpa_supplicant.eth1.pid
wpa_supplicant: ctrl_interface socket located at /var/run/wpa_supplicant/eth1
wpa_supplicant: wpa-ap-scan 1 -- OK
wpa_supplicant: configuring network block -- 0
wpa_supplicant: wpa-ssid "wireless" -- OK
wpa_supplicant: wpa-psk ***** -- OK
wpa_supplicant: wpa-pairwise TKIP CCMP -- OK
wpa_supplicant: wpa-group TKIP CCMP -- OK
wpa_supplicant: wpa-key-mgmt WPA-PSK -- OK
wpa_supplicant: wpa-proto RSN -- OK
wpa_supplicant: enabling network block 0 -- OK

ifconfig eth1 192.168.1.195 netmask 255.255.255.0 up
route add default gw 192.168.1.1 metric 100 eth1
run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/avahi-autoipd
run-parts: executing /etc/network/if-up.d/avahi-daemon
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/upstart
run-parts: executing /etc/network/if-up.d/wpasupplicant

Thanks so much I hope I can get this to work without relying on networkmanager (it works using that, btw. I removed it before doing this tutorial).

mrmylanman
December 4th, 2010, 08:39 PM
Update I got it working! Thanks again for the walkthrough. I screwed up the WPA psk. I put the SSID and passphrase in backwards I think

Gourmand
December 6th, 2010, 08:14 AM
Please help me. On my desktop runs WinXP Pro with D-Link DWA-125 USB WiFi dongle. It tethers Inet as Ad-Hoc with WPA2-PSK and AES. Android device connects well with these settings. But Linux on handheld cannot connect in Network Manager. I tried use your method. This is my /etc/network/interfaces file:


auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.0.3
gateway 10.64.202.150
dns-nameservers XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX
netmask 255.255.255.0
wpa-driver wext
wpa-ssid <AP-name>
wpa-ap-scan 2
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wpa-psk <longkey>


But when I try restart network I get error message from ifup:


* Reconfigyring network interfaces
ioctl[SI0CSIWPMKSA]:Invalid argument *1
ioctl[SI0CSIWPMKSA]:Invalid argument *1
SI0CADDRT: Network is unreachabe *2
Failed to bring up eth0 *2


I tried use DHCP instead of static IP - looks like Wi-Fi authentication passes well. I can see connected device MAC address in Wi-Fi list. *2 messages with DHCP didn't appear. But *1 messages appeared too. But Wi-Fi connection can't get dynamic IP (probably provider limitation). As I told Android device works well with static IP.

Gourmand
December 6th, 2010, 08:40 AM
Hmmm... iwconfig tells:

eth0 MRVL-SD8686 ESSID:<SSID> [2]
Mode:Managed Frequency:2.412 GHz Access Point: <MAC>
Bit Rate:54 Mb/s
Encryption key:<too big> Security mode:open
^^^^^^^^^^^^^^^^^^^^^^^^
Power Management:on
Link Quality=100/100 Signal level=0 dBm Noise level=-96 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:105
Tx excessive retries:77 Invalid misc:234 Missed beacon:0

what's wrong with security key? I've got it following topic instructions... or it's just too big to show?

and why "Security mode: open"?

Gourmand
December 6th, 2010, 08:53 AM
Then if I try DHCP:

auto eth0
#iface eth0 inet static
iface eth0 inet dhcp
#addresss 192.168.0.3
#gateway 10.64.202.150
#dns-nameservers <...>
#netmask 255.255.255.0
wpa-driver wext
wpa-ssid <...>
wpa-ap-scan 2
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wpa-psk <...>


What happiness:


* Reconfiguring network interfaces... ioctl[SIOCSIWPMKSA]: Invalid argument
ioctl[SIOCSIWPMKSA]: Invalid argument
There is already a pid file /var/run/dhclient.eth0.pid with pid 18093
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.2
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:27:13:f0:25:2f
Sending on LPF/eth0/00:27:13:f0:25:2f
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 1
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

314ttus
January 15th, 2011, 11:27 AM
@weiman01,

...
auto wlan0
iface wlan0 inet static
wpa-driver wext (tried ndiswrapper also)
wpa-conf managed
wpa-ssid <my_essid>
wpa-ap-scan 2
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wpa-psk <my_64_hex_key>
address 192.168.168.40
netmask 255.255.255.0
network 192.168.168.0
broadcast 192.168.168.255
gateway 192.168.168.230
dns-nameservers 192.168.168.230

...
/etc/init.d/network restart
...

squibt

Perfect! Thank you so much! Straight forward and simply working!
Peter

tioneb
September 5th, 2011, 03:59 PM
Some users reported (including myself) that the network has to be restarted every time after startup... Apparently this is a bug.

Here is a workaround that helps restart the network during boot so that one does not have to do it manually after logging on to the system.

Create startup script:

Add this line & save file:

Change permission (executable):

Create symbolic link:

[Note: You may have to choose a boot sequence other than S40.]

Restart...



Hey all,

Thanks to this great HOW-TO the wireless network is operational.
Nevertheless I'm struggling with the boot sequence.

It works at boot up if I stop the server with init 0
It doesn't if I restart with init 6

I created a link in /etc/rcS.d/S90**** to restart the networking

I'm with the server version 11.4

Thanks for any help

needDrivers
December 5th, 2011, 05:41 AM
Simple WLAN configuration script
http://hencvik.googlecode.com/files/wlan-config.sh

$ wget http://hencvik.googlecode.com/files/wlan-config.sh
$ chmod a+rx wlan-config.sh
$ sudo ./wlan-config.sh

tech_ninja
February 24th, 2012, 07:29 AM
After following your instructions to the letter, I've successfully enabled a wifi connection with wpa2 aes on my box running ubuntu server 11.10. Thanks

wieman01
February 24th, 2012, 03:49 PM
After following your instructions to the letter, I've successfully enabled a wifi connection with wpa2 aes on my box running ubuntu server 11.10. Thanks
Wow, I am amazed the tutorial still does the job after so many years. Oh well, I got more gray hair, but WPA2 is still the same.

sgtzim
February 27th, 2012, 10:28 AM
All right, this is driving me batty.

I have a dual-boot Ubuntu, 11.10 desktop and 11.10 server. The desktop connects to my WAP with no trouble, but I can't get the server to connect.

I'm broadcasting my essid and using wpa2 personal with psk

interfaces looks like this:
auto wlan0
iface wlan0 inet static
address 192.168.1.6
netmask 255.255.255.0
gateway 192.168.1.1
network 192.168.1.0
broadcast 192.168.1.255
wpa-driver wext
wpa-ssid NETWORKNAME
wpa-ap-scan 1
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wpa-psk *64 bit hex number*


iwconfig returns this:
wlan0 802.11b/g link ESSID: "NETWORKNAME"
Mode: managed frequency 2.463 GHz Access Point: (it's the right MAC address)
Bit Rate=54 Mb/s
Retry: on RTS thr: off Fragment thr: off
Encryption key: off
Power Management: off
Link Quality = 73/100 Signal level= -44 dBm Noise level= -102 dBm
Rx invalid nwid: 0 Rx invalid crypt: 0 Rx invalid frag: 0
Tx excessive retries: 0 Invalid misc: 0 Missed beacon: 0


So....I'm seeing the WAP from the server, I'm just not connecting. I've triple-checked the PSK.

I'm sure the solution is posted somewhere within the 182 pages of this thread, but I can't find it.

I have noticed something odd, though. ifup/ifdown wlan0 don't work, but ifconfig wlan0 up/down do work.

Thanks in advance

wieman01
February 28th, 2012, 01:45 PM
iwconfig returns this:
wlan0 802.11b/g link ESSID: "NETWORKNAME"
Mode: managed frequency 2.463 GHz Access Point: (it's the right MAC address)
Bit Rate=54 Mb/s
Retry: on RTS thr: off Fragment thr: off
Encryption key: off
Power Management: off
Link Quality = 73/100 Signal level= -44 dBm Noise level= -102 dBm
Rx invalid nwid: 0 Rx invalid crypt: 0 Rx invalid frag: 0
Tx excessive retries: 0 Invalid misc: 0 Missed beacon: 0
Silly question... Have you turned on WPA at all? This says security is off. So this script isn't really useful under those circumstances.

What does "sudo iwlist scan" return?

sgtzim
February 28th, 2012, 07:19 PM
Silly question... Have you turned on WPA at all? This says security is off. So this script isn't really useful under those circumstances.

What does "sudo iwlist scan" return?

Not such a silly question. I didn't know you had to. I'm a MS net admin and Linux is brand-spanking new to me. The thing that's really frying my bacon is that wlan0 works on the desktop side, but not on server side. The only thing I'm doing differently on the desktop side is using bootp instead of static.

It returns every WAP in the neighborhood, including mine.

Cell 01 - Address: MAC is correct
essid: NETWORKNAME
Protocol: 802.11bg
Mode: Master
Channel: 11
Encryption Key: on
Bit Rates: 54mbps
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher: CCMP
Pairwise Ciphers (1): CCMP
Authentication Suites (1): PSK


***************
edit:
now it's only finding my WAP on iwlist scan. I was getting returns on about 7 or 8 different WAPs yesterday

something else that's kind of strange to me. iwconfig under my normal account doesn't give any indication as to the Encryption, but when I run iwconfig as root, it shows encryption as off

wieman01
February 29th, 2012, 04:51 PM
Perhaps you can post some more stuff, you find the relevant commands under section "Post this if you are stumped". Not entirely sure what is going on at this point.

sgtzim
February 29th, 2012, 08:54 PM
Perhaps you can post some more stuff, you find the relevant commands under section "Post this if you are stumped". Not entirely sure what is going on at this point.

Is there something I need to do with wpa_supplicant? I've left it and all of its shell scripts just as they were right out of the box.

As I said, I'm a total noob with Linux. Knowing that, what other stuff would be helpful for me to post?

kevdog
March 1st, 2012, 02:15 AM
Thought this thread was dead!!! What a revival!! I'm impressed!

sgtzim
March 1st, 2012, 10:42 AM
I finally figured out the problem. I have an eth0 set in my interfaces file, and whenever I tried to ping my server or ping from my server, the attempted connections were always made through the eth0 NIC which, of course, wasn't connected to anything.

I deleted the eth0 portion of interfaces, and now everything works. :P

wieman01
March 1st, 2012, 02:39 PM
Thought this thread was dead!!! What a revival!! I'm impressed!
Man, I could not believe it either. Lol. :-)

sgtzim
March 1st, 2012, 03:24 PM
Now the question becomes...

How do I force the "first look" to be at wlan0 instead of eth0 when resolving IP/DNS names?

This is a development server on a laptop, and I split time between my house and my fiance's house. When I'm at home, I'm running two subnets, but when I'm here, it's just too much of a PITA to use ethernet. So when I don't have ethernet cable hooked up, I only want responses through wlan0. Am I just going to have to have 2 copies of interfaces, or is there a config file someplace where I can force first look to wlan0, or "if eth0 fails then ask wlan0"?

I'd think that there has to be because winblows does it automatically, and if winblows has it, surely Linux has it better. Not to mention the fact that Ubuntu desktop does it, too.

Something else that is strange to me is that when I'm connected to my network via ethernet cable, I could ping both the eth0 and the wlan0.

mihirshah
March 27th, 2012, 01:08 AM
hello sir i followed ur settng for WPA2 DHCP and have done all the properly to my knowledge..
The output of iwconfig is:
wlan0 IEEE 802.11abgn ESSID:"dlink"
Mode:Managed Frequency:2.437 GHz Access Point: 00:24:01:BA:57:0B
Bit Rate=54 Mb/s Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
Link Quality=50/70 Signal level=-60 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
my dmesg o/p is :
ubuntu@omap:/etc/init.d$ dmesg | tail
[ 3119.295043] wlan0: associated
[ 3122.320373] wlan0: deauthenticated from 00:24:01:ba:57:0b (Reason: 2)
[ 3122.448577] cfg80211: All devices are disconnected, going to restore regulatory settings
[ 3122.448608] cfg80211: Restoring regulatory settings
[ 3122.448638] cfg80211: Calling CRDA to update world regulatory domain
[ 3124.344268] wlan0: authenticate with 00:24:01:ba:57:0b (try 1)
[ 3124.347076] wlan0: authenticated
[ 3124.376068] wlan0: associate with 00:24:01:ba:57:0b (try 1)
[ 3124.379913] wlan0: RX AssocResp from 00:24:01:ba:57:0b (capab=0x431 status=0 aid=2)
[ 3124.379943] wlan0: associated

my interace file is
auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet dhcp
wpa-driver wext
wpa-ssid dlink
wpa-ap-scan 2
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wpa-psk xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxx

i am putting these setting on my pandaboard es having ubuntu 11.10 .
sometimes i get this error message automaticcaly :
wl1271: ERROR invalid hlid. dropping skb
(confused)
please help!!!

Adrian98
March 27th, 2012, 07:30 AM
WIreless Security is always been one of the main issues with us and this issue becomes more complicated for the newbies, Thanks for the guide of the wireless security!! WPA 2 , is always been my main concerned one to think about!!

moose4204l
March 31st, 2012, 11:34 AM
i too am also trying to get the wireless working on my ubuntu server.

i followed you beginning tutorial and i am still not connecting.

iwconfig shows the ESSID

however, when i enter in

/etc/init.d/networking restart

i get the following message


wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1


I know the wireless works because I was using it when I had the machine running the Ubuntu Desktop.

I am also using WPA and TKIP with the static addressing.

any ideas why?

kevdog
April 1st, 2012, 10:20 AM
@moose4204

Please share your configuration file so we can take a look at it