I'm reaching out to the community for assistance with an issue I've encountered while attempting to use FreeBSD 14.2 as a gateway.
### Problem Description
I hope the WAN interface `em0` can obtain an IPv6 address from the ISP via SLAAC (Stateless Address Autoconfiguration) because my ISP only provides dynamic IPv6 addresses. However, when I set the kernel parameter `net.inet6.ip6.forwarding` to `1`, the WAN interface `em0` fails to obtain the IPv6 default gateway via SLAAC. Nevertheless, when I set `net.inet6.ip6.forwarding` back to `0` and then run `/etc/rc.d/netif restart`, the `em0` interface can successfully acquire the IPv6 default gateway.
### Configuration Details
#### `/etc/rc.local` Configuration
#### Kernel Parameters
I would greatly appreciate any insights, suggestions, or solutions to resolve this issue. Thank you!
### Problem Description
I hope the WAN interface `em0` can obtain an IPv6 address from the ISP via SLAAC (Stateless Address Autoconfiguration) because my ISP only provides dynamic IPv6 addresses. However, when I set the kernel parameter `net.inet6.ip6.forwarding` to `1`, the WAN interface `em0` fails to obtain the IPv6 default gateway via SLAAC. Nevertheless, when I set `net.inet6.ip6.forwarding` back to `0` and then run `/etc/rc.d/netif restart`, the `em0` interface can successfully acquire the IPv6 default gateway.
### Configuration Details
#### `/etc/rc.local` Configuration
Code:
#config interfaces
#config em0
ifconfig_em0="DHCP"
ifconfig_em0_ipv6="inet6 accept_rtadv"
#### Kernel Parameters
Code:
[10:36]root@freebsd:~ # sysctl -a | grep net.inet6.ip6
net.inet6.ip6.forwarding: 1
net.inet6.ip6.redirect: 1
net.inet6.ip6.hlim: 64
net.inet6.ip6.maxfragpackets: 1925
net.inet6.ip6.accept_rtadv: 1
net.inet6.ip6.log_interval: 5
net.inet6.ip6.hdrnestlimit: 15
net.inet6.ip6.dad_count: 1
net.inet6.ip6.auto_flowlabel: 1
net.inet6.ip6.defmcasthlim: 1
net.inet6.ip6.gifhlim: 30
net.inet6.ip6.kame_version: FreeBSD
net.inet6.ip6.use_deprecated: 1
net.inet6.ip6.rr_prune: 5
net.inet6.ip6.v6only: 1
net.inet6.ip6.use_tempaddr: 0
net.inet6.ip6.temppltime: 86400
net.inet6.ip6.tempvltime: 604800
net.inet6.ip6.auto_linklocal: 1
net.inet6.ip6.prefer_tempaddr: 0
net.inet6.ip6.use_defaultzone: 0
net.inet6.ip6.maxfrags: 1925
net.inet6.ip6.mcast_pmtu: 0
net.inet6.ip6.no_radr: 0
net.inet6.ip6.norbit_raif: 0
net.inet6.ip6.rfc6204w3: 0
net.inet6.ip6.intr_queue_maxlen: 256
net.inet6.ip6.maxfragsperpacket: 64
net.inet6.ip6.maxfragbucketsize: 3
net.inet6.ip6.fw.enable: 1
net.inet6.ip6.fw.permit_single_frag6: 1
net.inet6.ip6.fw.deny_unknown_exthdrs: 1
net.inet6.ip6.dad_enhanced: 1
net.inet6.ip6.source_address_validation: 1
net.inet6.ip6.log_cannot_forward: 1
net.inet6.ip6.connect_in6addr_wild: 1
net.inet6.ip6.mcast.loop: 1
net.inet6.ip6.mcast.maxsocksrc: 128
net.inet6.ip6.mcast.maxgrpsrc: 512
net.inet6.ip6.fraglifetime_ms: 60000
net.inet6.ip6.frag6_nfragpackets: 0
net.inet6.ip6.frag6_nfrags: 0
I would greatly appreciate any insights, suggestions, or solutions to resolve this issue. Thank you!