# IPv6 networking problem



## Switch2BSD (Apr 6, 2021)

I have 11.4 run with dual stack, IPv4 works well but static config IPv6 pingable at boot time, after that it’s off. Ipv6 works well if I install Debian. 
Where should I start to investigate?


----------



## zirias@ (Apr 6, 2021)

Short of a crystal ball, you'd typically need to see the relevant configuration (everything related to the interfaces from /etc/rc.conf) plus what you tried (commands), what you expected and what happened instead…


----------



## Switch2BSD (Apr 6, 2021)

Sorry for output. I was banned from forums and had to use 3G on phone to access the forum. Perhaps when I go to cafe with the laptop I will put the output later.
I use static ipv6 config in rc.conf and ifconfig show properly what I want, netstat -r show gateway of ipv6, also I can ping the gateway.


----------



## Switch2BSD (Apr 6, 2021)

In fact, it works until I ping 9-10 times.


----------



## SirDice (Apr 6, 2021)

I have IPv6 working here for at least a decade, without issues. Using a mix of static addresses and SLAAC hosts. So it's not a common problem. 



Switch2BSD said:


> In fact, it works until I ping 9-10 times.


Firewall? Sounds like the interface works until the firewall rules get loaded. Or maybe it's some badly configured `overload` rule.


----------



## Switch2BSD (Apr 6, 2021)

No Sir, just only static ip6 config (that will work for a century on debian, perhaps). Because it stops after booted, I have checked for firewall, but the system is newly installed with base setup.
Strangely, ipv4 works then stops after I add a virtual switch (as guided of vm-bhyve).
I think network card firmware/config causing problem. 
P/S: I dont know why I cannot access forums from my ISP (dynamic IP)


----------



## SirDice (Apr 6, 2021)

Switch2BSD said:


> Strangely, ipv4 works then stops after I add a virtual switch (as guided of vm-bhyve).
> I think network card firmware/config causing problem.


It works best if you bridge to a interface that has no local addresses assigned to it. I.e. reserve an interface specifically for bridging with VMs.


----------



## Switch2BSD (Apr 6, 2021)

After hard reboot the machine, I could traceroute6 to google, but it stops at 7th hop. No firewall at all. I have changed ixl to ixgbe interface load, but the same result. While searching SuperMicro X10SDV-4C-TLN2F (Intel Xeon 15xx): it was a problem in 2015-2017.


----------



## SirDice (Apr 6, 2021)

Switch2BSD said:


> While searching SuperMicro X10SDV-4C-TLN2F (Intel Xeon 15xx)


Mine's a lot older, X8DT3-LN4F, running 13.0-STABLE at the moment but was upgraded over the years from 11-STABLE to 12-STABLE and recently 13-STABLE. 

I would suggest upgrading to 12.2 though. FreeBSD 11 is going to go EoL some time soon (no definitive date yet but it's bound to happen once 13.0 is ready).


----------



## Switch2BSD (Apr 6, 2021)

Just change the name of ipv6 static route (whatever we want), but it works.
Please tell me why?


----------



## SirDice (Apr 6, 2021)

Switch2BSD said:


> Just change the name of ipv6 static route (whatever we want), but it works.


You should be using `ipv6_defaultrouter`, similar to `defaultrouter` for IPv4, why the need for static routes?


----------



## Switch2BSD (Apr 7, 2021)

File /etc/rc.conf was:

```
zfs_enable="YES"
ipv6_enable="YES"
# Network configuration (IPv4)
ifconfig_ix0="inet 149.xxx.zzz.147 netmask 255.255.255.0 broadcast 149.xxx.zzz.255"
defaultrouter="149.xxx.zzz.254"

# Network configuration (IPv6)
ifconfig_ix0_ipv6="inet6 2607:abc:xx:zzz::1 prefixlen 64 accept_rtadv no_radr"
ipv6_network_interfaces="ix0"
ipv6_default_interface="ix0"
ipv6_defaultrouter="2607:abc:xx:zff:ff:ff:ff:ff"
ipv6_route_abcgw="2607:abc:xx:zff:ff:ff:ff:ff -prefixlen 64 -interface ix0"
ipv6_static_routes="abcgw"
```

I have just changed *abcgw* into *xyzgw*, but it works!
As you mentioned, should I delete 2 last lines?

```
# Network configuration (IPv6)
ifconfig_ix0_ipv6="inet6 2607:abc:xx:zzz::1 prefixlen 64 accept_rtadv no_radr"
ipv6_defaultrouter="2607:abc:xx:zff:ff:ff:ff:ff"
```


----------

