NAME

autonet - automatic network configuration for multiple networks

SYNOPSIS

autonet [-hvV] [-s device] [-u seconds] [start | stop | restart]

DESCRIPTION

autonet is intended to handle automatic network configuration on a machine which connects to a variety of different networks, such as a laptop.

This manpage is very much a work in progress

When started autonet will check for the first interface matching the following criteria:

CONFIGURATION

The following configuration options can be set in rc.conf:

autonet__nwkey
WEP nwkey for a given ssid

autonet__ifconfig
Parameters to pass to ifconfig instead of running dhclient. can be an interface or an ssid

autonet__defaultroute
Default route to set. can be an interface or an ssid

autonet_media
Order of media types to try. Default: "Ethernet IEEE802.11".

autonet_localscript
Pathname of a local script to be called at various phases. This can be used to perform any additional configuration after a network interface is configured or before it is shutdown, such as starting or stopping daemons. Default: /etc/autonet.local

autonet_flags
If an Ethernet interface needs to be brought up before it will register as active, can specify '-u ' in autonet_flags to cause interfaces to be be brought up followed by a sleep of before testing (Not required on a wm0 or ath0) The audio cues can also be disabled by specifying -s ""

dhclient should be set to NO in rc.conf. If you want autonet to stop and start other daemons such as named, ntp, they should also be set to NO, and /etc/autonet.local should call onestart and onestop

If /usr is separate to / then critical_filesystems_local should include /usr

EXAMPLES

An example for a static configuration on a WEP encrypted access point with an ssid of 'groundhog'.
autonet_groundhog_nwkey=0xe20b93a2bee05c3cee2e9fcd03
autonet_groundhog_ifconfig=192.168.1.253
autonet_groundhog_defaultroute=192.168.1.1

AUTHORS

FILES

${PREFIX}/share/examples/autonet/autonet.local
Sample autonet_localscript. Should be copied to /etc/autonet.local and modified for use

${PREFIX}/share/examples/autonet/lid_switch
Sample powerd lid switch script. Can be copied to /etc/powerd/scripts/lid_switch for use

${PREFIX}/share/examples/rc.d/autonet
rc.d script for automatic use on autonet on machine startup. Copy to /etc/rc.d/autonet for use

BUGS

There is no general purpose way to describe a set of rc.d scripts to be run on autonet start and autonet stop. eg 'autonet_xxxx=YES in rc.conf'

On successful configuration does not take down unused interfaces. This may turn out to be a useful feature if ifwatchd is used in conjunction with autonet to detect when ethernet cables are inserted and removed.

Cannot handle two disparate access points with the same SSID but requiring different configurations, unless one uses WEP and the other does not.

May have issues with SSIDs containing strange characters.

Has not been tested on anything other than NetBSD.

Only prelimiminary testing with ifwatchd - when called with 'ifwatchd -c /usr/pkg/bin/autonet -n /usr/pkg/bin/autonet wm0' ifwatchd appears to call autonet twice on an interface transition from no carrier to carrer.

Calls "wiconfig -D twice" on each interface, once to extract access points with WEP set, and a second time for those without WEP. Should only call once.