Bug 248251

Summary: Cannot define IPv6 alias in the same way as IPv4 aliases on 13-CURRENT
Product: Base System Reporter: Gordon Bergling <gbe>
Component: kernAssignee: freebsd-net (Nobody) <net>
Status: Closed Not A Bug    
Severity: Affects Some People CC: 2khramtsov, hselasky, net
Priority: --- Keywords: needs-qa, regression
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Gordon Bergling freebsd_committer freebsd_triage 2020-07-24 21:16:43 UTC
On a very recent -CURRENT, it isn't possible to define an ipv6 alias in the way you do for ipv4. Considering the following content of a /etc/rc.conf:

ifconfig_genet0="inet 10.0.1.160 netmask 255.255.255.0"
ifconfig_genet0_alias0="inet 10.0.1.189 netmask 255.255.255.0"
defaultrouter="10.0.1.1"
ifconfig_genet0_ipv6="inet6 fec0:db81:1::3 prefixlen 64"
ifconfig_genet0_ipv6_alias0="inet6 fec0:db81:1::ff preflixlen 64"

The ipv4 alias for genet0 is created but the ipv6 one isn't.
Comment 1 Ghost 2020-08-12 19:48:44 UTC
Hi,

Do you still have this issue if you change

ifconfig_genet0_ipv6_alias0="inet6 fec0:db81:1::ff preflixlen 64"

to

ifconfig_genet0_alias1="inet6 fec0:db81:1::ff preflixlen 64"

?
Comment 2 Hans Petter Selasky freebsd_committer freebsd_triage 2020-08-12 19:54:56 UTC
s/preflixlen/prefixlen

--HPS
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2020-08-13 08:13:41 UTC
@Gordon Can you confirm the reported behaviour is explicitly not reproducible in stable/12 at least, if not on prior CURRENT versions? If prior CURRENT versions are not affected, can you include a working revision to assist with bisection
Comment 4 Gordon Bergling freebsd_committer freebsd_triage 2020-08-14 08:27:04 UTC
@hselasky: Thanks for spotting the typo, good catch.

@koobs: thats actually no regression. I first thought that an interface alias also depends the ip protocol version, like it is for the primary ip-address.

ifconfig_genet0="inet a.b.c.d ..."
ifconfig_genet0_ipv6="inet6 fec80:db81:..."

For the interface aliases there is no separated protocol separation. So basically Evgeniy was right. I solved the problem by using these entries in the rc.conf.

ifconfig_genet0_alias0="inet 10.0.1.189 netmask 255.255.255.0"
ifconfig_genet0_alias1="inet6 fec0:db81:1::ff prefixlen 64"

That is also what the manual page of rc.conf(5) describes, so this PR can be closed.