LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-28-2016, 10:23 AM   #1
pbft
LQ Newbie
 
Registered: Jan 2016
Posts: 10

Rep: Reputation: Disabled
Problem connecting to open wifi using /etc/network/interfaces


Posted this in the Debian-specific forum, but maybe it's more a general networking question.

Running Debian Jessie 4.1 kernel on an embedded system (no GUI). I can connect to a WPA wireless network with no problem. However, I can't seem to connect to an open network - even if it's the same exact router (just set up as open rather than WPA).

Working stanza from interfaces file for WPA:

Code:
auto ra0
allow-hotplug ra0
iface ra0 inet dhcp
wpa-ssid VECS2
wpa-psk "passphrase"
Not-working stanza for open network (router reconfigured in between, tested with laptop):

Code:
auto ra0
allow-hotplug ra0
iface ra0 inet dhcp
wireless-essid VECS2
It also fails of every other open network that I've tried. It appears to never get a DHCP response:
Code:
root@vesta:~# ifup ra0
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/ra0/7c:dd:90:9f:c3:3f
Sending on   LPF/ra0/7c:dd:90:9f:c3:3f
Sending on   Socket/fallback
DHCPDISCOVER on ra0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on ra0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on ra0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on ra0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on ra0 to 255.255.255.255 port 67 interval 16
DHCPDISCOVER on ra0 to 255.255.255.255 port 67 interval 3
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
Any suggestions? Since it works with WPA I think I can safely assume that all of the traditional driver issues can be ruled out. I'd really like to get this working, and I can't control the types of networks I'll have available (they belong to clients).
 
Old 01-28-2016, 02:54 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,862

Rep: Reputation: 162Reputation: 162
What's output of route command?
 
Old 01-28-2016, 04:02 PM   #3
pbft
LQ Newbie
 
Registered: Jan 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by nini09 View Post
What's output of route command?
For successful configuration with WPA PSK (in this case, connected to same network as wired connection):

Code:
root@vesta:/# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.1.254   0.0.0.0         UG    0      0        0 eth0
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
192.168.1.0     *               255.255.255.0   U     0      0        0 ra0
Configured to connect to open network:

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.1.254   0.0.0.0         UG    0      0        0 eth0
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
The ra0 interface never sees a DHCP offer, so I assume it's not actually transmitting, or at least not making requests to the specified SSID. I get the same results with 'any' as the SSID.

Last edited by pbft; 01-28-2016 at 04:29 PM.
 
Old 01-28-2016, 11:16 PM   #4
MrTux
Member
 
Registered: Dec 2015
Posts: 131

Rep: Reputation: Disabled
What do you mean by open network? Does it not have auth or it is an open hotspot?
 
Old 01-29-2016, 06:00 AM   #5
pbft
LQ Newbie
 
Registered: Jan 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MrTux View Post
What do you mean by open network? Does it not have auth or it is an open hotspot?
Not sure I understand the distinction. I use 'open' to mean that it's a wifi network with no security / no authorization - you can connect (from a normal Linux laptop, for instance) by simply specifying the SSID. On routers that I manage, I would select 'None' under the 'Wireless Security' options to create this situation.

With the embedded Debian device that's the subject of this thread, I've had this behavior at many different locations, attempting to connect to many different 'open' wifi networks. In each case, my Linux laptop can connect just fine. On routers that I manage, the embedded Debian device will connect if I switch from open to WPA/PSK as described in the original post.

I noticed something interesting, though. A successful connection to a PWA/PSK network ("cld") gives me this from iwconfig. Note the signal levels. It also sees the open network (VECS in this case):
Code:
          Cell 01 - Address: A0:63:91:47:F9:D8
                    Protocol:11b/g/n BW20
                    ESSID:"VECS"
                    Mode:Managed
                    Frequency:2.462 GHz (Channel 11)
                    Quality=100/100  Signal level=-15 dBm  Noise level=-92 dBm
                    Encryption key:off
                    Bit Rates:144 Mb/s
                    IE: Unknown: DD0E0050F204104A0001101044000102
          Cell 02 - Address: AC:22:0B:33:F1:98
                    Protocol:11b/g/n BW20
                    ESSID:"cld"
                    Mode:Managed
                    Frequency:2.447 GHz (Channel 8)
                    Quality=100/100  Signal level=-39 dBm  Noise level=-92 dBm
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
When I switch to the open network, I get no connection as originally described. The output from iwcinfig still shows "cld" as the ESSID and shown no signal:
Code:
ra0       Ralink STA  ESSID:"cld"  Nickname:"MT7601STA"
          Mode:Auto  Frequency=2.447 GHz  Access Point: Not-Associated   
          Bit Rate:1 Mb/s   
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Link Quality=100/100  Signal level:0 dBm  Noise level:0 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
Does this offer any insights?
 
Old 01-29-2016, 02:46 PM   #6
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,862

Rep: Reputation: 162Reputation: 162
1)Wireless network IP should be different from wire network IP.
2)For open or no key AP, try add one line after "wireless-essid VECS2"
"wireless-mode Managed" and then reboot machine.
 
Old 01-29-2016, 02:54 PM   #7
pbft
LQ Newbie
 
Registered: Jan 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by nini09 View Post
1)Wireless network IP should be different from wire network IP.
2)For open or no key AP, try add one line after "wireless-essid VECS2"
"wireless-mode Managed" and then reboot machine.
Thanks for the ideas.

On a successful connection, the IPs are in fact different, even if both connections are to the same router - as it should be. As far as I can tell, this problem happens on any attempt to connect to an open network, regardless of whether the wired connection is to the same router or subnet.

I have tried with the "wireless-mode Managed" line - same results.

I've also done the same process step-by-step from the command line (using iwconfg ra0 essid VECS2 and so on). Same results - dhclient fails, and iwconfig shows no signal. I'm assuming the radio should be on and show a signal, even if the connection attempt fails.

I'm wondering if wpa-supplicant is getting involved in the background via the if-up.d/wpasupplicant script.
 
Old 02-01-2016, 02:27 PM   #8
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,862

Rep: Reputation: 162Reputation: 162
What's output for syslog or dmesg command? Is there any error in these output?
 
Old 02-01-2016, 04:30 PM   #9
pbft
LQ Newbie
 
Registered: Jan 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by nini09 View Post
What's output for syslog or dmesg command? Is there any error in these output?
Same as command line messages:

Code:
...
DHCPDISCOVER on ra0 to 255.255.255.255 port 67 interval 3
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
 
Old 02-02-2016, 03:10 PM   #10
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,862

Rep: Reputation: 162Reputation: 162
This is DHCP error. I want to see error at link layer. You mentioned iwconfig show no signal. It look like link connection is fail.
 
Old 02-02-2016, 04:53 PM   #11
pbft
LQ Newbie
 
Registered: Jan 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by nini09 View Post
This is DHCP error. I want to see error at link layer. You mentioned iwconfig show no signal. It look like link connection is fail.
I don't see any reported link layer errors. It seems like the radio is off - on other machines I can still see a signal even if I don't connect. The maddening thing is that if I change the router to use a passphrase, it connects just fine.
 
Old 02-03-2016, 03:11 PM   #12
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,862

Rep: Reputation: 162Reputation: 162
Quote:
Cell 01 - Address: A0:63:91:47:F98
Protocol:11b/g/n BW20
ESSID:"VECS"
Mode:Managed
Frequency:2.462 GHz (Channel 11)
Quality=100/100 Signal level=-15 dBm Noise level=-92 dBm
Encryption keyff
Bit Rates:144 Mb/s
IE: Unknown: DD0E0050F204104A0001101044000102
Based on scan result about VECS, it has unknown element, encryption key off might be fake.
Is there nothing in dmesg output during WiFi connection?
 
Old 02-03-2016, 08:43 PM   #13
pbft
LQ Newbie
 
Registered: Jan 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by nini09 View Post
Based on scan result about VECS, it has unknown element, encryption key off might be fake.
Is there nothing in dmesg output during WiFi connection?
I believe that there's nothing in dmesg during failed connection attempts other than the dhclient messages listed above. I don't have a unit here today, but I'll check tomorrow.

What do you mean that 'encryption key off might be fake'? I simply set the router (a Netgear WNR3500 in this case) to 'none' for wireless security. I can connect to this same exact router if I turn on security.

I can connect to it from my laptop with either setting, so I'm thinking it has to be something flaky with the some aspect of the wireless configuration or tools on the embedded system - I just don't know where to look at this point
 
Old 02-04-2016, 02:45 PM   #14
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,862

Rep: Reputation: 162Reputation: 162
My understand is like following. If true, VECS AP is encrypted. You can ignore scan result because scan tool can't understand something.
1)Encryption key is on, router can connect to VECS AP.
2)Encryption key is off, router can NOT connect to VECS AP.
 
  


Reply

Tags
network interface, wifi


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
Problem connecting to open wifi using /etc/network/interfaces pbft Debian 1 02-03-2016 01:09 AM
[SOLVED] Problem connecting wifi network in clfs srinietrx Linux From Scratch 4 05-14-2013 02:32 AM
[SOLVED] Problem in connecting wifi network in LFS build using wpa_supplicant srinietrx Linux - Wireless Networking 1 05-13-2013 07:41 AM
[SOLVED] /etc/network/interfaces for static wifi suicidaleggroll Linux - Networking 3 06-29-2012 06:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:00 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
Open Source Consulting | Domain Registration