My windows machine has two network cards, both have default gateways. How does windows determine which gateway should it access when sending a packet to a remote endpoint?
More precisely, here's my routing table:
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.0.0.1 10.0.0.191 10
0.0.0.0 0.0.0.0 192.168.1.254 192.168.1.38 20
10.0.0.0 255.255.255.0 10.0.0.191 10.0.0.191 10
10.0.0.191 255.255.255.255 127.0.0.1 127.0.0.1 10
10.255.255.255 255.255.255.255 10.0.0.191 10.0.0.191 10
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.1.0 255.255.255.0 192.168.1.38 192.168.1.38 20
192.168.1.38 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.1.255 255.255.255.255 192.168.1.38 192.168.1.38 20
224.0.0.0 240.0.0.0 10.0.0.191 10.0.0.191 10
224.0.0.0 240.0.0.0 192.168.1.38 192.168.1.38 20
255.255.255.255 255.255.255.255 10.0.0.191 10.0.0.191 1
255.255.255.255 255.255.255.255 192.168.1.38 192.168.1.38 1
Default Gateway: 192.168.1.254
When I send a ping to 10.0.0.180 it sends an arp through the network card associated with 10.0.0.191, while when I ping www.google.com it goes through 192.168.1.254. How does it decide?