Cisco – Configuring Trunk Connections and VLANs

Switch A Configuration :

Switch-A# configure terminal
Switch-A(config)# interface fastEthernet0/1
Switch-A(config-if)# switchport trunk encapsulation dot1q
Switch-A(config-if)# switchport mode dynamic desirable
Switch-A(config-if)# switchport trunk native vlan 10
Switch-A(config-if)# switchport trunk allowed vlan 2-5,10,1002-1005

Verify:
-------

Switch-A# show interface FastEthernet0/1 switchport

Name: Fa0/1
Switchport: Enabled
Administrative Mode: dynamic desirable
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 10 (Native)
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Operational private-vlan: none
Trunking VLANs Enabled: 2-5,10,1002-1005
Pruning VLANs Enabled: 2-1001

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled

Voice VLAN: none (Inactive)
Appliance trust: none


Verify the trunk mode:
-----------------------

Switch-A# show interface trunk
Port      Mode         Encapsulation  Status        Native vlan
Fa0/1     desirable    802.1q         trunking      10

Port      Vlans allowed on trunk
Fa0/1     2-5,10,1002-1005

Port      Vlans allowed and active in management domain
Fa0/1     2-5,10

Port      Vlans in spanning tree forwarding state and not pruned
Fa0/1     2-5

Switch B Configuration

Switch-B> (enable) set trunk 2/1 desirable dot1q
Port(s)  2/1 trunk mode set to desirable.
Port(s)  2/1 trunk type set to dot1q.

Switch-B> (enable) clear trunk 2/1 1-1005,1025-4094
Removing Vlan(s) 1-1005,1025-4094 from allowed list.
Port  2/1 allowed vlans modified to .


Switch-B> (enable) set trunk 2/1 2-5,10
Adding vlans 2-5,10 to allowed list.
Port(s)  2/1 allowed vlans modified to 2-5,10.
Switch-B> (enable) set vlan 10 2/1
VLAN 10 modified.
VLAN 1 modified.
VLAN  Mod/Ports
---- -----------------------
10    2/1



Verification :
---------------  



Switch-B> (enable) show trunk
* - indicates vtp domain mismatch
Port      Mode         Encapsulation  Status        Native vlan
--------  -----------  -------------  ------------  -----------
 2/1      desirable    dot1q          trunking      10

Port      Vlans allowed on trunk
--------  ---------------------------------------------------------------------
 2/1      2-5,10

Port      Vlans allowed and active in management domain
--------  ---------------------------------------------------------------------
 2/1      2-5,10

Port      Vlans in spanning tree forwarding state and not pruned
--------  ---------------------------------------------------------------------
 2/1      2-5,10

Trunk Configuration

S1 - CLI

S1>en
S1#sh vlan brief
S1#conf t
S1(config)#int range g1/1-2
S1(config-if-range)#switchport mode trunk
S1(config-if-range)#switchport trunk native vlan 99
S1(config-if-range)#end

-------------------------------------------------------------------------------
S2 - CLI

S2>en
S2#sh vlan brief
S2#show inter trunk
S2#conf t
S2(config)#int g1/1
S2(config-if)#switchport trunk native vlan 99
S2(config-if)#end
S2#sh run
S2#conf t
S2(config)#int g1/1
S2(config-if)#switchport mode trunk
S2(config-if)#end
---------------------------------------------------------------------------------
S3 - CLI

S3>en
S3#conf t
S3(config)#int g1/2
S3(config-if)#switchport mode trunk
S3(config-if)#switchport trunk native vlan 99

Related Posts