The two networks you describe in your question are configured as Class B networks because there are two "wildcard" octets.
Network A - 10.160.*.* == 10.160.0.0/16
Network B - 10.220.*.* == 10.220.0.0/16
Note that both of these spaces as described require the use of the subnet mask /16
(a.k.a. 255.255.0.0
) in order to reach the entire space.
However, you describe your subnet masks as set to /24
(a.k.a. 255.255.255.0
). If there are actually hosts in the entire /16
area, your machine will not be able to access them directly. Instead, it will only be able to access machines that share the same 3rd octet in addition to the first two.
In your example, with the gateways set to 10.160.123.1
and 10.220.250.1
, you will not be able to directly access any hosts in the blocks 10.160.0.0 - 10.160.122.255
, 10.160.124.0 - 10.160.255.255
, 10.220.0.0 - 10.220.249.255
, and 10.220.251.0 - 10.220.255.255
. Instead, traffic to any of these addresses will go to one of your gateways, whichever happens to be the primary.
If your networks really are Class B, you need to change the Subnet Mask entries on your computer to match the required 255.255.0.0
mask for a Class B network. If your networks are actually smaller, you may need to set explicit routes, as others have described.
An easy way to check if the problem is routing is to unplug whichever connection is currently working and see if the other one starts to work. Note that you may need to clear routes from the routing table, so view it with route print
and delete anything that doesn't belong with route delete [destination]
.
route add -p xx.xx.xx.xx
will make a static route persistent through boots. I don't know enough details about your setup but are you aware that Windows can route 2 different networks when routing functionality is enabled in the registry?