What's new

IPv6 lease time

  • 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!

mach6

New Around Here
I'm running 384.13 on AC3100

  • I didn't find location to configure the dhcp lease time for ipv6 on the web interface.
  • In /etc/dnsmasq.conf I found dhcp-range=lan,::,constructor:br0,ra-stateless,64,600 The lease time is only 600s. On both linux and windows machine, I found ipv6 become unavailable after 600s. I have to restart the network on client side. But it will then only work for 600 s.
  • I dig into the code and found in file release/src/router/rc/services.c, line 1573 (https://github.com/RMerl/asuswrt-me...39b49a/release/src/router/rc/services.c#L1573) the lifetime is hard-written as ra_lifetime = 600 for stateless ipv6. According to the manual of dnsmasq, http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html, the time here should be lease time.
  • In addition, for ra advertisement, shouldn't there exist a program called radvd? I didn't find the executable in /usr/sbin/radvd as well as the configuration file /etc/radvd.conf

Is this a bug or something configured incorrectly?
 
Last edited:
  • In addition, for ra advertisement, shouldn't there exist a program called radvd? I didn't find the executable in /usr/sbin/radvd as well as the configuration file /etc/radvd.conf
I don't use IPv6, (so could be wrong!) but I believe radvd server functionality is achieved using dnsmasq+odhcp6c

e.g. I just hacked 'dnsmasq.conf.add' with the sample IPv6/ra directives from the dnsmasq man page, restarted dnsmasq, and manually started odhcp6c daemon

e.g. Syslog
Code:
RT-AC86U dnsmasq-dhcp[31349]: DHCPv6, IP range 1234::2 -- 1234::500, lease time 12h
RT-AC86U dnsmasq-dhcp[31349]: router advertisement on 1234::
RT-AC86U dnsmasq-dhcp[31349]: IPv6 router advertisement enabled

RT-AC86U odhcp6c[31452]: (re)starting transaction on br0
RT-AC86U odhcp6c[31452]: Starting SOLICIT transaction (timeout 4294967295s, max rc 0)

So it would appear that I have configured 'IPv6 router advertisement' with DHCPv6 leases of 12 hours?
 
Last edited:
I don't use IPv6, (so could be wrong!) but I believe radvd server functionality is achieved using dnsmasq+odhcp6c

e.g. I just hacked 'dnsmasq.conf.add' with the sample IPv6/ra directives from the dnsmasq man page, restarted dnsmasq, and manually started odhcp6c daemon

e.g. Syslog
Code:
RT-AC86U dnsmasq-dhcp[31349]: DHCPv6, IP range 1234::2 -- 1234::500, lease time 12h
RT-AC86U dnsmasq-dhcp[31349]: router advertisement on 1234::
RT-AC86U dnsmasq-dhcp[31349]: IPv6 router advertisement enabled

RT-AC86U odhcp6c[31452]: (re)starting transaction on br0
RT-AC86U odhcp6c[31452]: Starting SOLICIT transaction (timeout 4294967295s, max rc 0)

So it would appear that I have configured 'IPv6 router advertisement' with DHCPv6 leases of 12 hours?

Very interesting!! Could you pelase share the line you add for DHCPv6? With the default settings, I restarted dnsmasq but only got

Code:
Nov 15 23:20:58 dnsmasq-dhcp[32120]: DHCP, IP range 192.168.1.150 -- 192.168.1.254, lease time 1d
Nov 15 23:20:58 dnsmasq-dhcp[32120]: DHCPv6 stateless on br0        
Nov 15 23:20:58 dnsmasq-dhcp[32120]: router advertisement on br0      
Nov 15 23:20:58 dnsmasq-dhcp[32120]: DHCPv6 stateless on 2001:470:895b::, constructed for br0
Nov 15 23:20:58 dnsmasq-dhcp[32120]: router advertisement on 2001:470:895b::, constructed for br0
Nov 15 23:20:58 dnsmasq-dhcp[32120]: IPv6 router advertisement enabled

The log doesn't show anything related to the lease time of DHCPv6. Although there does exist binary odhcp6c, it also doesn't start automatically.

FYI, I'm using Hurricane Electric IPv6 Tunnel . I'm not sure if it is because of this. My current solution is to add a file /jffs/scripts/dnsmasq.postconf like the following to enforce infinite lease time
Code:
#!/bin/sh
CONFIG=$1
sed -i 's/^\(.*ra-stateless.*\),[0-9]\+$/\1,infinite/' $CONFIG
 
The log doesn't show anything related to the lease time of DHCPv6.
Probably due to the latest dnsmasq version on my RT-AC86U running v384.14Beta1
Code:
RT-AC86U dnsmasq[19055]: started, version 2.80-93-g6ebdc95 cachesize 1500
 
Probably due to the latest dnsmasq version on my RT-AC86U running v384.14Beta1
Code:
RT-AC86U dnsmasq[19055]: started, version 2.80-93-g6ebdc95 cachesize 1500
This is a little off topic from lease timing but some what related to IPV6 leasing. What would you recommend as an option for Dnsmasq.postconf if you were wanting to tell it to not do leasing but to still allow passthru, I am interested in trying out a different source for DHCP and the asus router is horrible when it comes to trying disable dhcpv6 leasing when you want to use a different DHCP server for your devices.
 

Similar 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