LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-05-2014, 01:47 PM   #1
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 536

Rep: Reputation: Disabled
Desparately trying to set up WiFi network


For my life, I cannot get wireless working.

I've followed http://wiki.centos.org/HowTos/Laptops/WpaSupplicant exactly (except where the wiki states to put quotes around NETWORKPSK which I believe is incorrect. Also, I additionally tried using TYPE=Wireless in /etc/sysconfig/network-scripts/ifcfg-wlan0). Note that this is a server, and I don't wish to use NetworkServices.

Please, can anyone help shed some light.

Thank you

Code:
[root@michaels ~]# ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr B8:76:3F:69:31:95
          inet addr:192.168.0.201  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::ba76:3fff:fe69:3195/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1034 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:197825 (193.1 KiB)  TX bytes:1074 (1.0 KiB)

[root@michaels ~]# iwconfig
lo        no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"wired"
          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:18:E7:F0:85:CE
          Bit Rate=1 Mb/s   Tx-Power=27 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=70/70  Signal level=-31 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:8   Missed beacon:0

eth0      no wireless extensions.

[root@michaels ~]# cat /etc/sysconfig/network-scripts/ifcfg-wlan0
# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
GATEWAY=192.168.0.1
DEVICE=wlan0
BOOTPROTO=none
NETMASK=255.255.255.0
#TYPE=Wireless
TYPE=Ethernet
HWADDR=b8:76:3f:69:31:95
IPADDR=192.168.0.201
ONBOOT="yes"
#WPA=yes

[root@michaels ~]# cat /etc/sysconfig/wpa_supplicant
# Use the flag "-i" before each of your interfaces, like so:
#  INTERFACES="-ieth1 -iwlan0"
INTERFACES="-iwlan0"

# Use the flag "-D" before each driver, like so:
#  DRIVERS="-Dwext"
DRIVERS=""

# Other arguments
#   -u   Enable the D-Bus interface (required for use with NetworkManager)
#   -f   Log to /var/log/wpa_supplicant.log
#   -P   Write pid file to /var/run/wpa_supplicant.pid
#        required to return proper codes by init scripts (e.g. double "start" action)
#        -B to daemonize that has to be used together with -P is already in wpa_supplicant.init.d
OTHER_ARGS="-u -f /var/log/wpa_supplicant.log -P /var/run/wpa_supplicant.pid"

[root@michaels ~]# cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
network={
        ssid="wired"
        #psk="xxxx"
        psk=956ce2b3a9662d7b234c4ae9a40accb1c737620da3e8ad28e465e6447f8d33cf
        scan_ssid=1
        key_mgmt=WPA-PSK
}

[root@michaels ~]# cat /etc/init.d/prepnet
#!/bin/sh

/etc/init.d/messagebus start
/etc/init.d/wpa_supplicant start
killall dhclient >/dev/null 2>&1

[root@michaels ~]# service network status
Configured devices:
lo eth0 wlan0
Currently active devices:
lo wlan0 eth0

[root@michaels ~]# service wpa_supplicant status
wpa_supplicant (pid  1163) is running...

[Michael@michaels ~]$ iwlist wlan0 scanning
wlan0     Scan completed :
          Cell 01 - Address: 00:18:E7:F0:85:CE
                    Channel:6
                    Frequency:2.437 GHz (Channel 6)
                    Quality=70/70  Signal level=-33 dBm
                    Encryption key:on
                    ESSID:"wired"
                    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
                    Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
                    Mode:Master
                    Extra:tsf=000000133bee39e9
                    Extra: Last beacon: 1463801ms ago
                    IE: Unknown: 00057769726564
                    IE: Unknown: 010882848B960C121824
                    IE: Unknown: 030106
                    IE: Unknown: 0706555349010B1B
                    IE: Unknown: 200100
                    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
                    IE: Unknown: DD180050F2020101030003A4000027A4000042435E0062322F00
                    IE: Unknown: DD1E00904C334C101BFFFF000000000000000000000000000000000000000000
                    IE: Unknown: 2D1A4C101BFFFF000000000000000000000000000000000000000000
                    IE: Unknown: DD1A00904C3406080800000000000000000000000000000000000000
                    IE: Unknown: 3D1606080800000000000000000000000000000000000000
                    IE: Unknown: DD0900037F01010000FF7F
                    IE: Unknown: DD770050F204104A0001101044000102103B00010310470010000000000000100000000018E7F085CE10210006442D4C696E6B1023000D442D4C696E6B20526F75746572102400074449522D383235104200046E6F6E651054000800060050F2040001101100074449522D383235100800020084103C000103

[Michael@michaels ~]$

Last edited by NotionCommotion; 04-05-2014 at 01:49 PM.
 
Old 04-05-2014, 02:15 PM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 6,387
Blog Entries: 6

Rep: Reputation: Disabled
Hi:

Sorry I am not on a server and don't have experience with that.

I did notice that your ESSID is set to wired. If indeed your service is wireless uncommenting wired or changing it to wireless may help.

Code:
wlan0     IEEE 802.11bgn  ESSID:"wired"
http://www.centos.org/docs/5/html/De...nterfaces.html
 
Old 04-05-2014, 02:29 PM   #3
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 536

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
I did notice that your ESSID is set to wired. If indeed your service is wireless uncommenting wired or changing it to wireless may help.
"wired" is just the name of my wireless network
 
1 members found this post helpful.
Old 04-05-2014, 02:57 PM   #4
mddnix
Member
 
Registered: Mar 2013
Location: Bengaluru, India
Distribution: Redhat, Arch, Ubuntu
Posts: 502

Rep: Reputation: 137Reputation: 137
Setting up wireless network without the help of some network manager is really a headache. I suggest you to run NetworkManager, so that it does all the hard work of figuring-out how to setup wireless connection with correct ssid and wpa encryption etc. Once you are sure you are getting wireless connection, then convert User-connection to System-connection by checking 'Available to all users' in Network Manager applet. What this essentially does is it writes a ifconfig-wlan0 file in /etc/sysconfig/network-scripts/ folder instead of creating the corresponding GConf/GNOME keyring settings.

Once you get the hard file, make a backup of it, disable NetworkManager, make any changes to file if necessary and you are done.

More on this topic:
Chapter 8. NetworkManager
 
Old 04-05-2014, 03:03 PM   #5
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 6,387
Blog Entries: 6

Rep: Reputation: Disabled
Thanks for chiming in; mddesai-
 
Old 04-05-2014, 03:22 PM   #6
mddnix
Member
 
Registered: Mar 2013
Location: Bengaluru, India
Distribution: Redhat, Arch, Ubuntu
Posts: 502

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by Ztcoracat View Post
Thanks for chiming in; mddesai-
My pleasure
 
Old 04-05-2014, 07:15 PM   #7
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 536

Original Poster
Rep: Reputation: Disabled
Thanks mddesai,

Is it possible to use NetworkManager without a gui?
 
Old 04-05-2014, 10:11 PM   #8
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,429

Rep: Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348
There is the nmcli command line tool to use NetworkManager. It has an unfortunate problem that it cannot handle the secrets needed for WPA/2 wifi connections.
The wicd-client command line tool for the wicd network manager is much better.
Alternatively, bypass the network managers entirely and just use wpa_supplicant directly for WPA2 connections. You will also need to use dhcpcd or dhclient if you use DHCP.

Last edited by allend; 04-05-2014 at 10:13 PM.
 
Old 04-06-2014, 01:08 AM   #9
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 6,387
Blog Entries: 6

Rep: Reputation: Disabled
Quote:
Originally Posted by allend View Post
There is the nmcli command line tool to use NetworkManager. It has an unfortunate problem that it cannot handle the secrets needed for WPA/2 wifi connections.
The wicd-client command line tool for the wicd network manager is much better.
Alternatively, bypass the network managers entirely and just use wpa_supplicant directly for WPA2 connections. You will also need to use dhcpcd or dhclient if you use DHCP.
Does the wicd get invoked by the network manager?
Bringing up the gui for wicd alludes me-
 
Old 04-06-2014, 01:14 AM   #10
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 6,387
Blog Entries: 6

Rep: Reputation: Disabled
Quote:
Originally Posted by NotionCommotion View Post
Thanks mddesai,

Is it possible to use NetworkManager without a gui?
Not sure I will have to learn from allend and wikipedia--
 
Old 04-06-2014, 01:53 AM   #11
mddnix
Member
 
Registered: Mar 2013
Location: Bengaluru, India
Distribution: Redhat, Arch, Ubuntu
Posts: 502

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by NotionCommotion View Post
Thanks mddesai, Is it possible to use NetworkManager without a gui?
Yes you can. NetworkManager is just a daemon to manage networks. In gui, it is controlled by nm-connection-editor, but before that make sure nm-applet is already running. In tui, it is controlled by nmcli. But personally, i haven't come across a redhat server whose network is based on wireless. It is considered as pure security threat and always wires are used for networking. And also in Redhat, since NetworkManager keeps messing up with network bridging for virtual machines hosted on them, NetworkManager is always switched off. Summary - most admins think NetworkManager as useless.

NetworkManager is useful on desktops and laptops where gui is available.

But you can try NetworkManager in tui from the link i have provided. It is for Redhat 7 beta, but i think some of it can also be applied to Redhat 6.

Using the NetworkManager Command Line Tool, nmcli

Last edited by mddnix; 04-06-2014 at 02:01 AM.
 
Old 04-06-2014, 02:01 AM   #12
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 6,387
Blog Entries: 6

Rep: Reputation: Disabled
Quote:
Originally Posted by mddesai View Post
Yes you can. NetworkManager is just a daemon to manage networks. In gui, it is controlled by nm-connection-editor, but before that make sure nm-applet is already running. In tui, it is controlled by nmcli. But personally, i haven't come across a redhat server whose network is based on wireless. It is considered as pure security threat and always wires are used for networking. And also in Redhat, since NetworkManager keeps messing up with network bridging for virtual machines hosted on them, NetworkManager is always switched off. Summary - most admins think NetworkManager as useless.

NetworkManager is useful on desktops and laptops where gui is available.

But you can try NetworkManager in tui from the link i have provided. It is for Redhat 7 beta, but i think it can also be applied to Redhat 6.

Using the NetworkManager Command Line Tool, nmcli
Thanks!
 
Old 04-06-2014, 02:04 AM   #13
mddnix
Member
 
Registered: Mar 2013
Location: Bengaluru, India
Distribution: Redhat, Arch, Ubuntu
Posts: 502

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by Ztcoracat View Post
Thanks!
Welcome
 
Old 04-06-2014, 07:11 AM   #14
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 536

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by allend View Post
Alternatively, bypass the network managers entirely and just use wpa_supplicant directly for WPA2 connections. You will also need to use dhcpcd or dhclient if you use DHCP.
Thanks allend. That is exactly what I am attempting to do, and I described in my original post the steps I have taken, but it is not working. Please let me know what steps I am not doing correctly.
 
Old 04-06-2014, 10:45 AM   #15
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,429

Rep: Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348Reputation: 1348
Code:
[root@michaels ~]# cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
eapol_version=1
ap_scan=1
fast_reauth=1
network={
        scan_ssid=0
        ssid="wired"
        proto=RSN
        #psk="xxxx"
        psk=956ce2b3a9662d7b234c4ae9a40accb1c737620da3e8ad28e465e6447f8d33cf
        scan_ssid=1
        key_mgmt=WPA-PSK
        pairwise=CCMP TKIP
        group=CCMP TKIP WEP104 WEP40
        priority=10
}
I have added lines in blue that appear in wpa_supplicant.conf file that I use when connecting to my home WPA2 access point. I have also coloured in red a line that I do not have.

To use wpa_supplicant, I have to:
1. Stop NetworkManager from starting and reboot (easiest way to clear any existing locking).
2. Login as root
3. Run 'rfkill list'. If a hard block is shown, turn on the wireless card with the physical switch. If a soft block is shown, run 'rfkill unblock wlan' to clear.
4. Run 'wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0 -Dwext'
5. Run 'dhcpcd' to get an IP address and name server information
6. Run my firewall script (I have custom scripts depending on the interface I am using).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I set up a bridged network on my wifi? Ryanms3030 Linux - Newbie 4 02-06-2014 09:31 PM
How to set up very simple 2 laptop wifi network to just send files between them ? davetesc Linux - Networking 15 12-02-2012 07:22 AM
LXer: How To Set Up A Wireless Network Using WPA/WPA2 With Radius Authentication With CIITIX-WiFi LXer Syndicated Linux News 0 09-22-2010 10:50 AM
How do I set up my Netgear wifi card? I have a WEP network. htmlishard Linux - Newbie 1 06-22-2006 12:58 PM
Set up my wifi network with mandriva2006 Capecod Linux - Wireless Networking 30 01-20-2006 07:42 AM


All times are GMT -5. The time now is 04:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration