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 some scripting.<br>
<br>
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?<br>
<br>
My other question is regarding dhcpcd. Currently my scripts do dhcpcd
-k &lt;interface&gt; whenever wpa_supplicant indicates that the
interface has been disconnected and then I do dhcpcd &lt;interface&gt;
whenever it is connected. Is there a better way than&nbsp; &quot;kill,
restart&quot; dhcpcd like that? I am using 2.0 version of dhcpcd and its
manpage mentions about using the -o option with wpa_supplicant, ifplugd
etc. but I am not sure how exactly it should be used. Any advise?<br>
<br>
thanks,<br>
Osho<br><br><div><span class="gmail_quote">On 11/12/05, <b class="gmail_sendername">Jouni Malinen</b> &lt;<a href="mailto:jkmaline@cc.hut.fi">jkmaline@cc.hut.fi</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Fri, Nov 11, 2005 at 03:52:33PM -0800, Osho GG wrote:<br><br>&gt; My question concerns regarding starting of dhcpcd. Everytime I have to<br>&gt; manually start the dhcpcd once wpa_supplicant establishes the connection<br>
&gt; with the Access point. Is there a way wpa_supplicant can do it<br>&gt; automatically?<br><br>Yes, or well, to be more exact, wpa_supplicant can be used to generate<br>an event when network connection is established and an external program
<br>would be used to do whatever network configuration is needed. I believe<br>some Linux distributions have already done this kind of integration.<br><br>I added following description into the README file on how to do this
<br>with wpa_cli:<br><br>wpa_cli can used to run external programs whenever wpa_supplicant<br>connects or disconnects from a network. This can be used, e.g., to<br>update network configuration and/or trigget DHCP client to update IP
<br>addresses, etc.<br><br>One wpa_cli process in &quot;action&quot; mode needs to be started for each<br>interface. For example, the following command starts wpa_cli for the<br>default ingterface (-i can be used to select the interface in case of
<br>more than one interface being used at the same time):<br><br>wpa_cli -a/sbin/wpa_action.sh -B<br><br>The action file (-a option, /sbin/wpa_action.sh in this example) will<br>be executed whenever wpa_supplicant completes authentication (connect
<br>event) or detects disconnection). The action script will be called<br>with two command line arguments: interface name and event (CONNECTED<br>or DISCONNECTED). If the action script needs to get more information<br>about the current network, it can use 'wpa_cli status' to query
<br>wpa_supplicant for more information.<br><br>Following example can be used as a simple template for an action<br>script:<br><br>#!/bin/sh<br><br>IFNAME=$1<br>CMD=$2<br><br>if [ &quot;$CMD&quot; == &quot;CONNECTED&quot; ]; then
<br>&nbsp;&nbsp;&nbsp;&nbsp;SSID=`wpa_cli -i$IFNAME status | grep ^ssid= | cut -f2- -d=`<br>&nbsp;&nbsp;&nbsp;&nbsp;# configure network, signal DHCP client, etc.<br>fi<br><br>if [ &quot;$CMD&quot; == &quot;DISCONNECTED&quot; ]; then<br>&nbsp;&nbsp;&nbsp;&nbsp;# remove network configuration, if needed
<br>fi<br><br><br>&gt; My other question is can wpa_supplicant handle wired interfaces?<br><br>Yes, driver_wired.c (-Dwired on command line) can be used to<br>authenticate wired interfaces with IEEE 802.1X. Example from README:
<br><br>6) Authentication for wired Ethernet. This can be used with 'wired'<br>interface<br>&nbsp;&nbsp; (-Dwired on command line).<br><br>ctrl_interface=/var/run/wpa_supplicant<br>ctrl_interface_group=wheel<br>ap_scan=0<br>network={
<br>&nbsp;&nbsp;&nbsp;&nbsp;key_mgmt=IEEE8021X<br>&nbsp;&nbsp;&nbsp;&nbsp;eap=MD5<br>&nbsp;&nbsp;&nbsp;&nbsp;identity=&quot;user&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;password=&quot;password&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;eapol_flags=0<br>}<br><br>--<br>Jouni
Malinen&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PGP
id EFC895FA<br>_______________________________________________<br>HostAP mailing list<br><a href="mailto:HostAP@shmoo.com">HostAP@shmoo.com</a><br><a href="http://lists.shmoo.com/mailman/listinfo/hostap">http://lists.shmoo.com/mailman/listinfo/hostap
</a><br></blockquote></div><br><br clear="all"><br>-- <br>Osho<br><br>