ifconfig_<interface>_alias<n> deprecated - alternatives?


I've been using interface aliases for a long time now. Today was the first time I read the following in the rc.conf(5) man page:

                 Then note that alias4 would not be added since the search
                 would stop with the missing ``alias3'' entry.  Due to this
                 difficult to manage behavior, the
                 ifconfig_<interface>_alias<n> form is deprecated.

So it seems that the oftenly used ifconfig_<interface>_alias<n> option is deprecated. My question is what shall I use instead of _alias<n> in rc.conf?

- fraenki
ipv4_addrs_<interface> might be the one you are looking for:

One can configure more than one IPv4 address with the
ipv4_addrs_<interface> variable. One or more IP addresses
must be provided in Classless Inter-Domain Routing (CIDR)
address notation, whose last byte can be a range like In this case the address will
be configured with the netmask /24 and the addresses to with the non-conflicting netmask
/32 as explained in the ifconfig(8) alias section. With the
interface in question being ed0, an example could look like:

danger@ said:
ipv4_addrs_<interface> might be the one you are looking for:

Thanks for your reply. I found this option too, but I thought it would not be the right one for me, because there is no ipv6 equivalent, isn't it? I would need both ipv4 and ipv6 aliases, but without the deprecated _alias<n> syntax.

- fraenki
seems like there currently isn't an alternative for ipv6 for this option...you might want to submit a PR with category set to conf.