Hello, the site yes
Thank you for your feedback. The situation you encountered—where the settings automatically revert to “Automatic”—strongly indicates that some underlying system or service in Windows 11 is overriding your manual settings. Here are some troubleshooting solutions:
Method 1: Use PowerShell to set the routing hop count
This method directly modifies the hop count for a specific route rather than the entire interface. This is the most precise control method.
Open PowerShell as an administrator:
Click the “Start” button and type “PowerShell.”
Right-click on “Windows PowerShell” and select “Run as administrator.”
Locate your network interface information:
Run the following command to view your network interface list, and note the ifIndex (interface index number) of the target interface.
Get-NetIPInterface
You will see output similar to the following. Locate the interface associated with 172.16.16.1 (e.g., the interface named “Ethernet”) and note its ifIndex value.
Directly modify the default route's hop count:
Now, use the Set-NetRoute command to set the hop count for the gateway you want. For example, if you want to set the hop count for the default route via 172.16.16.1 (destination address 0.0.0.0/0) to 10.
Set-NetRoute -NextHop 172.16.16.1 -DestinationPrefix 0.0.0.0/0 -RouteMetric 10
-NextHop 172.16.16.1: Specifies the gateway you want to modify.
-DestinationPrefix 0.0.0.0/0: This represents the “default route” (i.e., all traffic).
-RouteMetric 10: Sets the desired hop count value.
Verify the changes:
Run the following command to view the current routing table and confirm that the changes have taken effect.
powershell
Get-NetRoute -NextHop 172.16.16.1
Or use the classic command:
route print
In the output, locate the line with a destination of 0.0.0.0 and a gateway of 172.16.16.1, and verify that the Metric value has been updated to 10.
Method 2: Set the interface hop count using PowerShell (alternative method)
If your goal is to make the entire network adapter (e.g., your wired network card) more prioritized than other adapters (e.g., Wi-Fi or VPN), you can set the interface hop count instead of the gateway hop count. This is a broader but equally effective control method.
Open PowerShell as an administrator and use Get-NetIPInterface to find your ifIndex (as described in Method 1).
Disable automatic hop count and set a manual value:
Assuming your interface ifIndex is 15, you want to give it a very low hop count (e.g., 5) to increase its priority.
Set-NetIPInterface -InterfaceIndex 15 -InterfaceMetric 5
This command forces the baseline cost for the interface to 5. Even if the gateway hop count is automatic, this low baseline value is typically sufficient to ensure that traffic on this interface is prioritized.
I look forward to your feedback.