0% found this document useful (0 votes)
19 views11 pages

08 Trunk Principle and Configuration

The document discusses the trunk principle and configuration for Layer2 network technology, emphasizing the need for communication between PCs of the same department while isolating different departments. It explains how trunk ports facilitate simultaneous data transmission of multiple VLANs and the tagging process for identifying VLANs during data forwarding. Additionally, it provides configuration steps for setting up trunk ports on switches and displaying configuration results.

Uploaded by

ramwalton
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views11 pages

08 Trunk Principle and Configuration

The document discusses the trunk principle and configuration for Layer2 network technology, emphasizing the need for communication between PCs of the same department while isolating different departments. It explains how trunk ports facilitate simultaneous data transmission of multiple VLANs and the tagging process for identifying VLANs during data forwarding. Additionally, it provides configuration steps for setting up trunk ports on switches and displaying configuration results.

Uploaded by

ramwalton
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Layer2 Network Technology

Trunk Principle and Configuration


Main Content

Trunk Principle and Configuration


Trunk Principle and Configuration
• After the PCs of the two departments are isolated on the same switch, PCs of the same department need to
communicate with each other and PCs of different departments need to be isolated on different switches.
• One solution is to configure trunk ports.

Layer-3 switch

1 2

24 24
Layer-2 switch Layer-2 switch

1 3 1 3
2 2

technical financial technical financial


department department department department
Trunk Principle and Configuration
• Data Forwarding Between Different Departments
• Requirement 1: PCs of the technicaldepartment connected to different switches need to communicate with each other and so do PCs of the
financialdepartment.
• Solution 1: Switches can transfer data of different departments.
• Requirement 2: Communication of different departments needs to be isolated from each other.
• Solution 2: Data transmission of different departments between switches needs to be isolated.
Layer-3 switch

Layer-2 switch Layer-2 switch

technical financial technical financial


department department department department
Trunk Principle and Configuration
• Simultaneous Data Transmission of Multiple VLANs on the Same Line
• Trunk ports are usually configured between switches. A switch automatically adds a tag to a packet when transferring the
packet to another switch. The tag identifies the original VLAN.

• After receiving the packet, the destination switch removes the tag and transmits the packet to the port in the VLAN.
Layer-3 switch

Trunk Trunk

Layer-2 switch Layer-2 switch


Trunk Trunk

Access Access Access Access

technical financial technical financial


department department department department
VLAN 10 VLAN 20 VLAN 10 VLAN 20
Trunk Principle and Configuration
• Simultaneous Data Transmission of Multiple VLANs on the Same Line
• When a packet is forwarded by a trunk port, a tag that contains the ID of the
original VLAN is added to the packet.
Standard Ethernet data frame Dest. MAC Src. MAC Len/Type Data FCS

switchport access vlan 10

switchport mode trunk

802.1Q data frame Dest. MAC Src. MAC TAG Len/Type Data FCS

16 bits 3 bits 1 bit 12 bits


TPID Priority CFI VLAN ID
VLAN of the port that receives the
0x8100 0 0x00A
standard Ethernet data frame, that is,
the VLAN ID specified in the access
command
Trunk Principle and Configuration
• Adding and Removing Tags
• When a packet is forwarded by a trunk port of a switch, a tag that contains the ID
of the original VLAN is added to the packet.

• When data is forwarded by an access port of a switch, the tag is removed and the
packet is forwarded only to the port belonging to the original VLAN.
TPID Priority CFI VLAN ID

VLAN 10 Trunk Trunk VLAN 10


Trunk Principle and Configuration
• Configuring and Displaying Trunk Ports
• A trunk port on a switch forwards only data of VLANs configured on the switch.
Therefore, relevant VLANs need to be created on the layer-3 switch.
Layer-3 switch Switch(config)# vlan 10
Switch(config-vlan)# name technical
Switch(config)# vlan 20
1 Switch(config-vlan)# name financial
Trunk Switch(config)# interface fastethernet 0/1
Switch(config-if)# switchport mode trunk
Layer-2 switch 24
Trunk Switch(config)# vlan 10
Switch(config-vlan)# name technical
Access Access
1 3
2 Switch(config)# vlan 20
Switch(config-vlan)# name financial

Switch(config)# interface range fastethernet 0/1-2


Switch(config-if)# switchport access vlan 10

Switch(config)# interface fastethernet 0/3


technical financial Switch(config-if)# switchport access vlan 20
department department
Switch(config)# interface fastethernet 0/24
VLAN 10 VLAN 20 Switch(config-if)# switchport mode trunk
Trunk Principle and Configuration
• Displaying Configuration Results Layer-2 switch 24
Trunk
Access Access
1 3
• Display the configuration results of the 2

layer-2 switches.

• All ports belong to VLAN 1 by default.


technical financial
• A trunk port belongs to all VLANs. department department
VLAN 10 VLAN 20
Ruijie#sh vlan
VLAN Name Status Ports
---- -------------------------------- --------- -----------------------------------
1 VLAN0001 STATIC 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, Gi0/25, Gi0/26
10 VLAN0010 STATIC Fa0/1, Fa0/2, Fa0/24
20 VLAN0020 STATIC Fa0/3, Fa0/24
Trunk Principle and Configuration
• Summary
• Tom mastered the working mechanism and configuration method of trunk ports. VLANs and
trunk ports can implement mutual communication between different switches for PCs of the
technical department and financial department, and the PCs of the different departments
are still isolated.
• Exercises
• What are the differences between data forwarded by a switch trunk port and data forwarded
by a switch access port?

• What is the main content inside a tag?

• How to configure a port on a switch as a trunk port? How to display the configuration result?
THANKS
Ruijie Networks Co., Ltd.
Address: Floor 11, East Wing, Zhongyipengao Plaza, No. 29 Fuxing Road, Haidian District, Beijing, China
Post Code: 100036
Tel: (8610) 5171-5996
Fax: (8610) 5171-5872

www.ruijienetworks.com

You might also like