Cisco 3750G: Tagging and untagging traffic on a port

ciscotrunkvlan

I have the following setup:

[phone]-~-~-~-(port-10)[Cisco 3750](port-24=trunk)----[servers]

I want the phone to talk only on vlan (say 1940), where-as Cisco switch to untag/tag its traffic, as goes to/comes from the trunk.

Basically the traffic between phone and switch will be always on a vlan, whereas traffic between trunk port and rest of the network in on no-vlan.

Phone should be able to reach any server on the up-link.

Best Answer

So first, what is your native VLAN ? I'll identify it by ~native~.

You need to set the port 10 as on the vlan 1940

#conf t
(config)#vlan 1940
/* description of VLAN as you want */
(config-vlan)#no shutdown
(config / config-vlan)#int f0/10
(config-if)#switchport mode access
(config-if)#switchport access vlan 1940

/* Verify */
#sh vlan brief

Now, will configure the port 24 to tag and manage packets for and from vlan 1940 as wanted :

#conf t
(config)#int f0/24
(config-if)#switchport mode trunk
(config-if)#switchport trunk native vlan ~native~
(config-if)#switchport trunk allowed vlan 1940
(config-if)#end

Finally, to tag packet, you will need to configure 802.1Q protocol.

#conf t
(config)#int f0/24.1940
(config-subif)#encapsulation dot1q 1940
/* IP CONFIG etc...*/
(config-subif)#end
(config)#int f0/24
(config-if)#no shutdown

So now, your switch is configured to tag packet from vlan 1940 with the 802.1Q protocol.

EDIT

Everytime you need to add a VLAN to a trunked port, you'lle need to make the last step and add the switchport trunk allowed vlan <num>

Related Topic