IPV6 relaying on Openwrt 21

I have a board which is running Openwrt19 in it. I am able to get the IPV6 address. The routing table is as below
ip -6 route show
default from 2409:40f2:12:5737::/64 via fe80::1234 dev usb0 proto static metric 384 pref medium
2409:40f2:12:5737:42ac:2bdc:3ffe:f535 dev usb0 proto static metric 1024 pref medium
2409:40f2:12:5737:ed3d:3973:6af7:86b dev eth0.1 proto static metric 1024 pref medium
2409:40f2:12:5737::/64 dev usb0 proto static metric 256 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
fe80::/64 dev eth0.5 proto kernel metric 256 pref medium
fe80::/64 dev eth0.1 proto kernel metric 256 pref medium
fe80::/64 dev usb0 proto kernel metric 256 pref medium
fe80::/64 dev 464-wan6c1_4 proto kernel metric 256 pref medium
fe80::/64 dev ra0 proto kernel metric 256 pref medium

I am getting internet connectivity through usb0 interface and I am doing IPV6 relaying via eth0.1. I have connected my boards eth0.1 to a Windows laptop, which in turn gets the IPV6 address and gets connected to the internet.
This is how my /etc/config/network and /etc/config/dhcp looks like


Network File


config interface 'SW_LAN'
option ifname 'eth0.1'
option proto 'static'
option ipaddr '192.168.10.1'
option netmask '255.255.255.0'
list dns '8.8.8.8'
option ip_int_instance '6'
option ipv6 '1'
option ip6assign '64'
config interface 'wan6c1'
option ifname 'usb0'
option proto 'dhcpv6'
option reqaddress 'try'
option reqprefix 'auto'


DHCP file


[20:25] Jitender Kumar Misra

config dhcp 'SW_LAN'
option interface 'SW_LAN'
option start '100'
option limit '50'
option leasetime '12h'
option dhcpv6 'relay'
option ra 'relay'
option ndp 'relay'
config dhcp 'wan6c1'
option dhcpv6 'relay'
option ra 'relay'
option ndp 'relay'
option master '1'
option interface 'wan6c1'

If I try out the same configuration on another board with Openwrt21 in it. I am not able to do the IPV6 relaying.
The routing table looks like below.
[20:31] Jitender Kumar Misra

ip -6 route show
default from 2409:40f2:104b:983e::/64 via fe80::1234 dev usb0 proto static metric 384 pref medium
2409:40f2:104b:983e:18f9:7a18:11af:6917 dev usb0 proto static metric 1024 pref medium
2409:40f2:104b:983e:44d1:a562:fdf4:48ef dev usb0 proto static metric 1024 pref medium
2409:40f2:104b:983e::/64 dev usb0 proto static metric 256 pref medium
unreachable 2409:40f2:104b:983e::/64 dev lo proto static metric 2147483647 pref medium
fd6a:615d:4a6::/64 dev eth1.1 proto static metric 1024 pref medium
unreachable fd6a:615d:4a6::/48 dev lo proto static metric 2147483647 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
fe80::/64 dev usb0 proto kernel metric 256 pref medium
fe80::/64 dev wlan0 proto kernel metric 256 pref medium
fe80::/64 dev wlan1 proto kernel metric 256 pref medium
fe80::/64 dev 464-wan6c1_4 proto kernel metric 256 pref medium
fe80::/64 dev eth1 proto kernel metric 256 pref medium
fe80::/64 dev eth1.1 proto kernel metric 256 pref medium
fe80::/64 dev eth1.5 proto kernel metric 256 pref medium

Here the relaying is done on eth1.1 but I am finding usb0 in the routing table. Any inputs ?

Please use the </> button when posting cli output.

3 Likes

Disable the ULA prefix, you don't need ULAs here.

In a relay situation, the LAN interface should not hold a GUA, so remove the ip6assign option. Clients on LAN will use the LAN interface's link-local as their gateway. Once these packets reach the router they are routed out on the WAN interface. The relay system will dynamically install a /128 route back to each LAN device, while the overall prefix64::0/64 route remains on wan.

1 Like

@mk24 :Thank you for the response. I tried changing as per your suggestion But still I am not able to ping to IPV6 address like "ipv6.google.com" .
I feel I am not getting routing table entry with proper interface.
ip -6 route show
default from 2409:40f2:104b:983e::/64 via fe80::1234 dev usb0 proto static metric 384 pref medium
2409:40f2:104b:983e:18f9:7a18:11af:6917 dev usb0 proto static metric 1024 pref medium
2409:40f2:104b:983e:44d1:a562:fdf4:48ef dev usb0 proto static metric 1024 pref medium
2409:40f2:104b:983e::/64 dev usb0 proto static metric 256 pref medium
unreachable 2409:40f2:104b:983e::/64 dev lo proto static metric 2147483647 pref medium
fd6a:615d:4a6::/64 dev eth1.1 proto static metric 1024 pref medium
unreachable fd6a:615d:4a6::/48 dev lo proto static metric 2147483647 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium

As you can see, both the IPV6 addresses have usb0 as the interface, whereas the relaying happens via eth1.1

As in working case(Openwrt 19) we have a routing table entry with eth0.1 interface which makes the pinging to ipv6.google.com.

2409:40f2:12:5737:42ac:2bdc:3ffe:f535 dev usb0 proto static metric 1024 pref medium
2409:40f2:12:5737:ed3d:3973:6af7:86b dev eth0.1 proto static metric 1024 pref medium
This is the working scenario.

I've been using this DHCP configuration:

config dhcp 'lan'
        option interface 'lan'
   ... v4 options if desired ...
        option dhcpv6 'server'
        option ra 'relay'
        option ndp 'relay'
        option ra_dns '1'
        list ra_flags 'other-config'
        list ra_flags 'managed-config'

config dhcp 'wan6'
        option interface 'wan6'
        option ra 'relay'
        option ndp 'relay'
        option master '1'

DHCPv6 likely isn't doing anything. I think that all the clients end up using SLAAC but have not checked that.

In network config, the lan interface is proto static, with a V4 address if desired, and no V6 settings at all.