Windows Dual Nic Question

How do I get lan traffic to primarily use one nic and (same router) but different nic for wan traffic. Nic 5gb is usb thus has more latency but ideally want it for lan file transfers and want the 1gb nic to be for web access. I am guessing this is a firewall/opnsense thing i can do or something with windows software?

I want lan file transfers to be one nic and wan access via the same firewall/router to be another nic.

to use the NIC for LAN and another NIC for WAN, you have to set the high metrics WAN NIC and low value for LAN NIC.

Can you set default routes?

So for interface lan1(5gb) route 192.168.0.0/24
And lan2(1gb) route 0.0.0.0/0?

Like this kinda:

add the -p option to the command to make the route persistent. A persistent route stays in place even when Windows starts up

Example:

route -p add 192.168.35.0 MASK 255.255.255.0 192.168.0.2

Means the computer will use the interface with IP 192.168.0.2, any time it wants to reach ip’s in 192.168.35.0 's /24 subnet.

If you dont add -p, it will clear on reboot

2 Likes

Remove the default gateway from whatever NIC you want to use for LAN only use. This will force all internet traffic to use the NIC with the default gateway.

You will most likely need to add metrics to the NIC with the default gateway (aka : internet access) to force the local traffic to not use that NIC. But I’m not sure off hand how having two NICs on the same network shakes out (as back in the day I learned this stuff that was a no-no).

I agree that routes are probably what you should look into!

2 Likes

Would setting up a vlan for nic a (wan) and nic b (lan) and then block all wan traffic for that ip/mac for lan work?

Set your WAN interface metric to a number lower than your LAN interface. Set for both IPv4 and IPv4.

i.e. 2 for WAN, and 20 for LAN

I think you’d also need to drop traffic destined for the LAN subnet on your “WAN” interface using firewall rules so your LAN traffic is actually forced onto the correct adapter.

Edit2: I’m of the opinion that using static routes like what ish mentioned earlier on is the more elegant solution.

1 Like

Static routes are the way to go, but only use persistent routes for any traffic you don’t want to go to your default route. If you type “route print” in a CMD window you’ll see your present routes and you’ll notice 0.0.0.0 is already persistent by default.

image

Only add the exceptions to minimize any disruptions. I never trusted metrics for routing. I always set mine to 1 across the board.

route /?
is your friend.