On Sun, 31 Oct 2021 19:08:51 -0700 (PDT)
Michał Poterek <
superv...@gmail.com> wrote:
> I cannot get ping to ipv6 response on my beaglebone and end devices. IPV4
> is working fine
>
> PING 64:ff9b::808:808(64:ff9b::808:808) 56 data bytes
> From fdde:ad11:11de:0:9da6:e2f:2468:751e: icmp_seq=1 Destination
> unreachable: Address unreachable
> From fdde:ad11:11de:0:9da6:e2f:2468:751e: icmp_seq=2 Destination
> unreachable: Address unreachable
>
> My routing table on beagle bone router
>
> Kernel IPv6 routing table
> Destination Next Hop Flag Met Ref Use
> If
> localhost/128 [::] U 256 2 0
> lo
> 64:ff9b::/96 [::] U 1 2 0
> eth0
> 64:ff9b::/96 [::] U 256 2 0
> wpan0
> 64:ff9b::/96 [::] U 1024 1 0
> nat64
I'd be having a look at whether `tayga` is running properly, and/or
check your `iptables` firewall rules. Basically the NAT64 stuff is in two parts:
`tayga` does "stateless" IPv6 to IPv4 NAT, when a request for the 64::/96 subnet
is received by the kernel, it gets routed to a `tun` device managed by
`tayga`, and `tayga` basically "maps" the IPv6 source address to an
unused IPv4 address in some configured address space.
From there, the now IPv4 packet then gets passed back to the kernel,
where IP masquerade (statefully) NATs the outgoing request so that the
IPv4 reply can be routed back to the BeagleBone's egress interface,
back through `tayga` and eventually back to the node on the mesh.
`iptables-save` might give you some clues, but I'd expect that there's
some rule there that will be picking up the traffic leaving the egress
interface from `tayga`'s IPv4 NAT64 subnet that's intended to be
SNAT-ed or MASQUERADEd.
e.g. on my RevolutionPi, I have in `/etc/tayga.conf`:
```
#
# Dynamic pool prefix. IPv6 hosts which send traffic through TAYGA (and do
# not correspond to a static map or an IPv4-translatable address in the NAT64
# prefix) will be assigned an IPv4 address from the dynamic pool. Dynamic
# maps are valid for 124 minutes after the last matching packet is seen.
#
# If no unassigned addresses remain in the dynamic pool (or no dynamic pool is
# configured), packets from unknown IPv6 hosts will be rejected with an ICMP
# unreachable error.
#
# Optional.
#
dynamic-pool
192.168.255.0/24
```
then in my firewall, I see this rule:
```
# Generated by xtables-save v1.8.2 on Tue Nov 2 01:37:55 2021
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:DOCKER - [0:0]
-A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
-A POSTROUTING -s
172.17.0.0/16 ! -o docker0 -j MASQUERADE
-A POSTROUTING -s
192.168.255.0/24 -j MASQUERADE # ← this one!
-A POSTROUTING -o eth0 -j MASQUERADE
-A OUTPUT ! -d
127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
-A DOCKER -i docker0 -j RETURN
COMMIT
```
--
Stuart Longland (aka Redhatter, VK4MSL)
I haven't lost my mind...
...it's backed up on a tape somewhere.