Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Trunk experiment

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Introduction and configuration of Trunk

I. Overview of Trunk

What is Trunk? Why Trunk?

First of all, we need to understand VLAN and suppose that when there are multiple switches in the network, how can the same VLAN hosts on different switches communicate with each other?

Trunk is a term in the network field. In terms of the hierarchical structure of the network and the rational allocation of broadband, TRUNK is interpreted as "port convergence", which is an important way of bandwidth expansion and link backup.

Well, the main function of what we call trunk is to realize the communication between hosts with the same VLAN between different switches.

Let's start with two concepts.

Access link: the access terminal PC access can only run the corresponding VLAN data

Trunk link: access to other network devices (switches, routers) trunk can run all VLAN data

II. Logo of VLAN

There are two types of encapsulation for relay over Ethernet.

1.ISL (Cisco Private Standard)

Introduction of Trunk principle and experimental operation (more detailed)

2.IEEE 802.1q: the switch is tagged and dismantled, and the trunk link can run all VLAN data (unless you set it up and do not allow some)

Introduction of Trunk principle and experimental operation (more detailed)

Introduction of Trunk principle and experimental operation (more detailed)

The four bytes in the frame format are as follows:

(1) the 2-byte marking protocol identifier (TPID) contains a fixed value of 0x8100, which indicates that the frame has 802.1q tagging information.

(2) the 2-byte tag control information (TCI) contains the following elements:

3-digit user priority: 802.1q does not use this field

1-bit canonical format identifier (CFI): CFI is commonly used in Ethernet and token ring networks. In Ethernet, the value is generally set to 0

12-bit VLAN identifier (VLAN ID): this field uniquely identifies the VLAN to which the frame belongs. VLAN ID can uniquely identify 4096 VLAN, but VLAN 0 and VLAN 4095 are reserved.

The following experiment uses the encapsulation type of this format

Purpose: only one link is used, and the data of different VLAN is distinguished by identification (trunk link)! ~!

Experimental environment:

1.GNS3 software

2.4initialized PC hosts + 2 initialized switches

3. If the host is using a virtual machine, then all the firewalls of the virtual machine need to be turned off, otherwise the data transmission will be affected later.

The process of the experiment:

1.GNS3 software, 4 PC hosts + 2 switches ready

two。 We connect them all with a network cable, and define each IP address according to our personal preference. PC2 and PC3 are written in the same VLAN next to the port, so it is convenient for us to enter the IP address and check it.

3. First turn off the routing function and create a VLAN in SW1. (the same is true for SW2)! ~!

The port of 4.SW1 is added to VLAN (the same is true of SW2)! ~!

SW MO ACC is the abbreviation of swithport mode access.

Enter the command to view VLAN information: show vlan-swith brief take a look at the information of VLAN

5. It's the same with making a trunk link (Ttunk) / SW2 with SW1's f1thumb 2! ~!

6. Configure all the SW2 switches and four PCs

7. Is it possible to communicate with Trunk in the same VLAN under the experiment?

8. Different VLAN can't communicate with each other.

9. We find that Trunk uses only one link, and the data of different VLAN (trunk link) can be interconnected with the same VLAN by identification.

Trunk is a VLAN that can run as much as possible.

The result is that hosts with the same VLAN can communicate with each other, but hosts with different VLAN cannot communicate with each other. If you want to achieve communication between different VLAN hosts, you need to learn the principle of layer 3 switching.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report