Home > Mobile >  I have two default routes on my Windows, from which interface are my packets leaving?
I have two default routes on my Windows, from which interface are my packets leaving?

Time:07-09

I have two default routes on my Windows :

> Get-NetRoute -DestinationPrefix 0.0.0.0/0

ifIndex DestinationPrefix                              NextHop                                  RouteMetric ifMetric PolicyStore
------- -----------------                              -------                                  ----------- -------- -----------
14      0.0.0.0/0                                      0.0.0.0                                            0 1        ActiveStore
6       0.0.0.0/0                                      172.20.24.1                                      256 25       ActiveStore

From which interface are my packets leaving ?

CodePudding user response:

Get-NetRoute -DestinationPrefix "0.0.0.0/0"|Select IfIndex,DestinationPrefix,RouteMetric

It probably depend of -AutomaticMetric -InterfaceMetric parameter

Specifies the value for automatic metric calculation. Automatic metric determines whether TCP/IP automatically calculates a value for an interface metric that is based on the speed of the interface. The fastest interface has the lowest interface metric value. The acceptable values for this parameter are: Enable | Disable

https://docs.microsoft.com/en-us/powershell/module/nettcpip/set-netipinterface?view=windowsserver2022-ps

  • Related