alias configuration in rc.conf

Philipp Wuensche cryx-freebsd at h3q.com
Mon Oct 17 14:09:11 PDT 2005


Hi,

I don't know if this is the right place, but I created a patch to
/etc/network.subr and /etc/rc.d/netif to add a simpler alias
configuration in rc.conf.

Using the ifconfig_fxp0_aliasN="" syntax is error prone. If you forget
to number N serially correct, /etc/rc.d/netif does not configure all
aliases to the interface. Other weird things happen if N is not uniqe.

Configuring a large number of aliases to an interface (e.g. in
jail-hosting systems) fills up the rc.conf very fast, making the
configuration complex.

With the patches, alias configuration gets a lot easier. At the moment I
use the ipv4_ifconfig variable, its not jet used. Mayby something else
would be better. Using ranges in the last byte of the ipaddr. allows to
configure more than one ipaddr in one statement.

The syntax is as follow:

ipv4_ifconfig_fxp0="192.168.0.1/24 23.23.23.5-23/24"

This will configure fxp0 with the alias 192.168.0.1/24, 23.23.23.5/24
and 23.23.23.6-23/32

You can find the patch at
http://outpost.h3q.com/patches/network.subr-range.patch

Comments and testreports are very welcome :-)

greetings,
cryx


More information about the freebsd-rc mailing list