Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]net.wlan0 started has ip address, but cannot connect
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
athena810
Apprentice
Apprentice


Joined: 23 Jun 2012
Posts: 176

PostPosted: Wed Jul 11, 2012 1:08 pm    Post subject: [SOLVED]net.wlan0 started has ip address, but cannot connect Reply with quote

So im in a different place so i need to reconfigure my wpa_supplicant.conf. I'm pretty sure that the router is WEP ASCII as password. I /etc/init.d/net.wlan0 and it works but I cannot ping google. /etc/resolv.conf is empty and iwconfig returns:

Code:

wlan0     IEEE 802.11bgn  ESSID:"ADA" 
          Mode:Managed  Frequency:2.442 GHz  Access Point: D8:5D:4C:B8:87:E0   
          Bit Rate=1 Mb/s   Tx-Power=20 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:29   Missed beacon:0


i cant log into the router and find out info because its all in chinese and i can read it and i cant spend time copying and pasting into google translate...well i can, but its inconvenient.

Any ideas?

Also, I am able to connect with a wired connection but i rather be able to conect wirelessly. Here's ifconfig with a wired connection
Code:
eth0      Link encap:Ethernet  HWaddr 78:e3:b5:4f:99:30 
          inet addr:192.168.1.102  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::7ae3:b5ff:fe4f:9930/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:229 errors:0 dropped:0 overruns:0 frame:0
          TX packets:276 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:97694 (95.4 KiB)  TX bytes:43101 (42.0 KiB)
          Interrupt:16 Base address:0x6000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 68:a3:c4:3c:ad:8d 
          inet addr:169.254.97.160  Bcast:169.254.255.255  Mask:255.255.0.0
          inet6 addr: fe80::6aa3:c4ff:fe3c:ad8d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:3565 (3.4 KiB)


Here's my wpa_supplicant.conf
Code:
ctrl_interface=/var/run/wpa_supplicant
ap_scan=1

network={
        ssid="ADA"
        scan_ssid=1
        key_mgmt=NONE
        wep_key0="AFHEIGDOENBG"
        wep_tx_keyidx=0
        priority=5
}


I changed the wep_key0 here because it is my name but the real key is 12 characters and all Caps. Does this make it a wpa?


Last edited by athena810 on Wed Jul 11, 2012 5:48 pm; edited 2 times in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54096
Location: 56N 3W

PostPosted: Wed Jul 11, 2012 5:25 pm    Post subject: Reply with quote

athena810,

It all looks good apart from the IP address on wlan0
Code:
inet addr:169.254.97.160
is a link local address, which is what you get when a dhcp attempt times out.

WEP is WEP and WPA is WPA ... its much more than the key that is different. Heres my wpa_supplicant.conf
Code:
ctrl_interface_group=0
ctrl_interface=/var/run/wpa_supplicant
ap_scan=1

###### Security Configuration ######
network={
        priority=50
        key_mgmt=WPA-PSK
        mode=0
        psk="<Plain_Text_key>"
        ssid="RadioNet"
}

network={
        priority=1
        key_mgmt=NONE
        mode=0
#       ssid="BTFON"
#       ssid="any"
        ssid="NETGEAR"
}
The first stanza uses WPA2 to connect to my home network, if that not found it drops back to and unsecured (not even WEP) network with a SSID of NETGEAR.
The ssid="any" is a special value that matches any SSID.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
athena810
Apprentice
Apprentice


Joined: 23 Jun 2012
Posts: 176

PostPosted: Wed Jul 11, 2012 5:42 pm    Post subject: Reply with quote

Hey,

But I don't know if it's WEP or WPA. I'll try WPA anyway to see if it works.

Woah...I gotta say, you are good.

It instantly worked. Thanks :)
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Jul 12, 2012 5:59 am    Post subject: Reply with quote

athena810 ...

For future reference, you can get such information from 'iwlist scan' ... example:

Code:
awk '{RS="Cell"}/ADA/' <(iwlist wlan0 scan)

This will provide a slew of information re the access point "ADA", it will include information such as channel, signal level, and also the authentication used (ie: WPA, WEP).

Note, iwlist will need to be run as a privilaged user (root). You might also need to bring the interface "up" prior with one or other of the following ...

Code:
ip link set wlan0 up

Code:
ifconfig wlan0 up

best ... khay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum