- automatic network configuration for multiple networks
[start | stop | restart]
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:
An Ethernet interface with 'status: active'
An WEP configured access point via a IEEE802.11 interface with an
ssid where there is an entry in rc.conf of the form:
An non WEP configured access point via a IEEE802.11 interface.
The following configuration options can be set in rc.conf:
WEP nwkey for a given ssid
Parameters to pass to ifconfig instead of running dhclient. can be
an interface or an ssid
Default route to set. can be an interface or an ssid
Order of media types to try. Default: "Ethernet IEEE802.11".
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.
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
An example for a static configuration on a WEP encrypted access point with
an ssid of 'groundhog'.
Sample autonet_localscript. Should be copied to
and modified for use
Sample powerd lid switch script. Can be copied to
rc.d script for automatic use on autonet on machine startup. Copy to
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.