IPv6 Disconnect Issue on Long-Running Windows Server 2019

My Windows Server 2019 rarely shuts down; under a China Telecom/Redmi router, every time IPv6 is renewed, the local IPv6 connection shows “No Internet access.” Rebooting the machine or toggling the IPv6 feature fixes it, while Linux doesn’t exhibit this problem.

To automate the fix, I use these two commands:

Set-NetIPInterface -AddressFamily IPv6 -ifAlias Ethernet -RouterDiscovery Disabled; 
Set-NetIPInterface -AddressFamily IPv6 -ifAlias Ethernet -RouterDiscovery Enabled;

As you can see, the commands merely force Windows to refresh its route table; it’s unclear why Windows doesn’t do this automatically.

If you run into the same issue, this might help. If anyone has a better solution, feel free to share.