Three port modes on the vswitch

Source: Internet
Author: User
Tags passthrough cisco switch

Three port modes on the vswitch three port modes Access, Hybrid and Trunk understanding www.2cto.com Ethernet ports have three link types: Access, Hybrid and Trunk. An Access port can belong to only one VLAN and is generally used to connect to a computer. A Trunk port can allow multiple VLANs to pass through and receive and send packets from multiple VLANs, it is generally used for ports connected between switches. A Hybrid port allows multiple VLANs to pass through. It can receive and send packets from multiple VLANs and can be used for connections between switches, it can also be used to connect to a user's computer. Hybrid and Trunk have the same processing method when receiving data. The only difference is that when sending data, Hybrid allows packets of multiple VLANs to be sent without tags, however, the Trunk port only allows packets sent by default VLAN without tags. First, we need to clarify the concept of the default VLAN of a port. The Access port belongs to only one VLAN, so its default VLAN is the VLAN where it is located; the Hybrid and Trunk ports belong to multiple VLANs, so you need to set the default vlan id. By default, the default VLAN of the Hybrid and Trunk ports is VLAN 1. When the port receives packets without VLAN tags, the packet is forwarded to the port of the default VLAN (if the default vlan id of the port is set ). When a port sends a packet with a VLAN Tag, if the vlan id of the packet is the same as the default vlan id of the port, the system removes the VLAN Tag of the packet and then sends the packet. Note: The default vlan of a Huawei switch is referred to as the "Pvid Vlan". For a Cisco switch, the default VLAN is referred to as the "Native Vlan". The incoming and outgoing data processing process of the switch interface is as follows: when a packet is received, determine whether there is VLAN information: If there is no VLAN information, add the PVID of the port and exchange and forward it. If yes, directly discard the (default) Acess port to send the packet: the VLAN information of the packets is stripped and directly sent out (therefore, the Access port can communicate with hosts under the same VLAN on the same vswitch, or the default VLAN1 Packet Exchange during vswitch-level connection, but cannot implement VLAN passthrough .) Trunk Port Receiver: receives a packet and determines whether VLAN information exists. If yes, checks whether the trunk port allows data from the VLAN to enter. If yes, the packet is forwarded; otherwise, the packet is discarded; if no VLAN information is available, the PVID of the port is configured and forwarded. Send packets on the trunk port: Compare the VLAN information of the packet to be sent with the PVID of the port. If not, send the packets directly. If the two are equal, the VLAN information is stripped and then sent. (So, after you set all the vswitch-level ports to Trunk and allow all VLANs to pass through, the VLAN2-VLAN4000 is directly passthrough, and VLAN1 is because it is the same as the Trunk default PVID, you need to remove VLAN information and add VLAN information to implement passthrough. If you change the default PVID of the Trunk, you can implement VLAN-X communication under a switch and the VLAN-Y under another switch .) Hybrid Port Receiver: receives a packet and determines whether VLAN information exists. If yes, it determines whether the hybrid port allows data from this VLAN to enter. If yes, it forwards the packet, otherwise, discard (in this case, the untag configuration on the port does not need to be considered, and the untag configuration only works for sending packets). If it does not exist, append the PVID of the port and perform exchange and forwarding. Hybrid port sends packets: 1. Determine the attributes of the VLAN on the current port (disp interface can see which VLAN is untag and which VLAN is tag) 2. If it is an untag, the VLAN information is stripped and then sent. If it is a tag, it is directly sent (therefore, Hybrid enables communication between hosts under different VLANs .) The following cases help you understand the hybrid port mode of the Huawei switch [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 at this time inter e0/1 and inter e0/2 under the connected PC can be interconnected, but Intercommunication The round-trip vlan used by the data is different. The following example describes the data sent by pc1 when pc1 accesses pc2 under inter e0/2, the pvid vlan10 of inter0/1 encapsulates vlan10 and sends it to the switch. The switch finds that inter e0/2 allows vlan 10 Data to pass through, so 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 data packet and sends it to pc2 as a normal package, in this case, pc1-> p2 uses vlan10 to analyze the pc2 packet return process and the data sent by pc2, the pvid vlan20 of inter0/2 encapsulates the vlan20 label and sends it to the switch. The switch finds that inter e0/1 allows vlan 20 Data to pass through, so the data is forwarded to inter e0/1, because the vlan 20 on the inter e0/1 is untagged, the switch removes the vlan20 from the packet. In the form of a normal package to pc1, pc2-> pc1 is going through vlan20.

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.