Basic port configuration commands for Cisco 3400

Vlan ID and Name Declaration for 3400 switches:

3400- switch# config t 
Enter configuration commands, one per line. End with CNTL/Z. 
3400- switch(config)#vlan 100(VLAN ID)
3400- switch(config-vlan)#name Test(VLAN NAME) 
3400- switch(config-vlan)#exit 
3400- switch(config)#exit 
3400- switch #

Access port configuration:

3400- switch # configure terminal 
Enter configuration commands, one per line. End with CNTL/Z. 
3400- switch(config)# interface fastethernet0/1 (select any interface 0-4) 
3400- switch(config-if)# switchport mode access 
3400- switch(config-if)# switchport access vlan 100 ( select appropriate VLAN ID for access) 
3400- switch(config-if)# end 
3400- switch #

Note: To remove port vlan 100 use below commands:

3400- switch # no switchport access vlan 100

Trunk port configuration:

3400-switch#config t 
Enter configuration commands, one per line. End with CNTL/Z. 
3400- switch(config)#int gig0/1
3400- switch(config-if)#port-type nni 
3400- switch(config-if)#switchport mode trunk 
3400- switch(config-if)#switchport mode trunk allowed 101-105(Select the VLAN range on trunk port) 
3400- switch(config-if)#switchport trunk native vlan 100(Select native VLAN for untagged traffic) 
3400- switch(config-if)#end 
3400- switch #

QinQ tunneling on the LEARN switch or end switch connecting to service provider network:

3400- switch(config)# interface gig0/1 
3400- switch(config-if)#switchport access vlan 100 (select VLAN ID to be tagged with QinQ) 
3400- switch(config-if)#switchport mode dot1q-tunnel
3400- switch(config-if)#exit 
3400- switch(config)#vlan dot1q tag native 
3400- switch(config)#end 
3400- switch #

Assuming Extended VLAN ID's at the LEARN switch are 3501,3502,3503,3504.

VLAN mapping configuration on 3400 at LEARN:

3400- switch(config)#interface GigabitEthernet0/4 
3400- switch(config-if)#port-type nni
3400- switch(config-if)#switchport trunk native vlan 7 
3400- switch(config-if)#switchport trunk allowed vlan 7,101-105 
3400- switch(config-if)#switchport mode trunk 
3400- switch(config-if)#switchport vlan mapping enable 
3400- switch(config-if)#switchport vlan mapping 101 3501(mapping extended VLANS to site VLANS) 
3400- switch(config-if)#switchport vlan mapping 102 3502 
3400- switch(config-if)#switchport vlan mapping 103 3503 
3400- switch(config-if)#switchport vlan mapping 104 3504 
3400- switch(config-if)#switchport vlan mapping default dot1q-tunnel 101-105 
3400- switch(config-if)#end
3400- switch#