Cisco VLAN trunk AND native vlan

Switch - 2960


Switch>EN
Switch#show
Switch#show vlan
Switch#show vlan

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gig0/1, Gig0/2
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0

1005 trnet 101005 1500 - - - ibm - 0 0

-----------------------------------------------------------------------------------------------------------------------
Switch#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 10
Switch(config-vlan)#name data
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#name mgmt
Switch(config-vlan)#exit
Switch(config)#vlan 30
Switch(config-vlan)#name nms
Switch(config-vlan)#exit
Switch(config)#exit
Switch#
%SYS-5-CONFIG_I: Configured from console by console

Switch#show vl
Switch#show vlan

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gig0/1, Gig0/2
10 data active
20 mgmt active
30 nms active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
------------------------------------------------------------------------------------------------------- 

Switch#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#inter
Switch(config)#interface fa
Switch(config)#interface fastEthernet 0/2
Switch(config)#interface fastEthernet 0/2
Switch(config-if)#swi
Switch(config-if)#switchport mode
Switch(config-if)#switchport mode acc
Switch(config-if)#switchport mode access
Switch(config-if)#swi
Switch(config-if)#switchport acc
Switch(config-if)#switchport access vl
Switch(config-if)#switchport access vlan 20

Switch(config-if)#

------------------------------------------------------------------------------------------------------------
Switch#show vlan

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/4, Fa0/5, Fa0/6, Fa0/7
Fa0/8, Fa0/9, Fa0/10, Fa0/11
Fa0/12, Fa0/13, Fa0/14, Fa0/15
Fa0/16, Fa0/17, Fa0/18, Fa0/19
Fa0/20, Fa0/21, Fa0/22, Fa0/23
Fa0/24, Gig0/1, Gig0/2
10 data active Fa0/1
20 mgmt active Fa0/2
30 nms active Fa0/3
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup

1005 trnet-default act/unsup
-------------------------------------------------------------------------------------------------------------


trunking protocol - 802.1q

switch# show interface trunk
.
Switch#config ter
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface gigabitEthernet 0/1
Switch(config-if)#switchport mode trunk

Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up


Switch(config-if)#switchport trunk allowed vlan 1-30

Switch(config-if)#end
----------------------------------------------------------------------------------------------------------------
Switch#show interfaces trunk
Port Mode Encapsulation Status Native vlan
Gig0/1 on 802.1q trunking 1

Port Vlans allowed on trunk
Gig0/1 1-30

Port Vlans allowed and active in management domain
Gig0/1 1,10,20,30

Port Vlans in spanning tree forwarding state and not pruned
Gig0/1 1,10,20,30

Switch#
---------------------------------------------------------------------------------------------------------------------
WE have done vlan tunk in swith 0,
 the same think we need to do in the destination side also (swith 1)

Switch#show interfaces trunk
Port Mode Encapsulation Status Native vlan
Gig0/1 auto n-802.1q trunking 1

Port Vlans allowed on trunk
Gig0/1 1-1005

Port Vlans allowed and active in management domain
Gig0/1 1

Port Vlans in spanning tree forwarding state and not pruned

Gig0/1 1

-----------------------------------------------------------------------------------------------------------------
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#interface gigabitEthernet 0/1

Switch(config-if)#switchport mode trunk


Switch(config-if)#switchport trunk allowed vlan 1-30
-------------------------------------------------------------------------------------------------------------------
#interface valn 10
#ip address 10.10.10.254 255.0.0.0
#no shutdown
-------------------------------------------------------------------------------------------------------------------
INTERFACE VLAN (or) MANAGEMENT VLAN

Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#line vty 0 15

Switch(config-line)#password cisco


Switch(config-line)#login

-----------------------------------------------------------------------------------------------------------------
PC>telnet 10.10.10.254
Trying 10.10.10.254 ...Open


User Access Verification

Password:
Switch>en
% No password set.

Switch>

------------------------------------------------------------------------------------------------------------
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.


Switch(config)#enable secret cisco

-------------------------------------------------------------------------------------------------------------
Switch>EN
Password:
Switch#

------------------------------------------------------------------------------------------------------------
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#interface fastEthernet 0/1

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 10
Switch(config-if)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console


Switch#show interfaces trunk
Port Mode Encapsulation Status Native vlan
Gig0/1 on 802.1q trunking 1

Port Vlans allowed on trunk
Gig0/1 1-30

Port Vlans allowed and active in management domain
Gig0/1 1,10

Port Vlans in spanning tree forwarding state and not pruned
Gig0/1 1,10

Switch#
--------------------------------------------------------------------------------------------------

here we can able to communicate vlan1 to vlan1 as well vlan 10 to valn 10

------------------------------------------------------------------------------------------------------------

Native vlan - which also depending for trunk vlan.
basically cisco trunk was using 802.1q protocol. in case the destination side have n't 802.1q protocol swith, than we can go for a native vlan

switch -1

Switch#show interfaces gigabitEthernet 0/1 switchport
Name: Gig0/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false

Appliance trust: none

Switch#show interfaces trunk
Port Mode Encapsulation Status Native vlan
Gig0/1 on 802.1q trunking 1

Port Vlans allowed on trunk
Gig0/1 1-30

Port Vlans allowed and active in management domain
Gig0/1 1,10

Port Vlans in spanning tree forwarding state and not pruned

Gig0/1 1,10

---------------------------------------------------------------------------------------------------------

Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 2
Switch(config-vlan)#name nat_vlan_me
Switch(config-vlan)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console


Switch(config)#interface gigabitEthernet 0/1


Switch(config-if)#switchport trunk native vlan 2

------------------------------------------------------------------------------------------------------------
Switch#show interfaces gigabitEthernet 0/1 switchport
Name: Gig0/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 2 (nat_vlan_me)
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false

Appliance trust: non


Switch#show interfaces trunk
Port Mode Encapsulation Status Native vlan
Gig0/1 on 802.1q trunking 2

Port Vlans allowed on trunk
Gig0/1 1-30

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

Port Vlans in spanning tree forwarding state and not pruned
Gig0/1 1,2,10
Switch#
%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on GigabitEthernet0/1 (2), with Switch GigabitEthernet0/1 (1).

---------------------------------------------------------------------------------------------------------------
avoid the error


Post a Comment

0 Comments