What prevents getting an IPv6 GUA on lan interface?

If I configure a lan6 interface on br-lan it does not get any address, why?

config interface 'lan6'
    option device 'br-lan'
    option proto 'dhcpv6'
    option reqaddress 'try'
    option reqprefix 'auto'

Exactly the same configuration on eth0.2 works just fine.
I did tracing on DHCPv6 traffic and see that DHCPv6 solicitation requests go out, but no advertising come back from the ISP router. At the same time when wan6 sends a solicitation it gets reply right away.

DHCPv6 server is configured as a relay on wan6 - it should forward requests/replies both ways, but it seems like it doesn't realy DHCPv6 requests from br-lan to the ISP router.

Hi

it is confusing ...
LAN interface on OWRT is meant to be static
for example: IPv4 192.168.1.1/24, IPv6 fd22:2abc:33dd::/64

then, OWRT will serve v4 and v6 addresses to devices on LAN side with builtin DHCP server

in your config, you want your LAN interface (bridge) to grab IPv6 from some ? external ? IPv6 DHCP server ?

1 Like

It is confusing as @NPeca75 said.
Please show the output of ifstatus wan6 and the content of /etc/config/network

Thank you for your quick replies.

I don't understand why address assignment should be confusing. Why on earth lan ipv6 should be static? Yes, I can manually set the IPv6 address on lan, no problem, but if ipv6 prefix is pushed from ISP router why should I type it in?

Actually the problem lies in the way DHCPv6 is configured. At least in luci wan6 interface is not allowed to be a server, only a relay. I prefer not having IPv6 address to be cofigured on lan, just use wan6 for DHCPv6 server.

Why is it designed this way that only the lan inteface can be configured as DHCPv6 server?

If you are still looking for help, show the information that was requested.

If you have single lan, like the default br-lan interface, and you get a proper prefix delegated by you ISP you normally don't need to configure anything manually....
An explicit foobar6 is only needed for wan interfaces AFAIK like when using pppoe:

# Example
config interface            'wan'
    option  device          'eth0.7'
    option  proto           'pppoe'
    option  username        'XXX@t-online.de'
    option  password        'XXX'
    option  ipv6            'auto'

config interface            'wan6'
    option  device          'eth0.7'
    option  proto           'dhcpv6'
    option  reqaddress      'try'
    option  reqprefix       '56'

Back to lan interface config, see this example interface:

config interface            'vlan16'
    option  device          'br-vlan16'
    option  proto           'static'
    option  ipaddr          '192.168.16.1/24'
    list    ip6ifaceid      '::1'
    list    ip6ifaceid      'eui64'
    option  ip6assign       '64'
    option  ip6hint         '10'

This gives me:

root@cpe:~# ip addr show dev br-vlan16
8: br-vlan16: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 02:00:01:01:00:10 brd ff:ff:ff:ff:ff:ff
    inet 192.168.16.1/24 brd 192.168.16.255 scope global br-vlan16
       valid_lft forever preferred_lft forever
    inet6 2003:e4:XXXX:XX10::1/64 scope global dynamic noprefixroute
       valid_lft 62734sec preferred_lft 62734sec
    inet6 fde6:a09a:b373:10::1/64 scope global noprefixroute
       valid_lft forever preferred_lft forever
    inet6 fe80::1ff:fe01:10/64 scope link
       valid_lft forever preferred_lft forever

Pay attention to option ip6hint '10' and the last 2 nibble of the prefix (...:XX10::). If you are using (only) the dafault br-lan interface the first available network is selected, or you set it explicit to 1.

PS: Maybe just post and show us your current /etc/config/network and what kind of prefix delegation you get from your ISP?

1 Like

I already provided the relevant part from /etc/config/network in my original question. I am only interested in configuring a single interface lan6 as described above.

Yes, and this is wrong as explain. And yes, the somehow relevant part is missing. Spoiler: wan and wan6.

Good luck then.

I don't know why you need to see the rest...
Here is my working configuration:

config interface 'wan'
    option ipv6 '0'
    option device 'eth0.2'
    option proto 'dhcp'

config interface 'wan6'
    option device 'eth0.2'
    option proto 'dhcpv6'
    option reqaddress 'try'
    option reqprefix 'auto'

config interface 'lan'
    option device 'br-lan'
    option proto 'static'
    option netmask '255.255.255.0'
    option ipaddr '192.168.0.1'
    option ip6assign '64'
    option ip6hint '10'
    option ip6ifaceid '::1'

ip -6 a

65: eth0.2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 2400:XXXX:XXXX:e700:52c7:bfff:feXX:XXX5/64 scope global dynamic noprefixroute
       valid_lft 2591741sec preferred_lft 604541sec
    inet6 fe80::52c7:bfff:feXX:XXX5/64 scope link
       valid_lft forever preferred_lft forever
66: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 fe80::52c7:bfff:feXX:XXX4/64 scope link
       valid_lft forever preferred_lft forever

As you can see br-lan does not get IPv6.

As I mentioned earlier, if I add the following, it also does not work.

config interface 'lan6'
    option device 'br-lan'
    option proto 'dhcpv6'
    option reqaddress 'try'
    option reqprefix 'auto'

This only happens when router is not receiving proper prefix delegation from ISP. What's the output of ifstatus wan6

1 Like

That is completely wrong as it configures LAN to request an address from a DHCP server somewhere else on the lan network. In a home network without any other routers there won't be any other DHCP server.

This is exactly my question. Why does wan6 works with exactly the same configuration, and lan6 does not. What's the difference what interface requests an IPv6? Why wan6 gets it from ISP and lan6 does not?

Alpha1096, what do you mean by "proper prefix delegation"? I am getting ::/64 prefix.

wan6 appears to be VLAN tagged. Is br-lan similarly tagged? What is the actual connectivity between the OpenWRT device and the ISP router?

krazen, wan6 is tagged 0, br-lan is tagged 1, they are on separate vlans. OpenWrt router is connected to the ISP router, which is connected to the ISP data center drop point of 6rd network. All these routers on the same ::/64 prefix.

Well it's not. It's tagged 2 according to the config you posted above, which makes me wonder how accurate the information you're providing is...

And if they're on separate vlans then I wouldn't expect them to both be receiving addresses from the same /64. Each vlan should have a /64 delegated to it from a larger prefix pool.

It'd probably be helpful if you'd post your full network file at this point. Altho if you've only got a single /64 coming in at your ISP router then you're pretty much stuck with only having IPv6 on one vlan.

krazen: sorry, typo. it is 2.

This is my point. I don't want to be stuck with only IPv6 on wan6. There is something fundamentally wrong with not allowing DHCPv6 server run on ::/64 prefix. One can have many DHCPv6 servers on the same prefix, nothing prohibits it. My ISP only sends a router advertisement with ::/64 prefix and DNS. All devices are configured via SLAC. On top of SLAC I want my own IPv6 address assignments using DHCPv6 server. As I mentioned DHCPv6 works as expected on br-lan if I configure the IPv6 manually on that interface. The only problem I have with the "manual" part. Why I cannot ask OpenWrt router to assign it dynamically like wan6 does? I don't know any rule or RFC that prohibits it.

This isn't an OpenWRT issue. It's down to your ISP router and trying to delegate a /64 to multiple vlans. You said as much in your first post:

There's nothing you can change in OpenWRT (short of putting the LAN network in the same vlan as WAN) that will resolve your 'problem'.

Here is my full cat /etc/config/network

config device
        option name 'eth0'

config device
        option name 'eth1'

config device
        option name 'phy1-ap0'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '6t 2 3 4 5'
        option vid '1'
        option description 'LAN'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0t 1'
        option vid '2'
        option description 'WAN'

config device
        option name 'eth1.1'
        option type '8021q'
        option ifname 'eth1'
        option vid '1'
        option ipv6 '1'

config device
        option name 'eth0.2'
        option type '8021q'
        option ifname 'eth0'
        option vid '2'
        option ipv6 '1'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth1.1'

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'wan'
        option ipv6 '0'
        option device 'eth0.2'
        option proto 'dhcp'

config interface 'wan6'
        option device 'eth0.2'
        option proto 'dhcpv6'
        option reqaddress 'try'
        option reqprefix 'auto'
        option ifaceid '::2'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.0.1'
        list ip6addr 'fe80::1/64'
        list ip6addr 'fd00::1/64'
        list ip6addr 'XXXX:XXXX:XXXX:XXXX::1/64'