Connect Computer to two Networks

klakiti

Honorable
Mar 4, 2013
16
0
10,510
i would like to create something like two subnets in a switch. one will be the main vlan which will connect my computer and all other devices to the internet. then i would like to put my NAS drive in a second Vlan. and then connect my computer to that vlan (through another port in the switch, using a second nic card on my computer)

i want to have access to my files in my NAS network, without using up the bandwith for internet access. so that my files are accessed through one NIC card, and my internet thtough the other NIC card.

what i wrote above is just kind of an explanation of the funtionality i need. Feel free to suggest a different setup.

Sorry for my grammar
 
Solution
Yes that will work you of course need a switch that supports vlans. You need to make sure the nic in your pc connected to your nas network is a different subnet and does not have the default gateway set.

I am not so sure it makes much difference, you would need a very powerful nas device to be able to use a full gig of bandwidth and not leave bandwidth for your internet surfing. Even if you were to use 1g between your machine and the nas it would have no effect on other machine on the same switch access the internet. Switches are very fast now days and most have the ability for every port to run 1g up and 1g down all at the same time.
Yes that will work you of course need a switch that supports vlans. You need to make sure the nic in your pc connected to your nas network is a different subnet and does not have the default gateway set.

I am not so sure it makes much difference, you would need a very powerful nas device to be able to use a full gig of bandwidth and not leave bandwidth for your internet surfing. Even if you were to use 1g between your machine and the nas it would have no effect on other machine on the same switch access the internet. Switches are very fast now days and most have the ability for every port to run 1g up and 1g down all at the same time.
 
Solution


thank you very much! i have another quetion. Can I interconnect devices using only a switch? from what i understand, the router (or whatever device is in charge of the DHCP) still manages the data between devices (which means comunication between devices is still limited to the speed of the dhcp server's link. is this true? can i put all the computers in the same static subnet range and connect them to a siwtch?
 
Not if you are only going to use it to talk to the one pc. You need to think of vlans as separate switches. The way you proposed was one switch with most the stuff and the pc. A second switch with a nas and a different connection to the pc.

The pc would be able to talk to both switches at 1g each since it has 2 ports. Now if the other stuff on the main switch would need to get access to the NAS then it would need to use your pc as a router to accomplish that and you could be constrained by the speed of the pc/router

That is why they make layer3 switches where the switch itself acts as a router for the vlan to vlan traffic. Since it does not contain all the functions of a full router (like nat) it can transfer the data between the vlans with no loss in speed.