Specifying link-local address in rc.conf

Niclas Zeising zeising+freebsd at daemonic.se
Mon Jul 6 14:25:45 UTC 2020


On 2020-07-06 16:00, Eugene Grosbein wrote:
> 06.07.2020 18:05, Niclas Zeising wrote:
>> Hi!
>> Is it possible to specify a link-local address in rc.conf, and get only that link-local address?
>>
>> When I add a specific link-local address, such as fe80::1/64, to an interface from the command line,
>> and then add a global uincast address, it works as expected, I do not get an additional link-local address.
> 
> What is exact syntax what works for you manually?

ifconfig vtnet0 inet6 fe80::1/64
ifconfig vtnet0 inet6 2001:6b8::1/64

This does not create additional link-local addresses, just fe80::1.

> 
>> When I try to do the same in rc.conf however, it does not work.
>> I have added the following:
>> ifconfig_vtnet0_inet6="inet6 fe80::1/64"
>> ifconfig_vtnet0_alias0="2001:6b8::1/64"
> 
> You missed "inet6 " address family prefix for the last line. Does adding it help?
>

No, that's just an error from transcribing the setup.  With that in 
/etc/rc.conf I get three addresses on the interface;
* fe80::1/64
* the EUI64 link-local address (fe80::<EUI64>/64)
* 2001:6b8::1/64

Regards
-- 
Niclas


More information about the freebsd-net mailing list