Typical example using IPv6-PD from ISP?

Hello,

I get a /56 Prefix Delegation from my ISP, the WAN6 interface receive it from the DHCPv6.

I only have 2ports, one to be used as WAN and one to be used as LAN (connected to a switch). I don't really care about the /56 prefix, I just want to use a single /64 subnet.

WAN6 can get the prefix from the ISP without problems.

config interface 'wan6'                                                                                                                     
        option proto 'dhcpv6'                                                                                                               
        option reqprefix 'auto'                                                                                                             
        option device 'eth2'                                                                                                                
        option reqaddress 'try'

I don't know how to configure its DHCP server, I just forward everything:

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

Then I create my LAN6 interface:

config interface 'LAN6'                                                                                                                     
        option device 'eth1'                                                                                                                
        option proto 'static'                                                                                                               
        option ip6assign '64'                                                                                                               
        option ip6hint '00'                                                                                                                 
        option ip6ifaceid 'eui64'

And I don't know how to configure the DHCPv6, I want the computer(s) connected to the LAN6 interface to receive an IPv6 IP address of the prefix **00/64.

config dhcp 'LAN6'                                                                                                                         
        option interface 'LAN6'                                                                                                            
        option ra 'relay'                                                                                                                  
        option dhcpv6 'relay'                                                                                                              
        option ndp 'relay'                                                                                                                 
        option leasetime '12h'                                                                                                             
        option start '100'                                                                                                                 
        option limit '150'                                                                                                                 
        option dynamicdhcp '0'

I feel like using relay for the LAN interface is wrong and I should create an actual DHCPv6 server to distribute IPv6 of the /64 prefix of the LAN6 interface (**00/64).

What's the right configuration to basically provide public IPv6 to my LAN computers?

Regards,

It is wrong, yes - you really should use the prefix assigned by your ISP.

As you've run quite a bit into the wrong direction, I would suggest to reset the configuration to the defaults again, no lan6 needed, just add ip6assign and ip6hint to your normal lan interface ra, dhcpv6 and ndp remain at their defaults (server) - and please no upper case in interface names. And yes, it is (can be, if your ISP is well behaved) that simple.

4 Likes

I would only add to slh's answer that this case works right out of a default installation, so nothing else is needed to configure. You can leave the /60 assignment in lan in case you connect another router downstream.

4 Likes

I don't have any default, I installed openwrt on a x86 machine with NICs. I must do the first configuration by myself.
One LAN interface with no default route for out of bound access and Luci. Then the 2 physical interfaces of a 10G NIC for the actual network. One for WAN, the other for LAN.

@slh I will try your default solution.

@trendy no other router, I only want to have a small network using /64, not the /56 prefix allocated by the ISP.

Thanks guys!

DHCP here:

Network here:

I recommend server mode or hybrid mode instead of relay mode, it may be possible that your ISP is restricting the number of prefixes it can hand out.

remember you are not actually setting up a DHCPv6 "server", only the ISP's device which assigns the prefix is the "server", rather everything else is a client

the dhcp configuration will not actually help you, unless you're actually using dnsmasq-full to handle ipv6, instead of odhcp6c which is the current default

if a downstream device is an openwrt router, you can create an interface 'lan6' which is an alias interface of 'lan' like this

config interface 'lan6'
        option proto 'dhcpv6'
        option device '@lan'
        option reqaddress 'try'
        option reqprefix 'no'

which will be enough to get it a subnet of the prefix

alias interface basically just means "use another protocol on the same hardware at the same time"

but again you only want to do that on a downstream openwrt device, not if you're configuring the router directly connected to the ISP, which like @slh said should be getting it's own address at the same time it is getting a prefix.

1 Like

Flash the same image without keeping settings.

1 Like

I said x86 in a normal computer, there is nothing to flash and nothing to keep.

I followed this video and it worked: https://www.youtube.com/watch?v=LJPXz8eA3b8

If there are two or more usable NICs found in an x86 during the first boot, a default lan->wan routing configuration will be installed, which handles IPv6 properly if the ISP conforms to standards for prefix delegation. If there is only one Ethernet port, a wan network will not be built out.

Drivers for several common Ethernet chips are included in the default build, so those cards will be detected and usable on first boot. With 10Gb cards it may be necessary to use Image Builder or Firmware Selector to add their driver kmod to the install image.

2 Likes

Well, that's interesting! I can see that in my x86 :stuck_out_tongue:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.