How to set up tagged and untagged VLANs in different switch models

Any port can carry one untagged VLAN and any number of tagged VLANs. In some models port mode has to be changed if it is going to be assigned to a tagged VLAN.

 

Dell switches have three modes for a switch port:

I- access: port can be assigned to only one untagged VLAN

II- trunk: port can be assigned to as many as tagged VLANs

III- general: port can be assigned to one untagged VLAN and as many as tagged VLANs

 

Cisco switches have two modes

I- access: port can be assigned to only one untagged VLAN

II- trunk: port can be assigned to one untagged VLAN and as many as tagged VLANs

 

In HP and Brocade switches configuration is done under the VLAN configuration context.

In Cisco and Dell switches configuration is done under port configuration context.

  1. HP: First VLAN is created and then ports are assigned.

    Any port can be added to as many as tagged VLAN s and one untagged VLAN.

    The following commands put port 2 in tagged VLAN 666 and port 4 in untagged vlan 666

    # vlan 666

    # tagged ethernet  2

    # untagged ethernet  4

  2. Brocade/Foundry: The default mode is that the port is either tagged or untagged. If a port is going to carry both tagged and untagged frames then it has to be defined as dual-mode. In order to make a port dual-mode first we have to make sure that it is not untagged in any VLAN.

    The following commands implement this: Port 2 untagged VLAN 666 and tagged VLAN 55

    # vlan 666

    # no untagged  ethernet 2

    # tagged  ethernet 2

    # interface ethernet  2

    # dual-mode 666

    # vlan 55

    # tagged ethernet  2

    An interface in Brocade has three possibilities:

    1- Only one untagged VLAN

    2- As many as tagged VLANs but no untagged

    3- One untagged and as many as tagged VLANs, in this case the untagged VLAN has to be defined as dual-mode under interface configuration

    SSH@core1>show vlan 10

     PORT-VLAN 10, Name 151Front, Priority level0, in single spanning tree domain

    Untagged Ports: (U1/M1)  13  14  15  16  17  18  19  20

    Tagged Ports: (U1/M1)   4   5   6   7   9  10  11  12  21  22  23

     Uplink Ports: None

    DualMode Ports: (U1/M1)   8

    Mac-Vlan Ports: None

    Monitoring: Disabled

  3. Dell switch ports have 3 modes:

    access: only untagged traffic

    trunk: only tagged traffic

    general: both tagged and untagged

    The following commands configure port 2 in access mode and in VLAN 666

    # interface ethernet 2

    # switchport  mode  access   (by default the port is untagged VLAN 1)

    # switchport  access  vlan 666 (changes the port to untagged VLAN 666)

    # switchport  portfast (only possible in access mode to disable Spanning-Tree)

    # no switchport  access vlan (removes it from VLAN 666 and back to default VLAN 1)

    The following commands configure port 2 in trunk mode and therefore it can be added to any number of tagged VLANs:

    # interface ethernet 2

    # switchport  mode  trunk

    # switchport   trunk  allowed  vlan add/remove  666 (tagged VLAN 666)

    # switchport   trunk  allowed  vlan add/remove  55 (tagged VLAN 55)

    The following commands configure port 2 in general mode and therefore it can be added to as many as tagged VLAN s and one untagged VLAN (pvid)

     

    # interface ethernet 2

    # switchport  mode  general

    # switchport   general  allowed  vlan add/remove  666  (tagged VLAN 666)

    # switchport  general pvid 55     (untagged VLAN 55)

  4. Cisco switch ports have two modes:

    access: only untagged traffic

    trunk: both tagged and untagged

    The following commands configure port 2 in access mode and in untagged VLAN 666

    # interface ethernet 2

    # switchport  mode  access   (by default the untagged VLAN is 1)

    # switchport  access  vlan 666 (untagged VLAN 666)

    # switchport  portfast (only possible in success mode to disable Spanning-Tree)

    The following commands configure port 2 in trunk mode so it can be added to as many as tagged VLAN s and one untagged VLAN (native VLAN)

    # interface ethernet 2

    # switchport  mode  trunk

    # switchport   trunk  allowed  vlan  666  (tagged VLAN 666)

    # switchport  trunk native vlan 55     (untagged VLAN 55)