ifconfig, wifi, and DHCP

Brooks Davis brooks at freebsd.org
Mon Mar 17 19:22:40 UTC 2008


On Mon, Mar 17, 2008 at 07:05:20PM +0000, Alphons Fonz van Werven wrote:
> knowtree at aloha.com wrote:
> 
>> ifconfig_wi0="dhcp ssid Oz"
> [snip]
>> Can I use this quoted phrase when I invoke ifconfig manually? I see ssid
>> documented on the man page for ifconfig, but not dhcp.
> 
> It's not ifconfig that calls DHCP, it's the network startup script
> /etc/rc.d/netif. It's also this script that reads rc.conf,  not ifconfig.
> 
> You can either call that script (which will call ifconfig AND DHCP for you)
> or call BOTH ifconfig and DHCP manually.
> 
> In the former case:
> # /etc/rc.d/netif start
> should bring up the network.
> 
> In the latter case:
> # ifconfig wi0 up
> should bring up the network,
> # ifconfig wi0 ssid Oz (plus any additional arguments)
> should get you associated to the network and then
> # dhclient wi0
> should get you an IP address.
> 
> The ifconfig invokations can usually be combined into one, but if you don't
> call the netif script you'll have to invoke DHCP manually.

In theory dhclient shouldn't need to be called manually.  The fact that
it appears to be needed indicates that the wi driver fails to set it's
link state correctly and thus to pass information up to devd which would
start dhclient.

-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-mobile/attachments/20080317/7b8cee2e/attachment.pgp


More information about the freebsd-mobile mailing list