909 Posts

April 10th, 2007 17:00

A tagged Ethernet packet has extra data in the packet that defines the vlan it is a member of.  The different port modes (Trunk, Access, General) define how tagged and untagged packets are handled. 

 

Ingress means packets entering a port.  Egress means traffic exiting a port.

 

  • Access mode VLAN: by default sets egress to untagged, supports single VLAN configuration only, automatically sets PVID (native VLAN, ingress untagged) to configured VLAN.  Will accept untagged packets or tagged packets with VLAN ID to which the port is a member - in this case the port is a member of only one VLAN.
  • Trunk mode VLAN: by default sets egress to tagged, supports multiple VLANs, does not set PVID (native VLAN, ingress untagged), native VLAN cannot be a configured Trunk VLAN or 4095 (discard VLAN).
  • General mode VLAN: by default sets egress to tagged, supports multiple VLANs, does not set PVID (native VLAN, ingress untagged), native VLAN can be any defined VLAN. Setting the PVID removes default vlan (VID=1) for that port..  PVID can be 4095 (discard VLAN).  General mode allows mix of tagged and untagged VLANs in the egress direction.
 
Here is an example config you can use on 2 switches connected via port g24.  Port 1 on each switch can communicate to eachother.  Port 2 on each switch can communicate with eachother.  Port 3 on each switch can communicate with eachother.
 

console(config)# vlan database

console(config-vlan)# vlan 101,102,310

console(config-vlan)# exit

 

console(config)# interface Ethernet g1

console(config-if)# switchport access vlan 101

console(config-if)# exit

console(config)# interface Ethernet g2

console(config-if)# switchport access vlan 102

console(config-if)# exit

 

console(config)# interface Ethernet g3

console(config-if)# switchport access vlan 310

console(config-if)# exit

 

console(config)# interface Ethernet g24

console(config-if)# switchport mode general

console(config-if)# switchport general allowed vlan add 101,102,310 tagged

console(config-if)# switchport general pvid 4095

console(config-if)# exit

36 Posts

April 11th, 2007 07:00

Thanking you very much. That was really good explanation.
 
Best regards
 
Rumhy
No Events found!

Top