Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dhcpcd problems ONLY when connecting to secured networks ?!?
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
Mgiese
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1335
Location: indiana

PostPosted: Fri Mar 15, 2013 2:25 am    Post subject: dhcpcd problems ONLY when connecting to secured networks ?!? Reply with quote

hi there,

just getting mad here. can not configure my wlan to obtain a dhcp ip. i am using dhcpcd right now. lan works wlan not :(

i tried a different dhcp client as well : pump, but was unable to compile it due to missing patches on several servers i checked. i also tried with dhcp(dhclient) but i cant even get a decent verbose output of what is not working. so i went back to dhcpcd. i tried 5.6.4 and 5.2.12 both are doing the same. not giving my an ip. the dhcp server by itself works flawlessly with android,symbian and windows devices (fritzbox btw).

when firing up dhcpcd in console i get the following output :


eth1 wireless:
Code:

# dhcpcd eth1
dhcpcd[16999]: version 5.6.6 starting
dhcpcd[16999]: eth1: sending IPv6 Router Solicitation
dhcpcd[16999]: eth1: checking for 169.254.102.167
dhcpcd[16999]: eth1: sending IPv6 Router Solicitation
dhcpcd[16999]: eth1: using IPv4LL address 169.254.102.167
dhcpcd[16999]: forked to background, child pid 17036




thanks for ANY help on this issue it might also solve my problems connecting to my universities WLAN (wpa2).
_________________
I do not have a Superman complex, for I am God not Superman :D
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1238
Location: 42.68n 85.41w

PostPosted: Fri Mar 15, 2013 3:40 am    Post subject: Reply with quote

if your using a GUI front end i know turning off eth1 and dhcpcd and turning on networkmanager (and nm-applet) will connect and assign an ip. i know that once your NM auto connect stuff is setup and good it will work in cli only too. i dont exactly know how to set up network manager for command line only if your not using a gui. im pretty sure that can be done also but would take research on your part, and probably posting to the wiki for future users with your exact same problem :twisted:
_________________
cat /etc/*-release
Funtoo Linux - baselayout 2.2.0
consider this warning no. 1
https://wiki.gentoo.org/index.php?title=Special:Contributions/666threesixes666&offset=&limit=500&target=666threesixes666
Back to top
View user's profile Send private message
Mgiese
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1335
Location: indiana

PostPosted: Fri Mar 15, 2013 3:54 am    Post subject: Reply with quote

hi,

after tackling the problem a bit more, i can connect to unsecured networks and wep networks , there i can obtain an ip. only WPA/WPA2 networks dont receive an ip. so i guess some cypher
kernel side modules are missing.

i need support for wpa/wpa2-PSK , TKIP and AES-CCMP

any suggestions on which modules i have to put in the kernel are very welcome !!!
thanks a lot ...
_________________
I do not have a Superman complex, for I am God not Superman :D
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2244

PostPosted: Fri Mar 15, 2013 9:29 am    Post subject: Reply with quote

Mgiese ...

If it is a lack of kernel support then you will not have authenticated with the AP when using WPA or WPA2/RSN. Anyhow, CCMP uses AES (so, CONFIG_CRYPTO_AES and one of CONFIG_CRYPTO_AES_586 or CONFIG_CRYPTO_AES_NI_INTEL dependent on hardware). For TKIP you need arc4 (CONFIG_CRYPTO_ARC4) but as this is also used for WEP, and you say you can connect via WEP, its mostly likely enabled.

I don't think this is the issue however, I suspect that dhcpcd is either set to start in the default runlevel *or* something in the default runlevel 'need[s] net' and so starts dhcpcd. Please try the following:

/etc/rc.conf
Code:
rc_dhcpcd_provide="!net"
rc_depend_strict="NO"

The former will prevent dhcpcd from providing 'net' and the latter will assure that either net.eth0 *or* net.wlan0 are sufficent to 'provide net' (so, basically both are not required ... see the explanation in rc.conf).

I'm not sure what you have in /etc/conf.d/net but I assume its something like the following:

Code:
modules_wlan0="!plug wpa_supplicant dhcpcd"
wpa_supplicant_wlan0="-Dnl80211 -qq"
wpa_timeout_wlan0="15"
config_wlan0="dhcp"
dhcpcd_wlan0="-t 10"
enable_ipv6_wlan0="false"

So, use dhcpcd and provide a timeout of 10 seconds for dhcpcd, don't request ipv6, etc, etc.

Now, if there are any services set to run in the default runlevel that 'need net' then something (ie, net.${IFACE}) has to meet that need, so one or other ${IFACE} should be set to start in 'default'. If you have both net.${IFACE} then it'll bring up both and may cause issues with routing if these are on the same subnet. Ideally you would have only one net.${IFACE} and have some method (ie: ifplugd) to switch between one or other as and when an ethernet cable is connected/disconnected (... well, there are many ways to approach this, but that is one).

I'm somewhat guessing as to what the issue is here because you haven't really provided enough information as to what is failing. As you mentioned your university as being a network your not able to connect to then it may be as your not using the correct authentication method, university networks don't tend to use WPA-PSK but EAP-PEAP/MSCHAPv2 ... if the network is 'eduroam' then this will no doubt be the case. So, a number of things may be at issue here, and from the little information provided its difficult to see what exactly, I can't even be sure your authenticating with the AP in question.

best ... khay
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2244

PostPosted: Fri Mar 15, 2013 9:51 am    Post subject: Reply with quote

666threesixes666 wrote:
if your using a GUI front end i know turning off eth1 and dhcpcd and turning on networkmanager (and nm-applet) will connect and assign an ip. i know that once your NM auto connect stuff is setup and good it will work in cli only too. i dont exactly know how to set up network manager for command line only if your not using a gui. im pretty sure that can be done also but would take research on your part, and probably posting to the wiki for future users with your exact same problem

666threesixes666 ... again, more useless and distracting information from you. So, the reason no IP address is asgined is Mgiese isn't using the correct tool? You do understand the NM is just a front end to wpa_supplicant, etc, so it doesn't automagically "connect and assign an ip", it too needs to be configured correctly, and have the necessary modules, etc, to do so. Your advice basically boils down to install NM, which is not advice at all ...

best ... khay
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1238
Location: 42.68n 85.41w

PostPosted: Fri Mar 15, 2013 6:19 pm    Post subject: Reply with quote

my kernels generic from upstream with config_tun enabled for hamachi. (you can safely disregard config_tun in your kernel as i just turned it on 3 days ago) i have known wpa2 wep and open functional connectivity. did you try using a static ip address? did you try a live ubuntu flash key to see if it does any better?


khayyam, once again your making assumptions... ("NM is just a front end to wpa_supplicant" not so, it controls other connectivity related files.)

Code:

cat /etc/conf.d/net
#Generated by NetworkManager


mgiese if you want help from more than me and the troll post pastebins of

Code:

dmesg | grep wlan


&

(as root)
Code:

lspci | grep net


&

(you might need to enable this in your kernel, or give a kernel config used to build your kernel, but prefer this as it is what your running with 100% certainty)
Code:

zcat /proc/config.gz

_________________
cat /etc/*-release
Funtoo Linux - baselayout 2.2.0
consider this warning no. 1
https://wiki.gentoo.org/index.php?title=Special:Contributions/666threesixes666&offset=&limit=500&target=666threesixes666
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2374
Location: UK

PostPosted: Sat Mar 16, 2013 1:42 am    Post subject: Reply with quote

666threesixes666 wrote:
mgiese if you want help from more than me and the troll

I get the impression those are not two distinct users. You had better fix your attitude on these forums, and soon.

Quote:
(as root)
Code:

lspci | grep net


False statement correction: running /usr/sbin/lspci does not require root.
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2244

PostPosted: Sat Mar 16, 2013 9:21 am    Post subject: Reply with quote

666threesixes666 wrote:
my kernels generic from upstream with config_tun enabled for hamachi. (you can safely disregard config_tun in your kernel as i just turned it on 3 days ago)

666threesixes666 ... which is about as relevant to mgiese's problem as what you ate this moring for breakfast. So, you thought you'd throw that in even though it has no baring on the question at hand, and then state that its can be "safely disregard" ... hmmm, perfect, that's *exactly* what I ment when describing your posts as providing "useless and distracting information".

666threesixes666 wrote:
i have known wpa2 wep and open functional connectivity.

In the biblical sense? But do explain to us what "open functional connectivity" is, sounds like what we plebian network admins call 'networking' .. or simply BS.

666threesixes666 wrote:
did you try using a static ip address? did you try a live ubuntu flash key to see if it does any better?

Why not suggest they try another computer? Yes, a static IP or livecd may cause the problem to disapear but it doesn't provide any solution for the current install/problem ... ie: being authenticated and/or being provided an IP via DHCP. I tried to tackle the most common reasons for this above ... and prompt for further info, but your approach seems to revolve around vague suggestions as to "things to try".

666threesixes666 wrote:
khayyam, once again your making assumptions... ("NM is just a front end to wpa_supplicant" not so, it controls other connectivity related files.)

Once again? ... anyhow, you carefully misquoted me, I wrote "NM is just a front end to wpa_supplicant, etc" ... I'm quite aware that NM writes to /etc/conf.d/net, but my point stands, installing NM (which is what your advice boils down to) doesn't change the fact that for things to happen it needs to be configured, so if, say, the network that Mgiese is trying to connect to is EAP-PEAP/MSCHAPv2 then it will still fail if s/he uses WPA-PSK as the authentication regardless of using NM.

666threesixes666 wrote:
mgiese if you want help from more than me and the troll

Mgiese need only look over my posts and compare them to yours and come to their own conclusion as to who might be the 'troll' and/or who's advice to follow.

666threesixes666 wrote:
(as root) lspci | grep net

As has been pointed out by Ant. P ... you do not need root privilages to run "lspci" ... so there we have another example of your providing useless, false, or irrelevant, information ... of which there are plenty more examples.

I'd suggest you either trying being a little more modest about your skill level, or try to focus your response to the question at hand ... because mostly your posts are just noise.
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1238
Location: 42.68n 85.41w

PostPosted: Sun Mar 17, 2013 12:38 am    Post subject: Reply with quote

so as i was setting up, if ubuntu works on the hardware your testing it on, and ubuntu is known to use network manager, and the kernel modules are correctly installed as identified by hardware printed in lspci, man nmcli is the manual to the command line only version of network manager, subverting the problem occuring in either net.ethX, or dhcpcd (and that can be further decyphered exactly where the problem is by trying the static ip address using the ip address information obtained via the ubuntu live key)


and trolls are gracefully ignored. look at that gigantic trolling post...

Ant P. why is it in sbin and not bin? sbin is in roots path, but not users and is generally reserved for root. sure users can use it if giving absolute paths but who does that?

http://www.linfo.org/sbin.html

http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard


i suspect your a puppet of khayyam
_________________
cat /etc/*-release
Funtoo Linux - baselayout 2.2.0
consider this warning no. 1
https://wiki.gentoo.org/index.php?title=Special:Contributions/666threesixes666&offset=&limit=500&target=666threesixes666
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2374
Location: UK

PostPosted: Sun Mar 17, 2013 5:32 am    Post subject: Reply with quote

666threesixes666 wrote:
i suspect your a puppet of khayyam

I was willing to give you the benefit of the doubt before, but at this point you're a lost cause. You are pathetically immature, you attack people who correct you when you should be grateful, you don't know anything you post about and refuse to learn.

You're a textbook ricer of the worst kind; the sort that thinks they're a hot shit 1337 hax0r because they use Linux. Get lost and don't come back until you've grown up.
Back to top
View user's profile Send private message
gerard82
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2228
Location: Netherlands

PostPosted: Sun Mar 17, 2013 11:56 am    Post subject: Reply with quote

@Ant P.
++
Gerard.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Mar 17, 2013 12:35 pm    Post subject: Reply with quote

MgieseMgiese,

Your IP address fits into the link local range,
Code:
NetRange:       169.254.0.0 - 169.254.255.255
CIDR:           169.254.0.0/16
OriginAS:       
NetName:        LINKLOCAL-RFC3927-IANA-RESERVED
so while you have an IP address, its intended for use on networks without a gateway. Thats unlikley to be what you want at all.

From your
Code:
# dhcpcd eth1
dhcpcd[16999]: version 5.6.6 starting
dhcpcd[16999]: eth1: sending IPv6 Router Solicitation
dhcpcd[16999]: eth1: checking for 169.254.102.167
dhcpcd[16999]: eth1: sending IPv6 Router Solicitation
dhcpcd[16999]: eth1: using IPv4LL address 169.254.102.167
dhcpcd[16999]: forked to background, child pid 17036
You have a valid lease on that IP and dhcpcd is simply reusing it, as its allowed to do.

You need to tell dhcpcd to drop your lease. Unless you know you will want to use a link local address, rebuild dhcpcd with USE=-zeroconf so that it will fail with a useful message, rather than assigning you an almost useless link local IP.

--edit--
I'm having a 'senior moment' with leases and link local IP addresses. Link local addresses can be self assigned when no dhcp server can be found.
_________________
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
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6429
Location: Blighty

PostPosted: Mon Mar 18, 2013 12:17 am    Post subject: Reply with quote

NeddySeagoon wrote:
rebuild dhcpcd with USE=-zeroconf so that it will fail with a useful message, rather than assigning you an almost useless link local IP.

--edit--
I'm having a 'senior moment' with leases and link local IP addresses. Link local addresses can be self assigned when no dhcp server can be found.


OR you can dare I say edit dhcpcd.conf(5) and disable zeroconf, or rather ipv4ll like so
Code:
# Disable IPv4LL, aka ZeroConf
noipv4ll


I strongly disagree with USE flags just settings bits in config files - it's a waste of compiler time when you want to change an option.
_________________
Use dhcpcd for all your automated network configuration needs
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Mar 18, 2013 5:32 pm    Post subject: Reply with quote

UberLord,

Thank you for popping up.
_________________
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
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6429
Location: Blighty

PostPosted: Mon Mar 18, 2013 5:33 pm    Post subject: Reply with quote

NeddySeagoon wrote:
UberLord,

Thank you for popping up.


Always glad to popup when you least expect it Neddy ;)
_________________
Use dhcpcd for all your automated network configuration needs
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