Community discussions

MikroTik App
 
sb56637
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Mon Feb 13, 2017 8:08 pm

IPV6 over PPPoE prefix expiry longer than IPv4 lease

Wed Sep 26, 2018 7:11 pm

Hi there,

I use my Mikrotik to establish a PPPoE connection to the internet, and my ISP sets an IPv4 lease time of 2 days. Then the IPv6 DHCP client gets a prefix that expires in 3 days. My IPv6 always works for a while, but after a few days (appears random but it's probably not) IPv6 connectivity on clients stops working. I always try to renew the IPv6 prefix and enable/disable the IPv6 address and reboot the clients, but it usually doesn't work. But rebooting the router and/or disabling/re-enabling the PPPoE connection fixes everything. So I suspect that what happens is every two days the PPPoE client gets a new IPv4 address, whereas the IPv6 client still has 1 day left on its lease, but it no longer works. I found the exact same issue here, and no solution was provided:
https://www.reddit.com/r/mikrotik/comme ... ver_pppoe/

Any tips? Thanks a lot.
 
mducharme
Trainer
Trainer
Posts: 1777
Joined: Tue Jul 19, 2016 6:45 pm
Location: Vancouver, BC, Canada

Re: IPV6 over PPPoE prefix expiry longer than IPv4 lease

Thu Sep 27, 2018 3:05 am

There is no "IPv4 lease time" in this case. PPPoE uses IPCP to give an IPv4 address. This address is allocated until the customer disconnects. The only way of shortening this period is by actually forcing a disconnect of the customer. Your ISP must be doing this every two days, and your DHCPv6 client is not automatically renewing the lease when this happens for whatever reason.

The main reason why some ISPs have a timeout for PPPoE connections is that if a customer fails to pay their bill and they remain connected via PPPoE at that time, their service won't be cut off because they haven't tried to authenticate again since the disconnection took place, and therefore they will continue to get service after the service cutoff because they simply never disconnected. A better way of handling this issue is for the ISP to configure their RADIUS server or billing system to send CoA packets to the NAS to force a customer disconnection when their bill is not paid, that is what we do to avoid a disconnection at an inopportune moment for the customer (ex. if they are watching Netflix or something exactly two days after their initial connection time).
 
sb56637
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Mon Feb 13, 2017 8:08 pm

Re: IPV6 over PPPoE prefix expiry longer than IPv4 lease

Thu Sep 27, 2018 5:20 pm

There is no "IPv4 lease time" in this case. PPPoE uses IPCP to give an IPv4 address. This address is allocated until the customer disconnects. The only way of shortening this period is by actually forcing a disconnect of the customer. Your ISP must be doing this every two days, and your DHCPv6 client is not automatically renewing the lease when this happens for whatever reason.
Interesting, thanks for explaining that. And yes, my ISP's method is definitely inopportune, because it makes my VPN connection to my work drop every 2 days. So I've taken to resetting the PPPoE connection around midnight every so often so it doesn't interrupt me during the day.

So is there anything I can do to force the DHCPv6 client to release and renew its lease whenever the PPPoE connection gets established?

Another possibly related bug with the DHCPv6 client is that it doesn't acquire a prefix immediately after the PPPoE connection comes up, it just hangs at "rebinding..." for about 10 minutes. This is case when disabling/re-enabling the PPPoE, or after rebooting the router. But as soon as I manually hit the "Apply" button the DHCPv6 client immediately acquires a prefix. This bug also affects other users, as described here:
viewtopic.php?t=122420
 
mducharme
Trainer
Trainer
Posts: 1777
Joined: Tue Jul 19, 2016 6:45 pm
Location: Vancouver, BC, Canada

Re: IPV6 over PPPoE prefix expiry longer than IPv4 lease

Thu Sep 27, 2018 10:55 pm

So is there anything I can do to force the DHCPv6 client to release and renew its lease whenever the PPPoE connection gets established?

Another possibly related bug with the DHCPv6 client is that it doesn't acquire a prefix immediately after the PPPoE connection comes up, it just hangs at "rebinding..." for about 10 minutes. This is case when disabling/re-enabling the PPPoE, or after rebooting the router. But as soon as I manually hit the "Apply" button the DHCPv6 client immediately acquires a prefix. This bug also affects other users, as described here:
viewtopic.php?t=122420
You can maybe script it - under PPP->profiles you can define on-up and on-down scripts that should be run when PPPoE establishes a connection.

And yes I have seen that issue before with the DHCPv6 client, not sure what the cause is, but it is annoying I agree.
 
Trema
newbie
Posts: 37
Joined: Tue May 20, 2014 10:21 am
Location: The Netherlands

Re: IPV6 over PPPoE prefix expiry longer than IPv4 lease

Fri Sep 28, 2018 12:43 pm

You can maybe script it - under PPP->profiles you can define on-up and on-down scripts that should be run when PPPoE establishes a connection.

And yes I have seen that issue before with the DHCPv6 client, not sure what the cause is, but it is annoying I agree.
This is a known and very annoying problem indeed. Creating an on-up script under the PPP profile is the way to go. This is mine:
:local interfaceName [/interface get $interface name];
:delay 10
:log info "profile-pppoe-isp client up: ipv6 dhcp-client release";
/ipv6 dhcp-client release [find interface=$interfaceName];
 
sb56637
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Mon Feb 13, 2017 8:08 pm

Re: IPV6 over PPPoE prefix expiry longer than IPv4 lease

Fri Sep 28, 2018 4:37 pm

Excellent, thanks a lot to everyone for their replies.

Who is online

Users browsing this forum: agamerawesome, GoogleOther [Bot], xrlls and 98 guests