Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When I connect my laptop to a wpa2 secured router, using wicd I don't have any connection problems.

BUT when I connect with the following command-line command ( as outlined here )

UPDATED:

ifconfig wlan0 up
wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf
dhcpd wlan0

My connection is unstable, sometimes working sometimes not, indicated by the following output:

$ ping google.com
PING google.com (64.233.179.104) 56(84) bytes of data.
64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=1 ttl=56 time=190 ms
64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=2 ttl=56 time=196 ms
64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=3 ttl=56 time=184 ms
64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=4 ttl=56 time=172 ms
64 bytes from 64.233.179.104: icmp_seq=5 ttl=56 time=196 ms
ping: sendmsg: Network is unreachable
64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=7 ttl=56 time=210 ms
64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=8 ttl=56 time=181 ms
64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=9 ttl=56 time=168 ms
64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=10 ttl=56 time=168 ms
64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=11 ttl=56 time=171 ms
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=18 ttl=56 time=171 ms
64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=19 ttl=56 time=164 ms
64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=20 ttl=56 time=181 ms
64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=21 ttl=56 time=187 ms 
64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=22 ttl=56 time=192 ms
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
^C
--- google.com ping statistics ---
25 packets transmitted, 15 received, 40% packet loss, time 28231ms
rtt min/avg/max/mdev = 164.443/182.621/210.508/12.774 ms

My /etc/wpa_supplicant.conf file:

network={
    ssid="1010011010"
    #psk="------------"
    psk=------------------------------------------
}

dhcpcd wlan0

$ sudo dhcpcd wlan0 
dhcpcd[18320]: version 5.2.5 starting
dhcpcd[18320]: wlan0: rebinding lease of 192.168.123.102
dhcpcd[18320]: wlan0: acknowledged 192.168.123.102 from 192.168.123.254
dhcpcd[18320]: wlan0: checking for 192.168.123.102
dhcpcd[18320]: wlan0: carrier lost
dhcpcd[18320]: wlan0: carrier acquired
dhcpcd[18320]: wlan0: rebinding lease of 192.168.123.102
dhcpcd[18320]: wlan0: acknowledged 192.168.123.102 from 192.168.123.254
dhcpcd[18320]: wlan0: checking for 192.168.123.102
dhcpcd[18320]: wlan0: leased 192.168.123.102 for 86400 seconds
dhcpcd: wlan0: MTU set to 1500
dhcpcd[18320]: forked to background, child pid 18377

ifconfig

$ ifconfig
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 00:15:AF:78:D4:AA  
          inet6 addr: fe80::215:afff:fe78:d4aa/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3218 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2909 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1959355 (1.8 Mb)  TX bytes:415438 (405.7 Kb)

route

$ route

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.123.0   *               255.255.255.0   U     303    0        0 wlan0
default         192.168.123.254 0.0.0.0         UG    303    0        0 wlan0
share|improve this question
    
It might be helpful for you to post the contents of your wpa_supplicant.conf file. Be sure to remove any secret information (like your network key) before posting. –  Steven D Sep 12 '10 at 15:47
    
10.0.0.2 vs 192.168.0.2 - it looks like 2 different networks? It looks like somehow non-standard configuration. Would you mind to describe the architecture? –  Maciej Piechotka Sep 12 '10 at 15:52
    
Looks like 2 successes on 10.0.0.2 and 2 fails on 192.168.0.2. Show us your ifconfig, the contents of your wpa_supplicant.conf, and describe your network –  Falmarri Sep 13 '10 at 7:45
    
@Maciej, the 10.0.0.2 is just a ip outside of my wireless network. I replaced it with google.com –  NixNinja Sep 13 '10 at 8:45
    
Did this help? –  Tshepang Jan 29 '11 at 8:45
show 1 more comment

2 Answers

It seems to me that wireless signal is low, but that doesn't explain why wicd works.

share|improve this answer
add comment

you want a sleep 10s before the dhcpd part at the least

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.