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

Hi,

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:

Code:
                 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
192.168.0.5-23/24. In this case the address 192.168.0.5 will
be configured with the netmask /24 and the addresses
192.168.0.6 to 192.168.0.23 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:

ipv4_addrs_ed0="192.168.0.1/24 192.168.1.1-5/28"
 
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.
 
Back
Top