# IPv6 aliases with inet6 accept_rtadv



## pajaro (Jul 24, 2018)

Hello everyone

How do you add more IP's to a server when the server is using `ifconfig_vmx0_ipv6="inet6 accept_rtadv"`? (I already have a main IPv6 address)

```
ipv6_ifconfig_vmx0_alias0="xxxxxx"? Or is a better way since I didn't defined the gateway in rc.conf?
```
Thank you


----------



## SirDice (Jul 24, 2018)

You either use SLAAC or you use static addresses, not both.


----------



## tokred (Jul 27, 2018)

I have not tried this combination by myself, however according to rc.conf(5) your syntax is wrong:

```
Aliases should be set by ifconfig_<interface>_alias<n> with ``inet6'' keyword.  For example:

ifconfig_ed0_ipv6="inet6 2001:db8:1::1 prefixlen 64"
 ifconfig_ed0_alias0="inet6 2001:db8:2::1 prefixlen 64"
```

The next paragraph mentions SLAAC, but does not explicitly negate the possibility of combining both SLAAC and alias:

```
Interfaces that have an ``inet6 accept_rtadv'' keyword in
ifconfig_<interface>_ipv6 setting will be automatically con-
figured by SLAAC (StateLess Address AutoConfiguration)
described in RFC 4862.
```

I would try

```
ifconfig_vmx0_ipv6="inet6 accept_rtadv"
 ifconfig_vmx0_alias0="inet6 2001:db8:2::1 prefixlen 64"
```

I see no reason why it should not work, as an alias could lie e.g. in another network prefix of the SLAAC-assigned one.

Regards


----------



## pajaro (Aug 26, 2018)

Hi Tokred

It works fine 

Thank you!


----------

