You are not logged in.
After
sudo ip link set wlp2s0 upruns successfully,
ip link show dev wlp2s0outputs
3: wlp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
link/ether dc:85:de:31:98:10 brd ff:ff:ff:ff:ff:ffNonetheless, I try configuring the network with wpa_supplicant (which outputs "Successfully initialized wpa_supplicant"), and getting an ip address with
sudo dhclient wlp2s0which either runs successfully or tells me
RTNETLINK answers: File exists, and I am connected to the internet briefly, after which it kicks me off, and running dhclient again repeats the process. By the way, dhcpcd never worked for me.
Any idea what's going on? Thanks.
Last edited by vdrachtseq (2013-11-29 19:45:16)
Offline
Any idea what's going on? Thanks.
I don't think this question can really be answered without at least a bit of debugging info. What do those commands tell you? Did you try running them in the foreground in verbose?
Offline
None of the commands except dhclient appear to have a verbose option. The output of
sudo dhclient -v wlp2s0is
Internet Systems Consortium DHCP Client 4.2.5-P1
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wlp2s0/dc:85:de:31:98:10
Sending on LPF/wlp2s0/dc:85:de:31:98:10
Sending on Socket/fallback
DHCPREQUEST on wlp2s0 to 255.255.255.255 port 67
DHCPREQUEST on wlp2s0 to 255.255.255.255 port 67
DHCPACK from 192.168.1.1
bound to 192.168.1.114 -- renewal in 41775 seconds.Besides that, I specified all output I received in the original post.
Last edited by vdrachtseq (2013-11-29 20:14:47)
Offline
Does it really kick you off? Do you have a good signal to your AP? Does it happens with all APs?
English isn't my first language.
Is Arch Linux user called archer? Where are our bows and arrows?
Offline
3: wlp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000 link/ether dc:85:de:31:98:10 brd ff:ff:ff:ff:ff:ffNonetheless, I try configuring the network with wpa_supplicant (which outputs "Successfully initialized wpa_supplicant"), and getting an ip address with
sudo dhclient wlp2s0Any idea what's going on? Thanks.
I have to ask. Why do you expect dhclient to work when you have no carrier? How is it possibly going to find a DHCP server when there is no link established.
First you must be associated with an access point -- then -- you can ask that the router associated with that access point for an address.
From my system
ewaller$@$odin ~ [1]1004 %iw wlan0 link
Connected to c4:3d:c7:5d:eb:8f (on wlan0)
SSID: Woodlyn
freq: 2412
RX: 97838296 bytes (855606 packets)
TX: 9190971 bytes (69136 packets)
signal: -43 dBm
tx bitrate: 48.0 MBit/s
bss flags: short-preamble short-slot-time
dtim period: 0
beacon int: 100
ewaller$@$odin ~ 1005 %ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 00:23:5a:40:e1:40 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 00:21:00:d9:45:47 brd ff:ff:ff:ff:ff:ff
ewaller$@$odin ~ 1006 %Notice that I am attached to an access point, and I can see its name and its MAC in the iw command. Note that my ip output does not indicate "NO-CARRIER", rather shows the link as "UP"
You need to look at how to establish the link. What kind of encryption does your AP use? Open? WPA? WEP 1/2? The first two, you can handle with w. The last requires wpa_supplicant.
Rather than trying to hand fly all of that, why not use netctl, wicd or NetworkManager ??
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
You need to look at how to establish the link. What kind of encryption does your AP use? Open? WEP? WPA 1/2? The first two, you can handle with iw. The last requires wpa_supplicant.
Yeah, ewaller is right. That would also explain, why dhcpcd didn't work for you at the first place. As he did, I also recommend you to use something like netctl.
Last edited by mrinx (2013-11-30 17:50:41)
English isn't my first language.
Is Arch Linux user called archer? Where are our bows and arrows?
Offline
wicd is an alternative too, and I think it is even easier to use/configure than netctl ![]()
Offline
wicd is an alternative too, and I think it is even easier to use/configure than netctl
Yes this would be easier, but it also takes away the opportunity for one to understand the manual connection process. Knowing how to use wpa_supplicant (and wpa_passphrase) to manually associate with an AP, and the process of obtaining an IP (either via dhcp or statically) IMO is a great thing to know if you ever need to debug.
Though... maybe that is indeed the kind of thing the OP needs.
Offline
It seems to me that the last 4 posters have failed to read this part of the original post:
I try configuring the network with wpa_supplicant (which outputs "Successfully initialized wpa_supplicant")Posting the output of ip link show dev wlp2s0 in the original post was just to demonstrate that the device had not been brought up as I had told it to--obviously I was not associated with an AP at that point. I used wpa_supplicant + dhclient to connect to wireless networks with no problem in Debian. If you'd like to know the exact command I run, it's
wpa_supplicant -B -iwlp2s0 -c/etc/wpa_supplicant.confMy wpa_supplicant.conf is as simple as
network={
ssid="networkname"
psk="password"
}Anyone see any problems there?
mrinx: To answer your question, this is the only AP I've had the opportunity to try to connect to. As I said, after running dhclient successfully, I am able to access the internet/ping sites/etc for ~10-30 seconds before I am no longer able to unless I run dhclient again, in which case the process repeats.
ewaller: I don't have the iw command, or I would try running the command you mentioned to see if I'm associated with an access point after running wpa_supplicant. Could this be part of the problem?
Offline
You may have tried wpa_supplicant, but you are not associated. Yes, the iw command is fundamental to managing a wireless connection; it would be run after using wpa_supplicant to ensure you are connected. You will get nowhere until you are associated wit an AP.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
I didn't miss that part. Starting wpa_supplicant doesn't necessarily mean that it has properly associated with the access point. How did you make your wpa_supplicant.conf? Did you use wpa_passphrase? wpa_supplicant.conf is super picky about trailing whitespace, so if you made it by hand, there is a very good chance that there are indeed problems with your config.
Offline
Thanks for the help guys. I was under the false impression that wpa_supplicant associated the interface with an AP. In Debian, the iw step can be skipped. It would always help to read Arch documentation though, wouldn't it? I can't say I have successfully solved out the problem because I no longer have access to a wireless network and may not for a while, but I will update this thread when I do. I have downloaded the Arch wireless configuration wiki page for reference.
Last edited by vdrachtseq (2013-12-02 20:30:08)
Offline