Prefix delegation not working

Hi,

I´m new here and sadly I´m unable to configure IPv6PD.

Here is my config:
/etc/config/network

config globals 'globals'
        option ula_prefix 'badc:ab1e:badc:0ded::/64'

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.0.0'
        option dns '1.1.1.1 8.8.8.8 8.8.4.4'
        option ip6assign '64'
        option ip6hint '1'
        option ip6ifaceid '::1'
        option ifname 'eth1.2'

config interface 'wan'
        option ifname 'eth0'
        option proto 'dhcp'

config interface 'wan6'
        option proto 'dhcpv6'
        option reqaddress 'force'
        option reqprefix 'auto'
        option ifname '@wan'
        option delegate '1'

config interface 'guest'
        option proto 'static'
        option ifname 'eth1.3'
        option netmask '255.255.255.0'
        option gateway '192.168.1.1'
        option dns '1.1.1.1 8.8.8.8 8.8.4.4'
        option ip6assign '64'
        option ipaddr '192.168.253.1'
        option type 'bridge'
        option ip6hint '2'
        option ip6ifaceid '::2'

/etc/config/dhcp

config dhcp 'lan'
        option interface 'lan'
        option start '65025'
        option limit '254'
        option leasetime '24h'
        list dns 'fddd:f936:0:1::869'
        option ra 'hybrid'
        option dhcpv6 'hybrid'
        option ndp 'hybrid'
        option ra_management '1'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'

config dhcp 'guest'
        option leasetime '12h'
        option interface 'guest'
        option start '10'
        option limit '200'
        option ra 'hybrid'
        option dhcpv6 'hybrid'
        option ndp 'hybrid'
        option ra_management '1'

ifstatus lan

{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 1545,
        "l3_device": "br-lan",
        "proto": "static",
        "device": "br-lan",
        "updated": [
                "addresses"
        ],
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [
                {
                        "address": "192.168.1.1",
                        "mask": 16
                }
        ],
        "ipv6-address": [

        ],
        "ipv6-prefix": [

        ],
        "ipv6-prefix-assignment": [

        ],
        "route": [

        ],
        "dns-server": [
                "1.1.1.1",
                "8.8.8.8",
                "8.8.4.4"
        ],
        "dns-search": [

        ],
        "inactive": {
                "ipv4-address": [

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ]
        },
        "data": {

        }
}

ifstatus guest

{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 1632,
        "l3_device": "br-guest",
        "proto": "static",
        "device": "br-guest",
        "updated": [
                "addresses",
                "routes"
        ],
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [
                {
                        "address": "192.168.253.1",
                        "mask": 24
                }
        ],
        "ipv6-address": [

        ],
        "ipv6-prefix": [

        ],
        "ipv6-prefix-assignment": [
                {
                        "address": "EXTPREFIX::",
                        "mask": 64,
                        "preferred": 2079,
                        "valid": 4779,
                        "local-address": {
                                "address": "EXTPREFIX::2",
                                "mask": 64
                        }
                },
                {
                        "address": "badc:ab1e:badc:ded::",
                        "mask": 64,
                        "local-address": {
                                "address": "badc:ab1e:badc:ded::2",
                                "mask": 64
                        }
                }
        ],
        "route": [
                {
                        "target": "0.0.0.0",
                        "mask": 0,
                        "nexthop": "192.168.1.1",
                        "source": "0.0.0.0\/0"
                }
        ],
        "dns-server": [
                "1.1.1.1",
                "8.8.8.8",
                "8.8.4.4"
        ],
        "dns-search": [

        ],
        "inactive": {
                "ipv4-address": [

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ]
        },
        "data": {

        }
}

Why does it only work for guest? It should work for more than one interface?!?

Thanks
Raphael

This should be a Hex number - try 0001 and 0002 respectively to be certain.

  • also add: option ip6class 'wan local'

This is likely not what you desire on a 192.168.1.0/16 LAN - as a /16 only has 65,536 IPs. Unless you want all IPs issued between approximately 192.168.255.1 - 192.168.255.254, you may want to fix this.

What host is this?

This is what I have in dhcp:

config dhcp 'lan'                          
        option interface 'lan'                    
        option start '100'                 
        option limit '150'                       
        option leasetime '12h'                    
        option ra 'server'
  • No clue
  • What is the IPv6 prefix assigned to WAN6?
1 Like

Both fixed

This is my indentation. All known devices are statically assigned either by DHCP or by device config in 192.168.1.0-192.168.252.255 and all unknown devices are assigned in "192.168.254.0/24". Guest assigns in 192.168.253.0/24. Works fine!

I don´t know. Removed

I removed all other ipv6-relevant lines and set this one.

New config:
network:

config globals 'globals'
        option ula_prefix 'badc:ab1e:badc:0ded::/64'


config interface 'wan'
        option ifname 'eth0'
        option proto 'dhcp'

config interface 'wan6'
        option proto 'dhcpv6'
        option reqaddress 'force'
        option reqprefix 'auto'
        option ifname '@wan'
        option delegate '1'

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.0.0'
        option dns '1.1.1.1 8.8.8.8 8.8.4.4'
        option ip6assign '64'
        option ip6hint '0001'
        option ip6ifaceid '::1'
        option ifname 'eth1.2'
        option ip6class 'wan6 local'

config interface 'guest'
        option proto 'static'
        option ifname 'eth1.3'
        option netmask '255.255.255.0'
        option gateway '192.168.1.1'
        option dns '1.1.1.1 8.8.8.8 8.8.4.4'
        option ip6assign '64'
        option ipaddr '192.168.253.1'
        option type 'bridge'
        option ip6hint '0002'
        option ip6ifaceid '::2'
        option ip6class 'wan6 local'

dhcp:

config dhcp 'lan'
        option interface 'lan'
        option start '65025'
        option limit '254'
        option leasetime '24h'
        option ra 'server'

config dhcp 'guest'
        option leasetime '12h'
        option interface 'guest'
        option start '10'
        option limit '200'
        option ra 'server'

Status:

ifstatus guest
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 53,
        "l3_device": "br-guest",
        "proto": "static",
        "device": "br-guest",
        "updated": [
                "addresses",
                "routes"
        ],
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [
                {
                        "address": "192.168.253.1",
                        "mask": 24
                }
        ],
        "ipv6-address": [

        ],
        "ipv6-prefix": [

        ],
        "ipv6-prefix-assignment": [
                {
                        "address": "2a02:810c:ccc0:292e::",
                        "mask": 64,
                        "preferred": 2652,
                        "valid": 5352,
                        "local-address": {
                                "address": "2a02:810c:ccc0:292e::2",
                                "mask": 64
                        }
                },
                {
                        "address": "badc:ab1e:badc:ded::",
                        "mask": 64,
                        "local-address": {
                                "address": "badc:ab1e:badc:ded::2",
                                "mask": 64
                        }
                }
        ],
        "route": [
                {
                        "target": "0.0.0.0",
                        "mask": 0,
                        "nexthop": "192.168.1.1",
                        "source": "0.0.0.0\/0"
                }
        ],
        "dns-server": [
                "1.1.1.1",
                "8.8.8.8",
                "8.8.4.4"
        ],
        "dns-search": [

        ],
        "inactive": {
                "ipv4-address": [

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ]
        },
        "data": {

        }
}
ifstatus lan
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 64,
        "l3_device": "br-lan",
        "proto": "static",
        "device": "br-lan",
        "updated": [
                "addresses"
        ],
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [
                {
                        "address": "192.168.1.1",
                        "mask": 16
                }
        ],
        "ipv6-address": [

        ],
        "ipv6-prefix": [

        ],
        "ipv6-prefix-assignment": [

        ],
        "route": [

        ],
        "dns-server": [
                "1.1.1.1",
                "8.8.8.8",
                "8.8.4.4"
        ],
        "dns-search": [

        ],
        "inactive": {
                "ipv4-address": [

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ]
        },
        "data": {

        }
}
ifstatus wan6
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 111,
        "l3_device": "eth0",
        "proto": "dhcpv6",
        "device": "eth0",
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [

        ],
        "ipv6-address": [
                {
                        "address": "2a02:810c:8000:99:5d64:9a89:c220:22b5",
                        "mask": 128,
                        "preferred": 2579,
                        "valid": 5279
                }
        ],
        "ipv6-prefix": [
                {
                        "address": "2a02:810c:ccc0:292e::",
                        "mask": 64,
                        "preferred": 2579,
                        "valid": 5279,
                        "class": "wan6",
                        "assigned": {
                                "guest": {
                                        "address": "2a02:810c:ccc0:292e::",
                                        "mask": 64
                                }
                        }
                }
        ],
        "ipv6-prefix-assignment": [

        ],
        "route": [
                {
                        "target": "::",
                        "mask": 0,
                        "nexthop": "fe80::1",
                        "metric": 512,
                        "valid": 111,
                        "source": "2a02:810c:ccc0:292e::\/64"
                },
                {
                        "target": "::",
                        "mask": 0,
                        "nexthop": "fe80::1",
                        "metric": 512,
                        "valid": 111,
                        "source": "2a02:810c:8000:99:5d64:9a89:c220:22b5\/128"
                }
        ],
        "dns-server": [
                "2a02:8100:c0:279::4:1101",
                "2a02:8100:c0:271::4:1101"
        ],
        "dns-search": [

        ],
        "inactive": {
                "ipv4-address": [

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ]
        },
        "data": {
                "passthru": "001700202a02810000c0027900000000000411012a02810000c002710000000000041101"
        }
}

I hope that someone can help me.

It seems to me that the ISP is delegating you one /64 prefix, which is assigned to the guest interface and the lan hasn't got any.

2 Likes

Is there a way to delegate it to both or to split it?

I don't think so. /64 should be the minimum. You could ask your ISP for a bigger block, /60 /56 or even /48

2 Likes