newbie questions about wpa_supplicant
oshogg at gmail.com
Tue Nov 15 03:23:39 EST 2005
Many many thanks Jouni for your detailed response. It has helped me a great
deal in getting closer to "network interfaces just work no matter where I
am" ... I am still not quite there yet but I feel that it is possible with
By the way, my wired interface does not use any authentication. Normally, I
just plug the cable in and do dhcpcd eth1 and it starts working. Can I still
use wpa_supplicant for it?
My other question is regarding dhcpcd. Currently my scripts do dhcpcd -k
<interface> whenever wpa_supplicant indicates that the interface has been
disconnected and then I do dhcpcd <interface> whenever it is connected. Is
there a better way than "kill, restart" dhcpcd like that? I am using
2.0version of dhcpcd and its manpage mentions about using the -o
wpa_supplicant, ifplugd etc. but I am not sure how exactly it should be
used. Any advise?
On 11/12/05, Jouni Malinen <jkmaline at cc.hut.fi> wrote:
> On Fri, Nov 11, 2005 at 03:52:33PM -0800, Osho GG wrote:
> > My question concerns regarding starting of dhcpcd. Everytime I have to
> > manually start the dhcpcd once wpa_supplicant establishes the connection
> > with the Access point. Is there a way wpa_supplicant can do it
> > automatically?
> Yes, or well, to be more exact, wpa_supplicant can be used to generate
> an event when network connection is established and an external program
> would be used to do whatever network configuration is needed. I believe
> some Linux distributions have already done this kind of integration.
> I added following description into the README file on how to do this
> with wpa_cli:
> wpa_cli can used to run external programs whenever wpa_supplicant
> connects or disconnects from a network. This can be used, e.g., to
> update network configuration and/or trigget DHCP client to update IP
> addresses, etc.
> One wpa_cli process in "action" mode needs to be started for each
> interface. For example, the following command starts wpa_cli for the
> default ingterface (-i can be used to select the interface in case of
> more than one interface being used at the same time):
> wpa_cli -a/sbin/wpa_action.sh -B
> The action file (-a option, /sbin/wpa_action.sh in this example) will
> be executed whenever wpa_supplicant completes authentication (connect
> event) or detects disconnection). The action script will be called
> with two command line arguments: interface name and event (CONNECTED
> or DISCONNECTED). If the action script needs to get more information
> about the current network, it can use 'wpa_cli status' to query
> wpa_supplicant for more information.
> Following example can be used as a simple template for an action
> if [ "$CMD" == "CONNECTED" ]; then
> SSID=`wpa_cli -i$IFNAME status | grep ^ssid= | cut -f2- -d=`
> # configure network, signal DHCP client, etc.
> if [ "$CMD" == "DISCONNECTED" ]; then
> # remove network configuration, if needed
> > My other question is can wpa_supplicant handle wired interfaces?
> Yes, driver_wired.c (-Dwired on command line) can be used to
> authenticate wired interfaces with IEEE 802.1X. Example from README:
> 6) Authentication for wired Ethernet. This can be used with 'wired'
> (-Dwired on command line).
> Jouni Malinen PGP id EFC895FA
> HostAP mailing list
> HostAP at shmoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the HostAP