# IP aliases not persisting through reboots.



## t0ken (Jan 15, 2010)

I want my IP aliases to persist through reboots.  Is this not the correct entry in the rc.conf file?


```
ifconfig_nfe0="inet 10.0.0.99  netmask 255.255.255.224"
ifconfig_nfe0_alias1="inet 10.0.0.113 netmask 255.255.255.224"
ifconfig_nfe0_alias2="inet 10.0.0.114 netmask 255.255.255.224"
ifconfig_nfe0_alias3="inet 10.0.0.115 netmask 255.255.255.224"
ifconfig_nfe0_alias4="inet 10.0.0.116 netmask 255.255.255.224"
ifconfig_nfe0_alias5="inet 10.0.0.117 netmask 255.255.255.224"
```


----------



## crsd (Jan 15, 2010)

Alias numbers should start at 0 and be continuos, i.e. you can't have alias2 following alias0. Though this syntax is deprecated, try using the following:
	
	



```
ipv4_addrs_nfe0="10.0.0.99/27 10.0.0.113-117/32"
```


----------



## t0ken (Jan 16, 2010)

Thanks!  That's what I get for following a guide to the T, lol.  I'll try renumbering so the aliases start with 0.  If that fails I'll try the deprecated line above.  I don't reboot this box often, but when I do, there's some things I have to deal with to get it back fully running, and the issue with the aliases is one of them.  It might be another week or two before I reboot, it usually only goes down if the power goes out


----------



## crsd (Jan 16, 2010)

Oh, bad wording, I mean that ifconfig_aliasN syntax is deprecated, and you should use ipv4_addrs_<iface> (check rc.conf(5) for explanation).


----------



## phoenix (Jan 16, 2010)

Note, also, that aliases in the same subnet *need* to have a subnet mask of 255.255.255.255 or /32.


----------

