Running 464 XLAT on two IPv6 Cellular Interfaces

Hi Everyone,

I am having a OpenWRT router (19.07) with Dual Cellular Interfaces . For Both the Cellular Interfaces I have selected the PDP type as IPv6 - Accordingly i am getting valid IPv6 IP's from my ISP .

I want to use 464 XLAT on both of these interfaces. I am able to configure it according from my /etc/config/network and accordingly route -n output shows both Interfaces up .

Here is the relevant sections of information for router

  1. IP addresses of usb0 and usb1 interfaces

usb0 Link encap:Ethernet HWaddr 02:0C:29:A3:9B:6D
inet6 addr: fe80::c:29ff:fea3:9b6d/64 Scope:Link
inet6 addr: 2409:40f2:d:c4ef:c:29ff:fea3:9b6d/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:349 errors:0 dropped:0 overruns:0 frame:0
TX packets:1021 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:37884 (36.9 KiB) TX bytes:206352 (201.5 KiB)

usb1 Link encap:Ethernet HWaddr DA:43:CB:26:9C:FF
inet6 addr: 2409:40f2:104c:6568:d843:cbff:fe26:9cff/64 Scope:Global
inet6 addr: fe80::d843:cbff:fe26:9cff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:39365 errors:0 dropped:0 overruns:0 frame:0
TX packets:41329 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:41501719 (39.5 MiB) TX bytes:8880057 (8.4 MiB)

  1. output of /proc/net/nat46/control

cat /proc/net/nat46/control
add 464-wan6c1_xlat
config 464-wan6c1_xlat local.v4 192.0.0.1/32 local.v6 2409:40f2:104c:6568:d843:cbff:fe26:9cf4/128 local.style NONE local.ea-len 0 local.psid-offset 0 remote.v4 0.0.0.0/0 remote.v6 64:ff9b::/96 remote.style RFC6052 remote.ea-len 0 remote.psid-offset 0 debug 0

add 464-wan6c2_xlat
config 464-wan6c2_xlat local.v4 192.0.0.2/32 local.v6 2409:40f2:d:c4ef:c:29ff:fea3:9b63/128 local.style NONE local.ea-len 0 local.psid-offset 0 remote.v4 0.0.0.0/0 remote.v6 64:ff9b::/96 remote.style RFC6052 remote.ea-len 0 remote.psid-offset 0 debug 0

  1. output of 'route -n'

route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 6 0 0 464-wan6c1_xlat
0.0.0.0 0.0.0.0 0.0.0.0 U 7 0 0 464-wan6c2_xlat
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.1
192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0 ra0
192.168.200.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0

My issue is that i am able to ping to ipv6 addresses from any of the cellular interfaces however when trying to ping 8.8.8.8 from 464-wan6c2_xlat .. same fails .

ping -I usb0 ipv6.google.com
PING ipv6.google.com (2404:6800:4007:82a::200e): 56 data bytes
64 bytes from 2404:6800:4007:82a::200e: seq=0 ttl=115 time=50.475 ms
64 bytes from 2404:6800:4007:82a::200e: seq=1 ttl=115 time=48.602 ms
^C
--- ipv6.google.com ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 48.602/49.538/50.475 ms

ping -I usb1 ipv6.google.com
PING ipv6.google.com (2404:6800:4007:82a::200e): 56 data bytes
64 bytes from 2404:6800:4007:82a::200e: seq=0 ttl=57 time=76.693 ms
64 bytes from 2404:6800:4007:82a::200e: seq=1 ttl=57 time=47.791 ms
^C
--- ipv6.google.com ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 47.791/62.242/76.693 ms

ping -I 464-wan6c1_xlat 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=53 time=37.797 ms
64 bytes from 8.8.8.8: seq=1 ttl=53 time=42.841 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 37.797/40.319/42.841 ms

But the below fails to ping

ping -I 464-wan6c2_xlat 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
^C
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss

However if use IP address of corresponding IPv6 address ( allocated for 464-wan6c2_xlat) ..the ping is succesful

ping -I 2409:40f2:d:c4ef:c:29ff:fea3:9b63 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=53 time=112.534 ms
64 bytes from 8.8.8.8: seq=1 ttl=53 time=71.120 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 71.120/91.827/112.534 ms

If i use tcpdump to check the failing ping.. i can see that the SRC IP address is actually for the other XLAT interface ( that is, it is 2409:40f2:104c:6568:d843:cbff:fe26:9cf4 instead of 2409:40f2:d:c4ef:c:29ff:fea3:9b63 ) .. basically issue is that the source address used in the command 'ping -I 464-wan6c2_xlat 8.8.8.8' is actually the one for interface 464-wan6c1_xlat.

the XLAT addresses are also correctly visible in the ps w output as shows below

ps w | grep 464
5992 dnsmasq 1464 S /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf.cfg01411c -k -x /var/run/dnsmasq/dnsmasq.cfg01411c.pid
13953 root 1268 S grep 464
20199 root 944 S 464xlatcfg 464-wan6c1_xlat wan6c1 64:ff9b::/96 192.0.0.1 2409:40f2:104c:6568:d843:cbff:fe26:9cf4
26820 root 944 S 464xlatcfg 464-wan6c2_xlat wan6c2 64:ff9b::/96 192.0.0.2 2409:40f2:d:c4ef:c:29ff:fea3:9b63

What can i do to correct the issue ?

Regards
Jitender