# 8021X,eth0 (wired) ,wpa_supplicant: I'm stuck :)

## cova

Hi all,

I'm facing these issues on my laptop.

I have to connect to different networks: plain wired ethernet, wired ethernet with 802.1X authentication and WPA2/PSK or WPA2/Enterprise (using wpa_supplicant)

Of course I need only one connection active at a time, but I'd like to have this kind of setup:

- the laptop should be able to try ethernet connection, both authenticated or not, and the same for wireless. 

I'm unable to login into 802.1x protected wired network with this command:

#wpa_supplicant  -i eth0 -Dwired -c /etc/wpa_supplicant/wpa_supplicant2.conf

#dhcpch eth0

(provided a good /wpa_supplicant2.conf, like this:

network={

        ssid=""

        key_mgmt=IEEE8021X

        eap=PEAP

        identity="user"

        password="pwd"

        eapol_flags=0

}

but I'm unable to start it using /etc/conf.d/net setup.

I wonder if wpa_supplicant is able to manage more than one interface and how, and this can be setup in gentoo init files.

Has anyone some hints on how to configure startup script, or to some tool (I'm not using any network manager so far) tha can help me in this setup?

----------

## DONAHUE

wpa_gui present? under internet in gnome menu kde ?? starts from wpa_gui in terminal.

typo: dhcpcd eth0 

network={

ssid=""

key_mgmt=IEEE8021X

eap=PEAP

identity="user"

password="pwd"

eapol_flags=0

ap_scan=0

}

----------

## cova

yes, that was a typo,not a cut& paste  :Smile: 

Actually, wpa_gui is present and running and if I start wpa_supplicant on command line as shown wpa_gui shows the connection (802.1x, wired ) working just fine.

My goal is to set up /etc/conf.d/net in a way that at startup, when net.eth0 is fired up, wpa_supplicant is started as well, authenticates and then dhcpd is started for eth0. Til now I'm unable to do so.

Of course, in  /etc/conf.d/net also wlan0 is configured, that in turn uses wpa_supplicant for wpa2 connection.

I work with KDE; for wpa2 enterprise I don't use any specific application (client side) besides wpa_supplicant.

----------

## DONAHUE

what have you in /etc/conf.d/net?

----------

## d2_racing

Did you install any 802.1X package ?

I would like to know how you will do it, because at work, I'm gonna have to plug my laptop inside a NAC network that is using 802.1X with PEAP or EAP-TLS  :Razz: 

----------

## cova

 *DONAHUE wrote:*   

> what have you in /etc/conf.d/net?

 

I've tried different confs, but basically all similar to this:

modules_wlan0="wpa_supplicant !iwconfig dhcpcd netplugd"

modules_eth0="wpa_supplicant dhcpcd netplugd "

----------

## cova

 *d2_racing wrote:*   

> Did you install any 802.1X package ?
> 
> I would like to know how you will do it, because at work, I'm gonna have to plug my laptop inside a NAC network that is using 802.1X with PEAP or EAP-TLS 

 

well, nothing more than wpa_supplicant and iwlagn drivers.

it's easy to have the laptop connected, once you do it by hand; the difficult part could be to find out the correct algo, but nothing more than this (look above for wpa conf that I've used)

----------

## d2_racing

Ok, when I have the chance to test that, I'm gonna post any result.

----------

## nichocouk

Hi,

I managed to get wpa_supplicant to start automatically for both interfaces by editing /etc/conf.d/wpa_supplicant:

```
wpa_supplicant_args="-c/etc/wpa_supplicant/wpa_supplicant_wired.conf -i eth0 -Dwired -N -Dwext -i wlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf"

```

```
$ ps -edf | grep wpa

root      2443     1  0 20:32 ?        00:00:00 /usr/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant_wired.conf -i eth0 -Dwired -N -Dwext -i wlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -B -c/etc/wpa_supplicant/wpa_supplicant.conf

```

I haven't managed to get rid of the extra -c/etc/wpa_supplicant/wpa_supplicant.conf but it does not seem to matter...

----------

