cancel
Showing results for 
Search instead for 
Did you mean: 

Intermittent IPv6 connectivity

wmh
Hooked
Posts: 8
Registered: ‎18-12-2025

Intermittent IPv6 connectivity

My IPv6 connectivity is dropping out each time the PPPoE connection drops or is reset. To be clear, IPv6 does work but I am regularly seeing the following faults.

I see two different symptoms:

1. Sometimes the /56 prefix is not allocated via DHCPv6, and the router tells me that all of the IPv6 pools are missing.  Simply disabling, waiting 5 seconds and then re-enabling the PPPoE interface is usually sufficient to fix this.  This has happened 3 times now.  

2. Almost every time the PPPoE connection resets and comes back up (and the pools allocate correctly), IPv6 still does not work.  This has happened lots of times now.  In this state I see:

- IPv6 addresses allocated to the clients correctly

- IPv6 traffic showing on the firewall connections monitoring tab

- TCP connections showing "syn-sent".  But never "established".

- IPv6 web test page shows "IPv4 only".

- Monitoring (Torch) on the PPPoE shows outbound packets but never any replies.

Sometimes disabling and re-enabling the PPPoE fixes it, quite often not.  Sometimes disabling the "add default route" and then disabling, reenabling the PPPoE and then finally reenabling "add default route" fixes it.  Sometimes not.  Repeating these, and eventually it comes back up and "just works".  But if left alone, it appears to stay broken.

Once I have got the Plusnet IPv6 working, it appears to stay up, no issues, until the next time the WAN link drops or resets.

Some additional information that may be relevant:

Current hardware: Mikrotik RB5009.  Fully up to date on the firmware.  I cannot see anything being blocked or denied on the WAN link.  I have added the "clamp to pmtu" fix noted in this forum (no change, I dont think I was suffering this issue anyway).  

I also suffered from the same loss of connectivity on the previous UniFi UCG Ultra, including after being factory reset.  So I dont think this is Mikrotik specific.  Or configuration specific seems how it also fails "out of the box".

I also have a HE IPv6 tunnel that I need to keep for various reasons.  It never drops.  (I am using some source routing to direct the subnet to the tunnel.  I do not mix plusnet or HE IPv6 on the same VLAN.).

IPv4 connectivity never drops.  That appears as rock solid as always.

Any suggestions or advice from anyone?  

1 REPLY 1
MPC
Rising Star
Posts: 82
Thanks: 29
Registered: ‎14-02-2019

Re: Intermittent IPv6 connectivity

I haven't seen this, but the number of times my wan goes down is counted on one hand per year.

Regardless, I use a fairly simple bash script on my router that checks I can ping a reliable IP6 address every minute, and if it fails, I log to ntfy.

If it fails more than 3 times, I stop and restart wide-dhcpv6-client and log to ntfy, then wait 10 minutes before resuming per-minute checks.  I do the same for the IP4 side.

(network_vars.sh includes network_vars_plus6.sh which is written as part of ppp's ip-up processing to log network info.  You could pick any reliable ip6 host - I use google.dns IP6 address )

 

#!/bin/bash

#

# Script to monitor the stability of the plusnet IP6 connection

 

COUNT=0

TIMEOUT=3

PINGS=2

PINGWAIT=7

INTERTEST=60

POSTDOWNUP=600

 

function cleanup()

{

echo NOTICE: Exiting script

exit 0

}

 

trap cleanup SIGINT

 

NOW=$(date)

echo "[$NOW] NOTICE: monitor_plus6 $$ started"

echo

 

while true;

do

# These may change while we are monitoring so load them now

. ~/bin/network_vars.sh

 

TESTIP=$VALID_PUB_GW6_PLUS

 

# Try pinging gateway $PINGS times or for $PINGWAIT seconds

ping6 -c $PINGS -i 2 -w $PINGWAIT "$TESTIP" 2>&1 >/dev/null

if [ $? == 0 ];

then

if [ $COUNT -gt 0 ];

then

NOW=$(date)

echo "[$NOW] NOTICE: ping6 test successful after $COUNT failures"

echo ==============================================

fi

 

# If all ok then reset the counter and wait before retrying

COUNT=0

sleep $INTERTEST

continue

fi

 

# Increment the ping check count

let COUNT=$COUNT+1

NOW=$(date)

/usr/bin/curl -m 5 -u "ntfypublish:<censored>"

if [ $COUNT -lt $TIMEOUT ];

then

echo "[$NOW] WARNING: ping test to $TESTIP failed $COUNT times"

sleep $INTERTEST

continue

fi

 

# Ping has failed every $PINGWAIT for $COUNT times.  Down and up the interface

/usr/bin/curl -m 5 -u "ntfypublish:<censored>"

echo ======================================================================

echo "[$NOW] ERROR: ping test to $TESTIP failed $COUNT times"

echo "[$NOW] ERROR: wide-dhcpv6 stop and start is next"

echo ======================================================================

 

trap - SIGINT

systemctl stop wide-dhcpv6-client.service

 

sleep 5

 

systemctl start wide-dhcpv6-client.service

 

trap cleanup SIGINT

 

NOW=$(date)

echo ======================================================================

echo "[$NOW] ERROR: stop - start completed.  Waiting $POSTDOWNUP before testing again."

echo ======================================================================

# Wait before trying again afer downing and restoring the interface

sleep $POSTDOWNUP

done