PC with two lan ports each having specific traffic rule

whitestar999

Occasional Visitor
I have a desktop with pci-e ethernet card so two 1gbps ethernet ports. I currently have my PC & NAS connected to wifi router & each having static ip address set in ipv4 settings. I want to connect my pc directly to NAS via second ethernet port on pcie card while 1st ethernet port will remain connected to wifi router. In this setup I want the traffic to/from NAS to go only via the second ethernet port while all other traffic(incl internet) to go via the first/primary ethernet post as it currently does. I have looked into static routes & from what I understood, I would have to manually set a different ip & gateway on second ethernet port & nas(say desktop 2nd ethernet port 10.10.1.100 & nas 10.10.1.101 with default gateway 10.10.1.0 & subnet 255.255.255.0) & then add a static route to pc windows table like this:
route add 10.10.1.101 mask 255.255.255.0 10.10.1.0

Is the above correct or the best way to achieve it or can I do better?
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top