[SOLVED] wlan0 and wlan0:9 up, but nothing going through
Linux - Wireless NetworkingThis forum is for the discussion of wireless networking in Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a Mandriva One 2011.0 system with a 2.6.38.7-desktop586-1mnb2 kernel. I'm using a MelCo., Inc. Buffalo WLI-UC-G301N Wireless LAN Adapter USB dongle. When I plug in the dongle it automatically loads the rt2870sta module:
wlan0 Ralink STA ESSID:"" Nickname:"localhost"
Mode:Auto Frequency=2.462 GHz Access Point: Not-Associated
Bit Rate:1 Mb/s
RTS thr:off Fragment thr:off
Link Quality=100/100 Signal level:0 dBm Noise level:-85 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
At this point iwlist scan shows the wireless router that I want.
If I wait long enough after that ifconfig also shows:
Code:
wlan0:9 Link encap:Ethernet HWaddr 00:24:A5:AA:C4:BA
inet addr:127.255.255.255 Bcast:127.255.255.255 Mask:255.0.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
Once wlan0:9 is up, iwconfig gives:
Code:
wlan0 Ralink STA ESSID:"******" Nickname:"localhost"
Mode:Managed Frequency=2.462 GHz Access Point: 00:1D:CF:83:20:60
Bit Rate=54 Mb/s
RTS thr:off Fragment thr:off
Link Quality=77/100 Signal level:-62 dBm Noise level:-53 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
However, none of my software can use the connection, and route -n shows an empty routing table.
If I use /etc/rc.d/init.d/network to stop and the start networking, I get:
Code:
Bringing up interface wlan0: Error for wireless request "Set Mode" (8B06) :
SET failed on device wlan0 ; Network is down.
Like some posts I found suggested, I got the rt2870.bin file into the /lib/firmware directory (by installing the rt2870-firmware package) and then blacklisted the rt2870sta driver. However, this results in it telling me "usbcore device wlan0 does not seem to be present, delaying initialization".
Have you run 'dhclient wlan0' or 'dhcpcd wlan0'. If you run one of those, you should be assigned an ip (Presuming your router does dhcp), and you're away.
Have you run 'dhclient wlan0' or 'dhcpcd wlan0'. If you run one of those, you should be assigned an ip (Presuming your router does dhcp), and you're away.
I think the networking scripts are doing that for me, since /var/log/messages shows
Code:
dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
However, I tried waiting until after wlan0:9 was up, then ran dhclient -v wlan0. The ouput was:
Code:
Internet Systems Consortium DHCP Client 4.2.1-P1
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wlan0/00:24:a5:aa:c4:ba
Sending on LPF/wlan0/00:24:a5:aa:c4:ba
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 6
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
I tried doing it again with the added option -s 127.255.255.255, since this is the bcast address that's listed for wlan0:9, but that didn't work either.
First: get rid of any sta drivers - they are old and unsupported!
Second: get rt2800usb driver!
Third: everything will be working
And actually your setup is broken! Do you really need alias? If you don't need it or you don't know what it is, then remove everything about wlan0:9 from configuration!
DHCPDISCOVER = "Is anyone out there?"
DHCPOFFERS = "I am!"
There's a few other steps along the way. Try these commands
ifconfig wlan0 up
iwconfig
iwlist wlan0 scan |less check for your local essid, and check if you are associated. It sounds like your wifi router is turned off.
Wait the sec. If you tried IP 127.255.255.255 you can't get answer - no way - every device, every IP implementation is expected to DROP every packet to/from 127.0.0.0/8 IP, if it is not locally generated AND locally destined! It is loopback address and cannot be used on any interface (apart from lo - local-loopback).
business_kid - you are bit wrong!
DHCPDISCOVER = can anybody lease me some IP?
DHCPOFFER = ask me for this IP with settings
DHCPREQUEST = ok, I am asking you for this IP
DHCPACK = ok, it is yours for stated amount of time
This is how it work - it is NOT ARP - it is DHCP and leases IPs, not helps to discover free IPs.
First: get rid of any sta drivers - they are old and unsupported!
Second: get rt2800usb driver!
Third: everything will be working
I tried blacklisting the sta driver. Doing that gets me the response: "Device wlan0 does not seem to be present, delaying initialization". This happens even if I've already loaded the rt2800usb driver via modprobe before trying to start the wireless connection.
Quote:
And actually your setup is broken! Do you really need alias? If you don't need it or you don't know what it is, then remove everything about wlan0:9 from configuration!
As far as I can tell, the wlan0:9 isn't mentioned in any configuration files. Also, my DSL connection works just fine when I have both the eth1 and eth1:9 devices listed by ifconfing.
Quote:
Originally Posted by business_kid
iwlist wlan0 scan |less check for your local essid, and check if you are associated. It sounds like your wifi router is turned off.
iwlist wlan0 scan shows my desired ESSID:
Code:
Cell 02 - Address: 00:1D:CF:83:20:60
ESSID:"[REDACTED]"
Mode:Managed
Channel:1
Quality:81/100 Signal level:-58 dBm Noise level:-53 dBm
Encryption key:on
Bit Rates:130 Mb/s
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
Every interface which is typed like eth0:1 eth1:2 wlan0:9 is alias - another IP address for NIC. You don't need two addresses, so your config is definitely broken.
And actually your router is broken as well - it should report more then one Bit Rate. When you start to talk with it, it is done on Bit Rate 1mb/s and not 130mb/s (I know - I have two APs in two servers).
And now scan from the other server.
As you can clearly see I see more then one bit rate (all available by standard).
This clearly show, that your router is broken
Wait the sec. If you tried IP 127.255.255.255 you can't get answer -
business_kid - you are bit wrong!
DHCPDISCOVER = can anybody lease me some IP?
DHCPOFFER = ask me for this IP with settings
DHCPREQUEST = ok, I am asking you for this IP
DHCPACK = ok, it is yours for stated amount of time
This is how it work - it is NOT ARP - it is DHCP and leases IPs, not helps to discover free IPs.
You are correct in every way. But some of those stages are not reported on stdout at low debug levels. I wasn't giving a lecture on DHCP, but explaining his output.
Oh, I didn't read documentation for DHCP. What is the point - I know how it works and I don't need super-duper advanced features, then I just stay with amount of knowledge I already have. I just understand internals of many protocols and its mostly to extend needed by my at moment and sometimes even beyond that extend. It is simply another language and I am good with languages.
And I'm curious: does the "Ralink" given by iwconfig mean that I need to set WIRELESS_WPA_DRIVER to "ralink" rather than "wext"? I tried that, but got "RALINK: Driver does not support wpa_supplicant".
Ooops, once I had iwconfig showing me a wlan1 instead of wlan0 (as a result of blacklisting rt2870sta), I forgot to rename the DEVICE variable in /etc/sysconfig/network-scripts. Once I did that, everything worked, except that I had to disable the shorewall firewall to not block my output.
Have a look in /etc/udev/rules.d/70-persistent-net.rules and remove line with wlan0 and change the other line contents from wlan1 to wlan0 - DONE.
P.S. shorewall is slow and it is not flexible. If you want to add any new rule, you have to restart it, which means, flushing all IPtables (loosing all connections) and putting new rules (along with old ones) to IPtables - simply not flexible. I can give you script, which you should put in /etc/init.d/ and make symlinks in /etc/rd.x. Shorewall is good start, but with lets say 2000 rules it takes forever to finish, my script is instant (you can even try say 1M rules - should be pretty much instant and shorewall would still hour of your life with such amount of rules). I started with shorewall and my iptables still bares traces of it (but it is only because it is easy to read). Shorewall actually makes a lot of rules, which with simple change could be completely avoided and make tables a lot smaller (faster). I consider shorewall to be more like joke, then professional solution (I do not blame you, but laziness of authors).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.