Showing posts with label Trunk. Show all posts
Showing posts with label Trunk. Show all posts

Sunday, October 16, 2011

Switch Trunk

Configuring Trunk between 2 switches.

Configuration will setup a trunk between 2 switches with dot1q (802.1Q) encapsulation and change the native VLAN from 1 to 100 with allowing only VLAN 100,101, 102, 104 and 105. 


Switch-A(config)# interface gigabitethernet 0/2
Switch-A(config-if)# switchport
Switch-A(config-if)# switchport trunk encapsulation dot1q
Switch-A(config-if)# switchport trunk native vlan 100
Switch-A(config-if)# switchport trunk allowed vlan 100-105
Switch-A(config-if)# switchport mode dynamic desirable

Switch-D(config)# interface gigabitethernet 0/24
Switch-D(config-if)# switchport
Switch-D(config-if)# switchport trunk encapsulation dot1q
Switch-D(config-if)# switchport trunk native vlan 100
Switch-D(config-if)# switchport trunk allowed vlan 100-105
Switch-D(config-if)# switchport trunk allowed vlan remove 103
Switch-D(config-if)# switchport mode dynamic desireable

Switch VLAN and VLAN Trunk Configuration

Switch VLAN syntax:
switch(config)# interface type module/number
switch(config-if)# switchport 
! switchport command configures the port for layer 2 operation
switch(config-if)# switchport mode access
switch(config-if)# switchport access vlan vlan-num

VLAN Trunking Configuration
switch> enable
switch# configure terminal
switch(config)# interface type mod/port
switch(config-if)# switchport!switch port must be in Layer 2 mode before it can supporta trunk
switch(config-if)# switchport trunk encapsulation {isl | dot1q | negotiate}
switch(config-if)# switchport trunk native vlan vlan-id
!native vlan only for dot1q encapsulation
!identifying the untagged or native VLAN number as vlan-id (1 to 4094)
!ISL doesn't support an untagged VLAN
switch(config-if)# switchport trunk allowed vlan {vlan-list | all | <add | except | remove> vlan-list}
switch(config-if)# switchport mode {trunk | dynamic <desirable | auto>}