What's new

IPV6 DUID

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Shonk

Senior Member
Every reboot of my ac88u im getting a new /56

i have been told that i wont usually get a new prefix unless the following happens

* Your DHCPv6 client changes DUID, which we've heard pfsense and others do
* Your DHCPv6 client sends a RELEASE, explicitly telling the DHCPv6 server to relinquish your prefix.

anyone know of a simple way to stop me getting a new range every time i reboot
i dont want to have to pull the power to stop me getting a new range
 
* Your DHCPv6 client changes DUID, which we've heard pfsense and others do

pfSense does when keeping /tmp and /var/run in RAM - if kept on disk, the problem doesn't occur...

Long and complicated story there...
 
Asus builds the duid out of the MAC address, so it shouldn't be changing. It's probably issuing a release at shutdown time because it seems like the proper thing to do.

Your ISP should ensure that DUIDs remain tied to allocated prefixes instead, the same way most cable providers that I know will do with IPv4, tieing it to your MAC.
 
Every reboot of my ac88u im getting a new /56

i have been told that i wont usually get a new prefix unless the following happens

* Your DHCPv6 client changes DUID, which we've heard pfsense and others do
* Your DHCPv6 client sends a RELEASE, explicitly telling the DHCPv6 server to relinquish your prefix.

anyone know of a simple way to stop me getting a new range every time i reboot
i dont want to have to pull the power to stop me getting a new range

heh you a fellow sky customer?

I have the same issues.
 
Last edited:
Thats the way its being done in the uk sadly
the isp router doesnt have this problem as it doesnt issue a release on reboot

Sky in the uk have some 6 million subscribers and this is the way they are doing it and are pig headed with these type of things
would be really nice if we had a way of not doing a release on reboot

or if you could point me to where i should look for the release in the source

Asus builds the duid out of the MAC address, so it shouldn't be changing. It's probably issuing a release at shutdown time because it seems like the proper thing to do.

Your ISP should ensure that DUIDs remain tied to allocated prefixes instead, the same way most cable providers that I know will do with IPv4, tieing it to your MAC.
 
Last edited:
Fixed

Code:
vi /home/shonk/asuswrt-merlin/release/src-rt-7.14.114.x/src/router/rc/udhcpc.c

Hard Code dhcp option 60 & 61 (not needed with the latest commit but did it out of habit)
image.jpg


ipv6 Don't send a RELEASE when stopping
image.jpg


Confirmation

image.jpg
 
shonk nice, how do you compile asuswrt? I have linux knowledge, but not with compiling embedded systems.
 
Apologies - having a hard time seeing the screen shots (color vision differences, I just have a really hard time seeing it).

Can you post a diff?

add
"-k",
edit
int index = 7;
to
int index = 8;



Code:
Before
start_dhcp6c(void)
{
  char *wan_ifname = (char *) get_wan6face();
  char *dhcp6c_argv[] = { "odhcp6c",
  "-df",
  "-R",
  "-s", "/tmp/dhcp6c",
  "-N", "try",
  NULL, NULL,  /* -c duid */
  NULL, NULL,  /* -FP len:iaidhex */
  NULL, NULL,  /* -rdns -rdomain */
  NULL, NULL,  /* -rsolmaxrt -r infmaxrt */
  NULL,  /* -v */
  NULL,  /* interface */
  NULL };
  int index = 7;
  struct duid duid;
  char duid_arg[sizeof(duid)*2+1];
  char prefix_arg[sizeof("128:xxxxxxxx")];
  int service, i;

After
Code:
start_dhcp6c(void)
{
  char *wan_ifname = (char *) get_wan6face();
  char *dhcp6c_argv[] = { "odhcp6c",
  "-df",
  "-R",
  "-s", "/tmp/dhcp6c",
  "-N", "try",
  "-k",
  NULL, NULL,  /* -c duid */
  NULL, NULL,  /* -FP len:iaidhex */
  NULL, NULL,  /* -rdns -rdomain */
  NULL, NULL,  /* -rsolmaxrt -r infmaxrt */
  NULL,  /* -v */
  NULL,  /* interface */
  NULL };
  int index = 8;
  struct duid duid;
  char duid_arg[sizeof(duid)*2+1];
  char prefix_arg[sizeof("128:xxxxxxxx")];
  int service, i;
 
add
"-k",
edit
int index = 7;
to
int index = 8;

Should work - in the future - back up the original file, and then one can just do a diff - most devs will understand that one...
 
nice that odhcpc already provided the option.....I had to to code a new option for wide-dhcpv6 that's used in my fork :)

Code:
Usage: odhcp6c [options] <interface>

Feature options:
  -S <time>  Wait at least <time> sec for a DHCP-server (0)
  -N <mode>  Mode for requesting addresses [try|force|none]
  -P <length>  Request IPv6-Prefix (0 = auto)
  -F  Force IPv6-Prefix
  -V <class>  Set vendor-class option (base-16 encoded)
  -u <user-class> Set user-class option string
  -c <clientid>  Override client-ID (base-16 encoded 16-bit type + value)
  -i <iface-id>  Use a custom interface identifier for RA handling
  -r <options>  Options to be requested (comma-separated)
  -R  Do not request any options except those specified with -r
  -s <script>  Status update script (/usr/sbin/odhcp6c-update)
  -a  Don't send Accept Reconfigure option
  -f  Don't send Client FQDN option
  -k  Don't send a RELEASE when stopping
  -t <seconds>  Maximum timeout for DHCPv6-SOLICIT (120)
  -m <seconds>  Minimum time between accepting updates (30)

Invocation options:
  -p <pidfile>  Set pidfile (/var/run/odhcp6c.pid)
  -d  Daemonize
  -e  Write logmessages to stderr
  -v  Increase logging verbosity
  -h  Show this help
 
A few people on the sky forum asked me to do a build for them with the fix

if anyone wants it im uploading them as they compile

RT-AC5300 Done
RT-AC88U Done
RT-AC3100 Done
RT-AC3200 Done
RT-AC87U Fails to Compile atm
RT-AC68U Done
RT-AC56U Done
RT-AC66U Fails to Compile atm
RT-N66U Fails to Compile atm

http://pc.cd/G0octalK
 
nice that odhcpc already provided the option.....I had to to code a new option for wide-dhcpv6 that's used in my fork :)

What name did you use for the nvram setting? If it fits with the existing settings that I use (since we have different IPv6 architectures), I might reuse the same setting if I end up adding the option on the webui.
 
What name did you use for the nvram setting? If it fits with the existing settings that I use (since we have different IPv6 architectures), I might reuse the same setting if I end up adding the option on the webui.
ipv6_dhcp6c_release
 
great shonk, a guy on kitz forums wants it for the ac87 I think.

Seems I am the only sky user on an ac68 tho :p
 
Im getting another problem now

in ipv6 everything looks normal on router power up
i have kept my /56 and all looks good

in system log ipv6 all looks normal apart from the wan ipv6 gateway is blank

ps in telnet shows

odhcp6c -df -R -s /tmp/dhcp6c -N try -k -c 00030001000000000000 -FP 0:56108 -r23 -r24 -r82 -r83 eth0

if i do a kill -9 pid
then
odhcp6c -df -R -s /tmp/dhcp6c -N try -k -c 00030001000000000000 -FP 0:56108 -r23 -r24 -r82 -r83 eth0

all is fine and wan ipv6 gateway gets populated

anyone have any idea's
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top