Changing the IPv6 DUID

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


Joined: 24 Dec 2020
Posts: 2

PostPosted: Fri Mar 18, 2022 1:36    Post subject: Changing the IPv6 DUID Reply with quote
I'm trying to see if I can get my ISP to give me a /60 instead of a /64. Word on the street says that once you request a /64, your DUID is locked in their system and will not give you a /60. So what I'm trying to do is change my DUID so that maybe, just maybe, my ISP will give me a decent IPv6 block.

Anybody know how to change the DUID?
Sponsor
Wildlion
DD-WRT Guru


Joined: 24 May 2016
Posts: 1407

PostPosted: Sat Mar 19, 2022 21:11    Post subject: Reply with quote
From my understanding of how DD-WRT works with IPv6, it is not possible... the DUID is generated and when you adjust any of those parameters that would affect the DUID generation, then IPv6 does not work..
weeglos
DD-WRT Novice


Joined: 24 Dec 2020
Posts: 2

PostPosted: Sun Mar 20, 2022 19:30    Post subject: Reply with quote
It seems to be possible with raw Linux --
https://askubuntu.com/questions/1198955/how-can-i-change-my-ubuntus-ipv6-duid

so that can't be totally true, though mostly true.
Wildlion
DD-WRT Guru


Joined: 24 May 2016
Posts: 1407

PostPosted: Mon Mar 21, 2022 0:48    Post subject: Reply with quote
You can change DUID's but it is not support on DD-WRT...

Since the DUID is a function of the MAC address, you should be able to change your MAC address and a new DUID will be generated/used (ie after cleaning out the dhcp6c files)

if you look at /tmp/var/ on DD-WRT you can see where the dhcp6c_duid file is there but since this is regenerated on network restart ... you cannot change it.

When I try changing my MAC address IPv6 never picks up an address because there is a mistmatch on interface mapping.

Remember DD-WRT is not raw linux... it is a highly customized linux built using things like busybox... and the full flexibility is reduced to fit on these small embedded routers.
hugopoi
DD-WRT Novice


Joined: 13 Nov 2019
Posts: 6
Location: France

PostPosted: Wed Jan 18, 2023 18:04    Post subject: Reply with quote
I dig a little about this, and you can change duid on dd-wrt.

First, on r49492 dhcp6c send 2 different duid/ClientId when you use the GUI in Setup/WAN Setup if you select DHCP authentication and fill DHCP IPv6 Client ID. So it's bugged.

Then I find that dhcp6c take the client id from /tmp/var/dhcp6c_duid. And you can change the content of this file.

Code:

printf "\\x0A\\x00\\x00\\x03\\x00\\x01\\x$(ifconfig vlan100 | grep HWaddr | awk '{ print $5 }' | sed 's/:/\\x/g')" > /tmp/var/dhcp6c_duid


See https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=904417#904417
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