Switch holding switch port Mode

Source: Internet
Author: User

Are you worried about the port mode of the switch? below, I will walk into the switch with you and hold the switch port mode completely. I will use an article with a picture and truth to make you no longer confused.

Yigu Switch

1. Switch Port mode classification.

From a macro perspective, the switch port mode is divided into three types:

1. ACCESS type

In this mode, the port can only belong to one vlan. It is mainly used to connect to a computer.

2. TRUNK type

In this mode, the port can belong to multiple VLANs and receive and send packets from multiple VLANs. It is generally used for connection between vswitches.

3. HYBRID Type

In this mode, the port can belong to multiple VLANs and receive and send packets from multiple VLANs. It can be used for connection between vswitches and computers.

Ii. Notes

1. default vlan id

The Access port can only belong to one vlan. Therefore, its default vlan is the vlan where it is located and does not need to be set.

The Trunk port can belong to multiple VLANs. Therefore, you need to set the default vlan id of the port.

The Hybrid port can belong to multiple VLANs. Therefore, you must set the default vlan id for the port.

2. Three Port Co-existence

Three types of ports can be located on the same device, but the Trunk and Hybrid ports cannot be directly converted. They can only be set to Access ports and then to other ports.

3. Tag Differentiation

Digu Switch

I. Diagram of ACCESS port Mode

1. Packet Handling Method received by the port

2. Port Sending Message Processing Method

Ii. Diagram of TRUNK port Mode

1. Packet Handling Method received by the port

2. Port Sending Message Processing Method

Iii. Diagram of HYBRID port Mode

1. Packet Handling Method received by the port

2. Port Sending Message Processing Method

Iv. Comparison of interface modes

To make it clearer, I use a table to compare various interfaces.

Sangu Switch

1. ACCESS interface configuration

Operation Command description

Go to system view system-view-

Enter the Ethernet port View interface-type interface-number-

The link type of the configured port is Access port link-type access. By default, the link type of the port is Access

Adds the current Access port to the specified VLAN port access vlan-id (optional)

Ii. TRUNK port configuration

Iii. HYBRID port configuration

Iv. Case Analysis

Objective: To understand the communication in Hybrid port mode.

Tutorial topology:

 

Tutorial steps:

[Switch-Ethernet0/1] int e0/1

[Switch-Ethernet0/1] port link-type hybrid

[Switch-Ethernet0/1] port hybrid pvid vlan 10

[Switch-Ethernet0/1] port hybrid vlan 10 20 untagged

[Switch-Ethernet0/1] int e0/2

[Switch-Ethernet0/2] port link-type hybrid

[Switch-Ethernet0/2] port hybrid pvid vlan 20

[Switch-Ethernet0/2] port hybrid vlan 10 20 untagged

Experiment Analysis:

In this case, the connected pcs under inter e0/1 and inter e0/2 can communicate with each other, but the round-trip VLANs used for data communication are different.

The data sent by pc1 is sent to the switch by marking vlan10 in the pvid vlan10 of inter0/1. The switch finds that inter e0/2 allows data from vlan 10 to pass through, therefore, the data is forwarded to inter e0/2. Because vlan 10 on inter e0/2 is untagged, the switch removes the vlan10 mark on the packet and sends it to pc2, in this case, pc1-> p2 follows vlan10.

Pc2 sends packets back to pc1. The data sent by pc2 is sent to the vswitch by the pvid vlan20 encapsulation of vlan20 in inter0/2, the switch finds that inter e0/1 allows the data of vlan 20 to pass, so the data is forwarded to inter e0/1, because vlan 20 on inter e0/1 is untagged, the switch removes the vlan20 mark on the data packet and sends it to pc1 as a normal package. In this case, pc2-> pc1 follows vlan20.

Note:

I hereby declare that, in order to make it clear to my friends, I have referred some knowledge from the Internet, but the flowchart is definitely painted by the author, so please respect copyright. Finally, I hope you can learn more!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.