Difference between revisions of "VLAN Trunk Cisco IOS"

From Teknologisk videncenter
Jump to: navigation, search
m (Configuring a Trunk port)
m (Basic Cisco 3550 and 3560 switch configuration)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{TOCright}}
 
=Configuring a trunk port=
 
=Configuring a trunk port=
 
=Cisco materials=
 
=Cisco materials=
 
*[http://mars.tekkom.dk/cisco/ccnp3/ch2/2_3_1/index.html CCNP 3 chapter 2 Vlan Trunk]
 
*[http://mars.tekkom.dk/cisco/ccnp3/ch2/2_3_1/index.html CCNP 3 chapter 2 Vlan Trunk]
 
=VLAN trunks=
 
=VLAN trunks=
A VLAN trunk is a connection between two switches where traffic from one or more VLAN's are transmitted between switches.
+
A [[VLAN Cisco IOS|VLAN]] trunk is a connection between two switches where traffic from one or more VLAN's are transmitted between switches.
 
[[image:VLAN trunk.png|thumb|400px|none|Trunk between two switches carrying traffic from VLAN 100 and VLAN 200 between the Switches]]
 
[[image:VLAN trunk.png|thumb|400px|none|Trunk between two switches carrying traffic from VLAN 100 and VLAN 200 between the Switches]]
 +
 
=Configuring Trunk ports=
 
=Configuring Trunk ports=
 
== Basic Cisco 2950 and 2960 switch configuration ==
 
== Basic Cisco 2950 and 2960 switch configuration ==
 
Cisco 2950 and 2960 switch series only supports the 802.1Q - DOT1Q - trunk protocol.
 
Cisco 2950 and 2960 switch series only supports the 802.1Q - DOT1Q - trunk protocol.
<pre>
+
<source lang="cli">
 
SW2(config)#interface gigabitEthernet 0/1
 
SW2(config)#interface gigabitEthernet 0/1
 
SW2(config-if)#switchport mode trunk
 
SW2(config-if)#switchport mode trunk
</pre>
+
</source>
 +
 
 
== Basic Cisco 3550 and 3560 switch configuration ==
 
== Basic Cisco 3550 and 3560 switch configuration ==
 
Cisco 3550 and 3560 switch series supports the 802.1Q - DOT1Q - and Cisco ISL trunk protocols.
 
Cisco 3550 and 3560 switch series supports the 802.1Q - DOT1Q - and Cisco ISL trunk protocols.
<pre>
+
<source lang="cli">
H4S1(config)#int fastEthernet 0/24
+
CoreSW1(config)#int fastEthernet 0/24
H4S1(config-if)#switchport trunk encapsulation dot1q
+
CoreSW1(config-if)#switchport trunk encapsulation dot1q
H4S1(config-if)#switchport mode trunk
+
CoreSW1(config-if)#switchport mode trunk
</pre>
+
</source>
 +
 
 
= IEEE 802.1Q trunk protocol =
 
= IEEE 802.1Q trunk protocol =
 
The [[IEEE 802.1Q]] is a trunk protocol defined by [[IEEE]]. See the related articles.
 
The [[IEEE 802.1Q]] is a trunk protocol defined by [[IEEE]]. See the related articles.
 +
== Defining native VLAN ==
 +
Default native VLAN in the [[IEEE 802.1Q]] protocol is VLAN 1. The native VLAN is the only untagged VLAN in a trunk. Because off security you would change the native vlan.
 +
'''Remember:''' The native VLAN should be changed to the same VLAN in all Switches in the Switchblock.
 +
<source lang=cli>
 +
Switch1(config)#<input>int fa0/3</input>
 +
Switch1(config-if)#<input>switchport trunk native vlan 7</input>
 +
</source>
 +
<!--
 +
{{Source cli}}
 +
-->
 
[[Category:Cisco]][[Category:CCNA]][[Category:CCNP]][[Category:IOS]][[Category:Network]][[Category:CCNP3]]
 
[[Category:Cisco]][[Category:CCNA]][[Category:CCNP]][[Category:IOS]][[Category:Network]][[Category:CCNP3]]
 +
[[Category:VLAN]]

Latest revision as of 07:46, 11 October 2018

Configuring a trunk port

Cisco materials

VLAN trunks

A VLAN trunk is a connection between two switches where traffic from one or more VLAN's are transmitted between switches.

Trunk between two switches carrying traffic from VLAN 100 and VLAN 200 between the Switches

Configuring Trunk ports

Basic Cisco 2950 and 2960 switch configuration

Cisco 2950 and 2960 switch series only supports the 802.1Q - DOT1Q - trunk protocol.

SW2(config)#interface gigabitEthernet 0/1
SW2(config-if)#switchport mode trunk

Basic Cisco 3550 and 3560 switch configuration

Cisco 3550 and 3560 switch series supports the 802.1Q - DOT1Q - and Cisco ISL trunk protocols.

CoreSW1(config)#int fastEthernet 0/24
CoreSW1(config-if)#switchport trunk encapsulation dot1q
CoreSW1(config-if)#switchport mode trunk

IEEE 802.1Q trunk protocol

The IEEE 802.1Q is a trunk protocol defined by IEEE. See the related articles.

Defining native VLAN

Default native VLAN in the IEEE 802.1Q protocol is VLAN 1. The native VLAN is the only untagged VLAN in a trunk. Because off security you would change the native vlan. Remember: The native VLAN should be changed to the same VLAN in all Switches in the Switchblock.

Switch1(config)#<input>int fa0/3</input>
Switch1(config-if)#<input>switchport trunk native vlan 7</input>