Enable IPV6 as Router

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
Vyverm
DD-WRT Novice


Joined: 06 Feb 2023
Posts: 4

PostPosted: Mon Feb 06, 2023 18:01    Post subject: Enable IPV6 as Router Reply with quote
Greetings !

I'm trying to enable IPV6 support in my network,

Here my DDWRT is acting as router, while my ISP router is connected through WAN port to provide internet.
First, I connected my PC directly in my ISP router to check for IPV6 support. All Ok.
Then I enabled IPV6 in my DDWRT, like the image (1).
And these are my ISP IPV6 settings:

Code:
   
    Delegated Prefix: 2804:431:e7db:407e::/64
    Link-Local IPv6 Address - LAN: fe80::c23d:d9ff:fe0e:c04b/64
    Global IPv6 Address - WAN: 2804:0431:b7d1:6652:c23d:d9ff:fe0e:c04a
    Default Gateway: fe80::8efd:18ff:fea9:c9a4
    Primary DNS Server: 2001:12e0:0:1025:a080::115
    Secondary DNS Server: 2001:12e0:0:1025:a080::215


In my PC, I can see that the network adapter is receiving some IP6 address, and I can reach another device (like notebook), but I can't reach my ISP router or IP6 on internet.
I have tried to setup IPv6 as native (Native IPv6 from ISP), as image 2, but no luck either.
QoS is disabled too.

Does anyone have an idea ??

Thanks !
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Tue Feb 07, 2023 11:27    Post subject: Reply with quote
It might be that Native Ipv6 from ISP is broken.

I am currently investigating it.

I personally use the following script to give br0 an address:

if [[ $(nvram get ipv6_enable) -eq 1 ]]; then
[[ -z $1 ]] && SLEEP=25 || SLEEP=$1
sleep $SLEEP # to allow to get the WAN n IPv6 address
prefix56=$(ifconfig $(get_wanface) | grep -m 1 'Scope:Global' | awk '{print $3}' | awk -F: '{printf("%4s:%4s:%4s:%.2s", $1,$2,$3,$4)}')
# make /60 address 60 , for router 192.168.13.1 use c0
ip -6 addr del ${prefix56}c0::1/64 dev br0 >/dev/null 2>&1
ip -6 addr add ${prefix56}c0::1/64 dev br0
logger -p user.info "IPv6: Added ${prefix56}c0::1/64 to br0"
ip -6 addr del ${prefix56}c1::1/64 dev br1 >/dev/null 2>&1
ip -6 addr add ${prefix56}c1::1/64 dev br1
logger -p user.info "IPv6: Added ${prefix56}c1::1/64 to br1"
fi

In your case use:
prefix64=$(ifconfig $(get_wanface) | grep -m 1 'Scope:Global' | awk '{print $3}' | awk -F: '{printf("%4s:%4s:%4s:%4s", $1,$2,$3,$4)}')

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087


Last edited by egc on Tue Feb 07, 2023 14:27; edited 1 time in total
MLandi
DD-WRT Guru


Joined: 04 Dec 2007
Posts: 1008

PostPosted: Tue Feb 07, 2023 13:53    Post subject: Re: Enable IPV6 as Router Reply with quote
Vyverm wrote:
In my PC, I can see that the network adapter is receiving some IP6 address, and I can reach another device (like notebook), but I can't reach my ISP router or IP6 on internet.
I have tried to setup IPv6 as native (Native IPv6 from ISP), as image 2, but no luck either.
QoS is disabled too.

Does anyone have an idea ??

Thanks !


Is your internet device set to Bridge Mode? I had no luck with public IPv6 addresses until I turned on Bridge Mode.

_________________
Netgear R9000
DD-WRT v3.0-r55460 std (03/25/24)
Linux 4.9.337 #715 SMP Mon Mar 25 06:15:53 +07 2024 armv7l
Gateway, AP, DNSMasq, Clock 2000MHz
VAP on wlan1 for internet devices
IPv4 & IPv6 (Prefix Delegation)
Static Leases & DHCP
CloudFlare, no SFE, SmartDNS, no QoS
2.4GHz: Vanilla, Airtime Fairness, NG-Mixed, ACK Timing 3150, WPA2 w/AES & WPA3
5GHz: Vanilla, Airtime Fairness, AC/N Mixed, ACK Timing 3150, WPA2 w/AES & WPA3
2 Netgear AX1800 WiFi Mesh Extenders
Xfinity 1.2Gbps/35Mbps
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Wed Feb 08, 2023 10:27    Post subject: Reply with quote
It will probably be fixed in the next public build, I am testing a solution as we speak.

Edit: moved this thread to Advanced Networking as it is of interest to us all

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Wed Feb 08, 2023 11:24    Post subject: Reply with quote
It is fixed Smile

If you only enter a prefix (end with :: ) than the router (br0) will get the prefix::1 address.

But if you enter an address then that will be used

I use DNSMasq to hand out addresses to my network:
Code:
dhcp-range=::,constructor:br0,ra-names,ra-stateless,12h
ra-param=br0,10,300
enable-ra
quiet-dhcp
quiet-dhcp6
quiet-ra

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087


Last edited by egc on Wed Feb 08, 2023 14:53; edited 1 time in total
Vyverm
DD-WRT Novice


Joined: 06 Feb 2023
Posts: 4

PostPosted: Wed Feb 08, 2023 14:26    Post subject: Reply with quote
MLandi wrote:

Is your internet device set to Bridge Mode? I had no luck with public IPv6 addresses until I turned on Bridge Mode.

I can't set it to bridge. I lose the phone funcitonality (maybe the router ISP box is the problem).


egc wrote:
It is fixed Smile

If you only enter a prefix (end with :: ) than the router (br0) will get the prefix::1 address.

But if you enter an address then that will be used

I use DNSMasq to hand out addresses to my network:
Code:
dhcp-range=::,constructor:br0,ra-names,ra-stateless,12h
ra-param=br0,10,300
enable-ra
quiet-dhcp
quiet-dhcp6
quiet-ra


I have updated the firmware, and the DNSMasq script, but I still can't make it work.
It's strange, and I'm lacking the knownledge to search the problems (basic network).

The PC is getting the IP6 network. If I change the prefix to test that, the PC get the new network. The WAN IP6 is enabled in DDWRT interface. So I thought this was a router problem.
But if I do a tracert I get confusing results:

Code:
 
tracert ipv6.google.com

Rastreando a rota para ipv6.l.google.com [2800:3f0:4001:803::200e]
com no máximo 30 saltos:

  1     *        *        *     Esgotado o tempo limite do pedido.
  2     *        *        *     Esgotado o tempo limite do pedido.
  3     *        *        *     Esgotado o tempo limite do pedido.
  4     *        *        *     Esgotado o tempo limite do pedido.
  5     *        *        *     Esgotado o tempo limite do pedido.


But I can ping internal devices with IP6.
My only thought is that the DDWRT can't reach my ISP router with IP6. But I don't know how to test that.


Last edited by Vyverm on Wed Feb 08, 2023 15:19; edited 1 time in total
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Wed Feb 08, 2023 14:42    Post subject: Reply with quote
You have to wait till the next public build.
_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Vyverm
DD-WRT Novice


Joined: 06 Feb 2023
Posts: 4

PostPosted: Wed Feb 08, 2023 15:28    Post subject: Reply with quote
I thought it was the one from yesterday. My mistake.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Thu Feb 09, 2023 7:20    Post subject: Reply with quote
New build is out Smile

Please test

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6856
Location: Romerike, Norway

PostPosted: Thu Feb 09, 2023 8:48    Post subject: Reply with quote
Your isp router does not have a wide dhcp6 server to hand out a PD to your dd-wrt router.
Vyverm
DD-WRT Novice


Joined: 06 Feb 2023
Posts: 4

PostPosted: Thu Feb 09, 2023 14:23    Post subject: Reply with quote
I did some tests here with new build (09-Feb), but I still can't get it to work.

I'm not very good with IPv6 yet, so I did some tests.
This is the ISP Router:

Code:
Prefixo Delegado: 2804:431:e7db:9d17::/64
Endereço IPv6 Link-Local - LAN: fe80::c23d:d9ff:fe0e:c04b/64
Endereço IPv6 Global - WAN: 2804:0431:b7d1:eb53:c23d:d9ff:fe0e:c04a
Gateway Padrão: fe80::8efd:18ff:fea9:c9a4
DNS Primário: 2001:12e0:0:1025:a080::115
DNS Secundário: 2001:12e0:0:1025:a080::215



First, I connected my PC directly to the ISP router. This is what I get:

Code:

Endereço IPv6 . . . . . . . . . . : 2804:431:e7db:9d17:205f:a296:6562:c60
Endereço IPv6 Temporário. . . . . . . . : 2804:431:e7db:9d17:5871:e06:d351:ca88
Endereço IPv6 de link local . . . . . . . . : fe80::2a00:534f:47b2:edc2%14
Endereço IPv4. . . . . . . .  . . . . . . . : 192.168.15.3
Máscara de Sub-rede . . . . . . . . . . . . : 255.255.255.0
Gateway Padrão. . . . . . . . . . . . . . . : fe80::c23d:d9ff:fe0e:c04b%14
                                                 192.168.15.1


The ISP router is fe80::c23d:d9ff:fe0e:c04b. Strange right ? But I can reach him.

Then I configured DDWRT like this: (1)

And with PC connected to DDWRT, I got this:

Code:

Endereço IPv6 . . . . . . . . . . : c0::5e8a:7697:f1fd:39e5
Endereço IPv6 . . . . . . . . . . : 2804:431:b7d1:eb53:7f21:bbf7:3b40:fc9c
Endereço IPv6 . . . . . . . . . . : 2804:431:e7db:9d17:205f:a296:6562:c60
Endereço IPv6 Temporário. . . . . . . . : c0::4c2b:afc5:545c:faf7
Endereço IPv6 Temporário. . . . . . . . : 2804:431:b7d1:eb53:4c2b:afc5:545c:faf7
Endereço IPv6 Temporário. . . . . . . . : 2804:431:e7db:9d17:4c2b:afc5:545c:faf7
Endereço IPv6 de link local . . . . . . . . : fe80::2a00:534f:47b2:edc2%14
Endereço IPv4. . . . . . . .  . . . . . . . : 10.0.0.100
Máscara de Sub-rede . . . . . . . . . . . . : 255.255.255.0
Gateway Padrão. . . . . . . . . . . . . . . : fe80::cabe:19ff:fe70:7d53%14
                                                 10.0.0.1


Some things are strange to me.
1 - I cannot reach the gateway (2804:431:e7db:9d17:cabe:19ff:fe70:7d53, DDWRT right ?), but I can reach the ISP (2804:0431:b7d1:eb53:c23d:d9ff:fe0e:c04a) (this wasn't working before).
2 - Looks like the startup script (bellow) is not working here (2)

I studying a little about IPv6 to see if I can understand more about this. Any idea is apreciated.

Thanks.

Code:
if [[ $(nvram get ipv6_enable) -eq 1 ]]; then
[[ -z $1 ]] && SLEEP=25 || SLEEP=$1
sleep $SLEEP # to allow to get the WAN n IPv6 address
prefix64=$(ifconfig $(get_wanface) | grep -m 1 'Scope:Global' | awk '{print $3}' | awk -F: '{printf("%4s:%4s:%4s:%4s", $1,$2,$3,$4)}')
# make /60 address 60 , for router 192.168.15.1 use c0
ip -6 addr del ${prefix64}c0::1/64 dev br0 >/dev/null 2>&1
ip -6 addr add ${prefix64}c0::1/64 dev br0
logger -p user.info "IPv6: Added ${prefix64}c0::1/64 to br0"
ip -6 addr del ${prefix64}c1::1/64 dev br1 >/dev/null 2>&1
ip -6 addr add ${prefix64}c1::1/64 dev br1
logger -p user.info "IPv6: Added ${prefix64}c1::1/64 to br1"
fi
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum