cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
517
Views
0
Helpful
4
Replies

Question About VLAN

mrigankm20
Level 1
Level 1

Lets say there 2 switches which trunking b/w them. Each switch has 5 devices connected. My question is Can multiple ports can be configured for the same vlan ?  I have attached a pic for an example. Sorry for bad drawing
Vlan.png

3 Accepted Solutions

Accepted Solutions

Leo Laohoo
Hall of Fame
Hall of Fame

In the simplest of terms, yes. 

By default, all ports are on VLAN 1.  

View solution in original post

pman
Spotlight
Spotlight

Hi,

 

Attaches some information about access and also trunk port, about the difference between them, a little about packet flow and also how to configure.

 

When an interface expects frames with VLAN tags, it is referred to as a ‘tagged port’ or “trunk” port in Cisco terminology - Tagged ports or Trunk ports connect two switches to pass multiple VLAN tags on a single port.

 

In Short – A switch port that carries multiple VLANs is known as a Trunk port by Cisco and VLANs Tagged ports by other vendors.

 

So to summarize VLAN tagging vs. Untagging, the terms “Access port” and “Trunk port” are frequently used in the context of the Cisco network.

And other Vendors call it Untagged (Access port) and Tagged (Trunk Port) ports simultaneously.

 

example 1:

vlan tagging.png

example 2:

packet_flow.PNG

 

 

 

.

 

 

 

 

 

 

 

 

 

 

 

 

 

Ports 1 on both switches (layer2 switch-1, layer2 switch-2) are Untagged port or Access ports.

Sample config

  • interface Fa0/1
  • switchport mode access
  • switchport access vlan 200

Ports 2 on both switches (layer2 switch-1, layer2 switch-2) are Tagged port or Trunk ports.

Sample config

  • interface Fa0/2
  • switchport mode trunk
  • switchport encapsulation dot1q
  • switchport Trunk allowed vlan 200

 

https://afrozahmad.com/blog/vlan-tagged-vs-untagged/

View solution in original post

Hello


@mrigankm20 wrote:

Lets say there 2 switches which trunking b/w them. Each switch has 5 devices connected. My question is Can multiple ports can be configured for the same vlan ?  I have attached a pic for an example. Sorry for bad drawing


Yes they can
The interconnect between both switch's configure it as a trunk, Then create vlan3 and assign that vlan to the access-ports

Sw1 & Sw2
int x/x
description Link to switch
switchport mode trunk
no shut

Vlan 3
exit

int x/x
description vlan 3 access ports
switchport host
switchport access vlan 3
no shut

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

4 Replies 4

Leo Laohoo
Hall of Fame
Hall of Fame

In the simplest of terms, yes. 

By default, all ports are on VLAN 1.  

pman
Spotlight
Spotlight

Hi,

 

Attaches some information about access and also trunk port, about the difference between them, a little about packet flow and also how to configure.

 

When an interface expects frames with VLAN tags, it is referred to as a ‘tagged port’ or “trunk” port in Cisco terminology - Tagged ports or Trunk ports connect two switches to pass multiple VLAN tags on a single port.

 

In Short – A switch port that carries multiple VLANs is known as a Trunk port by Cisco and VLANs Tagged ports by other vendors.

 

So to summarize VLAN tagging vs. Untagging, the terms “Access port” and “Trunk port” are frequently used in the context of the Cisco network.

And other Vendors call it Untagged (Access port) and Tagged (Trunk Port) ports simultaneously.

 

example 1:

vlan tagging.png

example 2:

packet_flow.PNG

 

 

 

.

 

 

 

 

 

 

 

 

 

 

 

 

 

Ports 1 on both switches (layer2 switch-1, layer2 switch-2) are Untagged port or Access ports.

Sample config

  • interface Fa0/1
  • switchport mode access
  • switchport access vlan 200

Ports 2 on both switches (layer2 switch-1, layer2 switch-2) are Tagged port or Trunk ports.

Sample config

  • interface Fa0/2
  • switchport mode trunk
  • switchport encapsulation dot1q
  • switchport Trunk allowed vlan 200

 

https://afrozahmad.com/blog/vlan-tagged-vs-untagged/

Hello


@mrigankm20 wrote:

Lets say there 2 switches which trunking b/w them. Each switch has 5 devices connected. My question is Can multiple ports can be configured for the same vlan ?  I have attached a pic for an example. Sorry for bad drawing


Yes they can
The interconnect between both switch's configure it as a trunk, Then create vlan3 and assign that vlan to the access-ports

Sw1 & Sw2
int x/x
description Link to switch
switchport mode trunk
no shut

Vlan 3
exit

int x/x
description vlan 3 access ports
switchport host
switchport access vlan 3
no shut

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Joseph W. Doherty
Hall of Fame
Hall of Fame

As @Leo Laohoo the answer to your question is (usually) "yes".  (This also assumes the switches support VLANs.)

One (and the usual) way it might be done, on Cisco switches, is provided by @paul driver and @pman.

Notice in my first sentence I use the term "usually".  This because there are a bunch of configurations that need to be set, or if (optionally) set incorrectly, or not supported, might preclude you being able to do this.

For one example, the ".Q" standard defines how frames should be structured to contain tags. Pretty much, any vendor, supporting trunks (also known by other terms in non-Cisco equipment) uses this standard.  But, decades ago, Cisco was first (I believe) to the market creating trunking using their own proprietary standard, ISL.  That standard and .Q don't work together.  Cisco was "slow" to support .Q as it really was most useful for connecting to non-Cisco equipment, which they (Cisco) wasn't interesting much in doing.  (NB: generally a non-issue this century, but a case example of a possible issue.)

For another example, even today, Cisco trunks support a "native" (i.e. untagged) VLAN on a trunk with other tagged VLANs.  I believe, technically, .Q doesn't expect this, and so, this is an example, you can run into issues (still) between Cisco and non-Cisco switches.

BTW, it's also possible (but generally almost never done) to have VLAN x be VLAN y on another switch.

Again, the simple, and usual answer, to your question is "yes".  The forging, though, might show this "yes" might actually be the infamous "it depends" answer.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco