Sky FTTP via BT ONT Dropping WAN Connection When IP Renews

I have this issue when Sky renews my public facing IP roughly every 56 days and if I am not around the Flint2 router will fail to re-negotiate a new IP and stay in the 100.x.x.x range.

I have come across a potential work-around but I've not tested it yet and wanted to post it here for someone at GL-iNET to confirm this is the best work-around for me?

Automatically Renew via a Cron Watchdog Script

To prevent this issue from happening when you aren't around, you can create a lightweight watchdog script on the Flint 2 that tests for internet connectivity and auto-renews the WAN connection if the connection drops after an IP change.

  1. SSH into your Flint 2.

  2. Create a script file in an appropriate persistent directory:

    bash

    
      
    
      
    vi /etc/config/wan_watchdog.sh
    
    
    

    Use code with caution.

  3. Paste the following automated script (press i to enter insert mode in vi):

    bash

    
      
    
      
    #!/bin/sh
    # Ping a stable public DNS server to test connectivity
    if ! ping -c 2 -W 3 8.8.8.8 > /dev/null 2>&1; then
        logger "WAN Watchdog: Internet disconnected (possible IP change). Forcing WAN renew..."
        ifup wan
    fi
    
    
    

    Use code with caution.

  4. Save and exit (press ESC, then type :wq and hit Enter).

  5. Make the script executable:

    bash

    
      
    
      
    chmod +x /etc/config/wan_watchdog.sh
    
    
    

    Use code with caution.

  6. Add it to the system router scheduler (Cron) so it runs every 2 to 5 minutes:

    bash

    
      
    
      
    echo "*/2 * * * * /etc/config/wan_watchdog.sh" >> /etc/crontabs/root
    
    
    

    Use code with caution.

  7. Enable and restart the cron daemon to register the task: [1]

    bash

    
      
    
      
    /etc/init.d/cron enable
    /etc/init.d/cron restart
    
    

Thanks

Technically it’s Openreach ONT and not BT, could be confusing to some people.

Open Reach is owned by BT, but regardless shouldn't distract people from the issue, a quick Google of ONT is obvious what we're talking about.

Hi,

Thank you for sharing this script.

From another related discussion, it appears that your Sky FTTP connection may be using MAP-T. I am not very familiar with this type of connection, based on my understanding, these are some of my thoughts.

The script checks IPv4 connectivity by pinging 8.8.8.8 and runs ifup wan if the ping fails. While this may help if the issue is related to the WAN interface, it may not be sufficient if the problem is related to MAP-T.

In a MAP-T setup, wan6 typically obtains the IPv6 configuration and MAP-T parameters, while wan6_4 provides the MAP-T IPv4 path. If the issue is related to MAP-T configuration or the wan6_4 interface, restarting wan may not restore IPv4 connectivity. It may be worth investigating whether restarting wan6 could help in this situation.

Hope these thoughts are helpful, and thank you for sharing your findings with the community.