Score:1

Multihomed Windows 2016 Server default route ignoring metrics/preference

cn flag

I have a host with two NICs, both have internet access but I'm trying to manually set preference of a specific NIC.

My interface metrics:

PS C:\Users\Administrator\Desktop> Get-NetIPInterface -ConnectionState Connected -InterfaceAlias "Ethernet*"  | Format-Table;

ifIndex InterfaceAlias                  AddressFamily NlMtu(Bytes) InterfaceMetric Dhcp     ConnectionState PolicyStore
------- --------------                  ------------- ------------ --------------- ----     --------------- -----------
10      Ethernet 5                      IPv4                  1500               1 Disabled Connected       ActiveStore
3       Ethernet 2                      IPv4                  1500               1 Enabled  Connected       ActiveStore

NetRoute:

PS C:\Users\Administrator\Desktop>  Get-NetRoute -DestinationPrefix "0.0.0.0/0" | Format-Table;

ifIndex DestinationPrefix                              NextHop                                  RouteMetric PolicyStore
------- -----------------                              -------                                  ----------- -----------
10      0.0.0.0/0                                      10.0.20.1                                          2 ActiveStore
3       0.0.0.0/0                                      172.25.1.1                                        10 ActiveStore

route print (which seems to be NetIPInterface metric + NetRoute metric):

Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0       172.25.1.1      172.25.1.89     11
          0.0.0.0          0.0.0.0        10.0.20.1      10.0.23.243      3

but then:

PS C:\Users\Administrator\Desktop> (Find-NetRoute -remoteIpAddress 8.8.8.8)[1]

ifIndex DestinationPrefix                              NextHop                                  RouteMetric PolicyStore
------- -----------------                              -------                                  ----------- -----------
3       0.0.0.0/0                                      172.25.1.1                                        10 ActiveStore

the route with gw "10.0.20.1" has a lower metric, why isn't this the next hop? I DONT have a more specific route for "8.8.8.8".

I've tried this:
netsh interface ip delete destinationcache.
but nothing changed.

cn flag
I've also tried increasing the InterfaceMetric of the undesired interface, but nothing changed.
Swisstone avatar
cn flag
Can you double check that the gateway is reachable on Interface 10 (Ethernet 5) ? Can you try to disconnect Interface 3 and see if Interface 10 is selected by Find-NetRoute when Interface 3 is not available?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.