LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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-06-2014, 09:42 AM   #1
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 536

Rep: Reputation: Disabled
Super-Simple Unencrypted Wireless Network


I am going to go back to the drawing board.

Forget about wpa_supplicant. I've turned encryption off on my router, and I just want to be able to establish any communication. I previously had the hardware working using the same OS, so it isn't a driver issue. I am sure I am making a silly newbie mistake since iwconfig doesn't even show being connected to my network (ESSID is "wired"). When I was earlier messing around with wpa_supplicant, I was able to get it to use ESSID "wired", but as I said, I want to start off simple first.

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

wlan0     IEEE 802.11bgn  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=27 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

eth0      no wireless extensions.
My ifcfg-wlan0 file is as shown.
Code:
[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=static
NETMASK=255.255.255.0
TYPE=Wireless
HWADDR=b8:76:3f:69:31:95
IPADDR=192.168.0.201
ONBOOT=yes
#WPA=yes
ESSID=wired
MODE=Managed
RATE=54Mb/s
[root@michaels ~]#
Please provide any recommendations
 
Old 04-06-2014, 10:30 AM   #2
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 536

Original Poster
Rep: Reputation: Disabled
I have found that I could manually set the eesid using iwconfig. Shouldn't it be defined by my my ifcfg file?

After doing so, I disconnect the CAT-5 ethernet and try to ping 192.168.0.1, but no success.

I don't know if "Invalid misc:5" shown below has anything to do with it.

Code:
[root@michaels network-scripts]# iwconfig wlan0 essid wired
[root@michaels network-scripts]# iwconfig wlan0 mode Managed
[root@michaels network-scripts]# iwconfig
lo        no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"wired"
          Mode:Managed  Frequency:2.417 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=-29 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:5   Missed beacon:0

eth0      no wireless extensions.

[root@michaels network-scripts]#
 
Old 04-08-2014, 01:26 AM   #3
propofol
Member
 
Registered: Nov 2007
Location: Seattle
Distribution: Debian Wheezy & Jessie; Ubuntu
Posts: 331

Rep: Reputation: 59
This is the script I have used to get my headless wifi mpd server going. I think the important part may be "ifconfig eth0 down" & then set up wifi.

Code:
#!/bin/sh
 
echo "De-activate eth0 interface"
/sbin/ifconfig eth0 down

echo "Activating wlan0 interface"
/sbin/ifconfig wlan0 up

echo "Setting network parameters"
/sbin/iwconfig wlan0 essid "essid" mode Managed

#If you are using wpa_supplicant:
#/sbin/wpa_supplicant -B -Dwext -i wlan0 -c/etc/wpa_supplicant.conf

#echo "Setting IP Address"
# Via DHCP
#/sbin/dhclient wlan0

# OR 

# Static IP config
/sbin/ifconfig wlan0 192.168.0.201 netmask 255.255.255.0 broadcast 192.168.0.255
/sbin/route add default gateway 192.168.0.1
BTW wicd has a cli & a curses option if you do not want to use a graphical user interface.

Regards,
Stefan

Last edited by propofol; 04-08-2014 at 01:27 AM.
 
1 members found this post helpful.
Old 04-11-2014, 11:58 AM   #4
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 536

Original Poster
Rep: Reputation: Disabled
Thank you propofol!!!!!

Your right, the important part was "ifconfig eth0 down"! Where is this requirement documented?

Based on my install of wpa_supplicant, I had to change the locations /usr/sbin/wpa_supplicant of /etc/wpa_supplicant/wpa_supplicant.conf. I also noticed that adding the wext driver wasn't required. Also, since I already setup wlan0 in /etc/sysconfig/network-scripts/ifcfg-wlan0, all that was needed was:
Code:
#!/bin/sh
/sbin/ifconfig eth0 down
/sbin/ifconfig wlan0 up
/usr/sbin/wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
Note that running this will prevent the network from being restarted using "service network restart". I might try to figure out how to change it to work, but at least I am up and going.

Thanks again!!!
 
Old 04-15-2014, 04:03 AM   #5
propofol
Member
 
Registered: Nov 2007
Location: Seattle
Distribution: Debian Wheezy & Jessie; Ubuntu
Posts: 331

Rep: Reputation: 59
You're welcome. I found this out with trial & error. I suspect having two network interfaces up causes routing problems. Maybe someone with more knowledge can shed light on this. I have a script which occasionally checks if the wifi network is up. If not, it does a 'killall wpa_supplicant' & restarts the wifi.

Regards,
Stefan


Quote:
Originally Posted by NotionCommotion View Post
Thank you propofol!!!!!

Your right, the important part was "ifconfig eth0 down"! Where is this requirement documented?
...
 
  


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
[SOLVED] Unencrypted Wireless(Wi-Fi) Security in Motels/Hotels SteveLange9949 Linux - Laptop and Netbook 5 05-19-2011 03:56 AM
encrypted wireless on unencrypted network fisheromen1031 Linux - Wireless Networking 7 09-04-2008 12:09 AM
Roommates use unencrypted wireless network halfpower Linux - Security 6 05-15-2008 08:38 PM
Getting no dhcpoffer from unencrypted network room101 Linux - Wireless Networking 5 02-18-2008 02:16 PM
network Unencrypted huno Linux - General 1 02-12-2003 08:13 AM


All times are GMT -5. The time now is 06:25 PM.

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