Saturday, March 14, 2020

Difference between having different vlans and having different subnets on a switch

I am at the Uni, and this question is inspired from some Networking courses I am studying (it is not an homework question though) so apologies if this feels question feels noob-ish,

I am currently trying to wrap my head around segmenting network via switches. From the look of things It feels I can do this via two ways (not sure if there are more ways)

  1. I could assign IP addresses to hosts connecting to the switch from two different subnets. Basically I could say Port 1 to Port 10 would contain host with IP address in 10.0.0.0/24 while Port 11 to Port 20 will have address in 50.0.0.0/24
  2. I could create two vlans (vlan id 10 and vlan id 50 ) on the switch and connect hosts I want to be able to communicate on ports having the same vlan.

From where I stand, it looks like these two approaches help me achieve some form of segmentation. Going by first approach approach, host within the 10.0.0.0/24 won't be able to directly reach host in 50.0.0.0/24 network.

Same also if I used vlan. Host connected to port with vlan 10 won't be able to talk to host on vlan id 50, even when they are on the same subnet.

My question then is:

  1. What is the differences between these two approaches?
  2. What are the draw backs and advantages
  3. Are they really different ways of achieving the same thing as I am thinking, or they are setup for different use cases

Thanks



No comments:

Post a Comment