Am Tage des Herren Tue, 20 May 2025 23:30:24 +0100
Lexi Winter <i...@freebsd.org> schrieb:

> A FreeBSD User:
> > I need a IPv6 prefix on bridge0. With the "wrong/faulty" concept I
> > simply used 
> > 
> > rtsold_flags="-iu igb0"
> > 
> > within /etc/rc.conf. Changing this line to
> > rtsold_flags="-iu bridge0" while bridge0 is up and running doesn't work, 
> > neither does
> > "rtsol bridge0" show any results.  
> 
> unfortunately, i cannot reproduce this.

I can - as long I use the recent rc scripts of the system!
> 
> test1# ifconfig bridge0 create
> test1# ifconfig bridge0 inet6 -ifdisabled auto_linklocal accept_rtadv addm 
> epair2b up
> test1# rtsol bridge0
> test1# ifconfig bridge0
> bridge0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> 
> metric 0 mtu 1500
>       options=0
>       ether ea:1f:5d:1b:70:9d
>       inet6 fe80::e81f:5dff:fe1b:709d%bridge0/64 scopeid 0xc
>       inet6 2001:db8:100:0:e81f:5dff:fe1b:709d/64 autoconf pltime 604800 
> vltime 2592000
>       id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
>       maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
>       root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
>       member: epair2b flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
>               ifmaxaddr 0 port 11 priority 128 path cost 2000
>       groups: bridge
>       nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
> test1#

Performing things manually on CLI works as expected, but there are some odds 
when using
rc.conf for persistent configuration.

But I managed! Avoiding dedicated "ifconfig_bridgeXXXX=addm igb0 ..."

cloned_interfaces="bridge0 bridge1 tap0"
autobridge_bridge0="igb0"
autobridge_bridge1="igb1"
ifconfig_bridge0="inet ..."
ifconfig_bridge0_ipv6="inet6 ..."
ifconfig_igb0="up"
ifconfig_igb1="up"
> 
> note that there is an existing, unrelated bug[0] where the bridge will
> not correctly set auto_linklocal and accept_rtadv by default, so you
> need to do this explicitly.
> 
> if that isn't the issue, can you please show the output of 
>       % ifconfig bridge0
> prior to running rtsol?
> 
> also, i understand from your other post that you need a specific
> MAC address on the bridge to get the right SLAAC IP address.
> in that case, you will need to either change the lladdr of the
> bridge, or set net.link.bridge.inherit_mac=1 to make the bridge
> inherit the address of the first member.

And here I face a problem (from a simple user/administrators point of view):
Using autobridge_XXX as mentioned above.

Setting net.link.bridge.inherit_mac=1 (also in /etc/sysctl.conf). The bridge's 
MAC is then set
to the last element in the list (tap2 in the example following)
autobridge_bridge0="igb0 tap0 tap1 tap2"
which is not mentioned anywhere.

Having finally managed to set the correct MAC address of the bridge ("ether 
...."),
the  host portion of the IPv6 address fetched via rtsol DOES NOT contain the 
correct MAC
address (at least in my case).

autobridge_bridge0="igb0" with et.link.bridge.inherit_mac=1 set the bridge 
should inherit the
physical NICs MAC (which the bridge does), but after the jail rc startup 
scripts starting
adding the epairX interfaces, the bridge then fetches an IPv6 host address 
which does not
contain the MAC address! This is weird.

A bug or something I missed?

> 
> [0] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254445



-- 

A FreeBSD user

Attachment: pgpJGB6fUmpQZ.pgp
Description: OpenPGP digital signature

Reply via email to