LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to configure wireless network in linux (iwconfig) (https://www.linuxquestions.org/questions/linux-networking-3/how-to-configure-wireless-network-in-linux-iwconfig-787503/)

casualzone 02-06-2010 09:55 PM

How to configure wireless network in linux (iwconfig)
 
I still cannot access to internet. May I know why??
Is it due to the Error for wireless request "Set Encode" (8B2A)


the step i did:
1) iwlist eth1 scanning
2) sudo iwconfig eth1 essid shabana key s:xxxxxx
3) invoke firefox ... cannot surf :(

Do I need to set dhclient??? how should I set?
DO I need to enable wpa_supplicant?

------------------------------
iwlist eth1 scanning
eth1 Scan completed :
Cell 01 - Address: 00:23:69:B7:85:0C
ESSID:"shabana"
Mode:Managed
Frequency:2.462 GHz (Channel 11)
Quality:4/5 Signal level:-63 dBm Noise level:-90 dBm
IE: WPA Version 18960
Group Cipher : Proprietary
Pairwise Ciphers (68) : 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


----------------------------------------------------------
$ sudo iwconfig eth1 essid shabana key s:xxxxxx
Error for wireless request "Set Encode" (8B2A) :
SET failed on device eth1 ; Invalid argument.

--------------------------------------------------------
$ sudo iwconfig
Password:
lo no wireless extensions.

eth0 no wireless extensions.

eth1 IEEE 802.11abgn ESSID:"shabana" Nickname:"localhost.localdomain"
Mode:Ad-Hoc Frequency:2.412 GHz Cell: 1A:87:D5:5F:B9:8F
Bit Rate=2 Mb/s Tx-Power:32 dBm
Retry min limit:7 RTS thr:off Fragment thr:off
Power Managementmode:All packets received
Link Quality=5/5 Signal level=-57 dBm Noise level=-89 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

sit0 no wireless extensions.


sound like I was able to connect to ESSID:shabana. Is it true??

-----------------------------------------------------
ifcfg-eth1

# Broadcom Corporation BCM4328 802.11a/b/g/n
DEVICE=eth1
BOOTPROTO=dhcp
ONBOOT=no
HWADDR=00:22:68:a0:e5:81
NETMASK=
DHCP_HOSTNAME=
IPADDR=
BONDING_OPTS=
DOMAIN=
MASTER=
TYPE=Wireless
USERCTL=yes
IPV6INIT=no
PEERDNS=yes
ESSID=shabana
CHANNEL=
MODE=Any
SECURITYMODE=
RATE=auto



(the linux is Centos 5.4)

samsom 02-07-2010 05:22 AM

Hi,

Code:

IE: WPA Version 18960
Group Cipher : Proprietary
Pairwise Ciphers (68) : IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Encryption keyn


The iwlist scanning says that the security on your network is WPA-PSK. Forr which you will have to enable wpa-supplicant.

Also,
on iwconfig
Code:

$ sudo iwconfig
Password:
lo no wireless extensions.

eth0 no wireless extensions.

eth1 IEEE 802.11abgn ESSID:"shabana" Nickname:"localhost.localdomain"
Mode:Ad-Hoc Frequency:2.412 GHz Cell: 1A:875:5F:B9:8F
Bit Rate=2 Mb/s Tx-Power:32 dBm
Retry min limit:7 RTS thrff Fragment thrff


It seems that your wireless mode is in ad-hoc which needs to be changed to managed if you want to connect to your home network.


To change the mode, type the following commands
Code:

sudo ifconfig eth1 down
sudo iwconfig eth1 mode managed

That should change the mode. You will have to look up how to enable wpa-supplicant. The quicker and easier option will be to change the security of the network to WEP. However, it is not very secure; but your earlier command should then work.

Hope this helps
Samsom

casualzone 02-07-2010 07:59 PM

Thanks for your reply. I got the solution.
Here are the steps:


#cd /etc/wpa_supplicant
#vi wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
ssid="wireless_home"
key_mgmt=WPA-PSK
psk="string_of_wap_password"
}

#wpa_supplicant -B -dd -ieth1 -c /etc/wpa_supplicant/wpa_supplicant.conf

#dhclient eth1


Cheers!

casualzone 02-07-2010 08:00 PM

BTW, what are the differences between Managed & Master mode??


All times are GMT -5. The time now is 11:24 PM.