How to setup IPV6?

HI i've been trying to setup ipv6 with no luck, i followed this tutorial

Also, i dont know what IPv6 assignment length to use, my router show this on overview

IPv4 Upstream

Protocol: Static address
Address: 192.168.0.2/24
Gateway: 192.168.0.1
DNS 1: 192.168.0.1
Connected: 10h 6m 43s

IPv4 Upstream

Protocol: DHCP client
Address: 192.168.0.3/24
Gateway: 192.168.0.1
DNS 1: 200.....137
DNS 2: 189.....50
DNS 3: 200......200
Expires: 0h 53m 20s
Connected: 10h 6m 40s

IPv6 Upstream

Protocol: DHCPv6 client
Address: 2806:.....:87f::1/128
Address: 2806:...........f:fee7:147c/64
Gateway: fe80::6.......2:c6b7
DNS 1: 2806:260:....:54:129
DNS 2: 2806:260.......:28:50
DNS 3: 2806:260:......160:200
Connected: 8h 2m 1s

Sorry but i dont know how to get logs, if you help me i can send them,

Hi

ok, looks fine
you get one /128 for WAN (routing)
and have one /64 for LAN (PD)
this setup is enough for one LAN network, so your devices behind OWRT need to be in one LAN segment. No separate Guest/IoT/whatever network

this setup is enough for one LAN network, so your devices behind OWRT need to be in one LAN segment. No separate Guest/IoT/whatever network

Hi, thanks, how can i check if my setup is correct?

suppose you have default config
one LAN network, and you enabled IPv6 DHCP server on LAN interface, then simply connect windows computer to OWRT, or Android on Wireless ... as you wish, and you will see SLAAC addresses on windows/android

Check with:

ifstatus lan
ifstatus wan6
1 Like

I setup RA service and dhcpv6 as server, NDP as disabled, is that enough?

At ipv6RA settings
SLAAC is enabled, and RAflags as O & M

Did you get any SLAAC address on WIN/Android client ?

I get this on android wifi settings

fe80::644d.... :7e6d

Is this from SLAAC?

I still can't pass ipv6 tests

ok, time for SSH

so, login to your router with SSH
and then

ubus call system board
cat /etc/config/network
cat /etc/config/firewall
cat /etc/config/dhcp

paste here as preformated output

1 Like
BusyBox v1.35.0 (2023-04-27 20:28:15 UTC) built-in shell (ash)
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 22.03.5, r20134-5f15225c1e
 -----------------------------------------------------
root@OpenWrt:~# ubus call system board
{
        "kernel": "5.10.176",
        "hostname": "OpenWrt",
        "system": "Qualcomm Atheros QCA9558 ver 1 rev 0",
        "model": "TP-Link Archer C7 v2",
        "board_name": "tplink,archer-c7-v2",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "22.03.5",
                "revision": "r20134-5f15225c1e",
                "target": "ath79/generic",
                "description": "OpenWrt 22.03.5 r20134-5f15225c1e"
        }
}
root@OpenWrt:~# cat /etc/config/network
config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'
config globals 'globals'
config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth1.1'
config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.0.2'
        option gateway '192.168.0.1'
        list dns '192.168.0.1'
        option ip6ifaceid '::1'
        option ip6assign '64'
        option delegate '0'
        option ip6hint '5'
config interface 'wan'
        option proto 'dhcp'
        option device 'eth0.2'
config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'
config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '2 3 4 5 0t'
config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '1 6t'
config interface 'wan6'
        option proto 'dhcpv6'
        option device '@wan'
        option reqprefix 'auto'
        option reqaddress 'try'
        option ip6assign '64'
root@OpenWrt:~# cat /etc/config/firewall
config defaults
        option syn_flood '1'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'
config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'lan'
config zone
        option name 'wan'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        list network 'wan'
        list network 'wan6'
config forwarding
        option src 'lan'
        option dest 'wan'
config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'
config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'
config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'
config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'
config rule
        option name 'Allow-MLD'
        option src 'wan'
        option proto 'icmp'
        option src_ip 'fe80::/10'
        list icmp_type '130/0'
        list icmp_type '131/0'
        list icmp_type '132/0'
        list icmp_type '143/0'
        option family 'ipv6'
        option target 'ACCEPT'
config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'
config rule
        option name 'Allow-ICMPv6-Forward'
        option src 'wan'
        option dest '*'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'
config rule
        option name 'Allow-IPSec-ESP'
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'
config rule
        option name 'Allow-ISAKMP'
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'
root@OpenWrt:~# cat /etc/config/dhcp
config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'
config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option ra 'server'
        option dhcpv6 'server'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'
config dhcp 'wan'
        option interface 'wan'
config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'
config dhcp 'wan6'
        option interface 'wan6'
root@OpenWrt:~#



this is incorrect
you don;t want to serve DHCP on WAN interface :smiley:
please remove this
and configure LAN interface for IPv6 DHCP

I will try this in a while and report back

Please use code tags when you post code. This is the </> button on the top bar.

Yes your config has OpenWrt being a lan device instead of a lan-wan router. The upstream network needs to be connected to the wan port. It is OK for now if the upstream network is your existing house router instead of a direct connection to the ISP.

The best bet would be to reset OpenWrt to default configuration and move the Ethernet cable connected to your 192.168.0.1 router to the wan port and start from there. Connect another cable from a lan port to your PC and access OpenWrt's lan at 192.168.1.1. That setup will be much closer to working than trying to fix what you have now.

Sorry, I will fix it in a while, I'm on mobile at this moment

Connect another cable from a lan port to your PC and access OpenWrt's lan at 192.168.1.1. That setup will be much closer to working than trying to fix what you have now.

Whats the difference if I connect via wifi or cable?

If you reset to defaults, wifi will be off until you connect to a lan port with a cable to log in and start up wifi. Once wifi is on you can do all further configuration over wifi.

The best bet would be to reset OpenWrt to default configuration and move the Ethernet cable connected to your 192.168.0.1 router to the wan port and start from there.

I have a question about this, it's already connected this way, if I connect at a LAN port I don't have internet connection, what could be the problem?

With default settings you should have an IPv4 Upstream and possibly an IPv6 Upstream automatically configured from the wan network. Assuming the wan network is a typical home network with a DHCP server.

Problem persists, any ideas?

Try to add into /etc/config/dhcp

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

and reboot router.

I have T-Mobile home internet (TMHI), I am using their gateway (G4AR), their gateway doesn't do IPv6 PD (prefix delegation). I have my own router downstream the TMHI gateway, to service my client devices, first I had an Asus AX88U router configured in Passthrough mode for IPv6, all good on the clients, they will pass http://www.ipv6-test.com test.

Now I have replaced the Asus with the GL-MT6000 router, I am using vanilla OpenWrt 23.05.4, I have tried all the possible IPv6 operating modes, master, relay, hybrid, etc., and none of the clients pass the IPv6-test.com. I have settle with Relay and this is the configuration:

IPv6 parameters in /etc/config/dhcp.conf:

config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '100'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'relay'
option ra 'relay'
option ndp 'relay'
option ndproxy_slave '1'

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

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

If I connect a MacBook (macOS), iPad (iPadOS) or Linux (Debian) devices directly to the second ethernet port on the TMHI gateway (G4AR), all of them will pass the http://www.test-ipv6.com/ test, that means I am getting a valid IPv6 address from T-Mobile Home Internet, now, I need to understand why OpenWrt 23.05.4 in Relay is not passing it through.

Any feedback or guidance will be appreciated, thank you