The most complete VLAN technology for small and medium-sized networks (2)

Access and trunk link case details:

The most complete VLAN technology for small and medium-sized networks (2)

As shown in the figure: #When
the switch ports used in the figure are in access mode
# and ports 1 and 24 on sw1 belong to vlan14, ports 4 and 24 on sw2 belong to vlan1
by default #The communication between PC1 and pc4 can be realized—— Indicates that vlan14 and vlan1 are not connected, and there is a network failure

                #因为我们在sw1和sw2的24口分别设置为trunk模式,sw2的4口加入vlan 14
                #实现pc1与pc4的通信,同时保证不同vlan 之间无法通信

The difference between Access and Trunk link:

 #连接的设备不同;
     access ,一般连接的是终端设备;
     trunk , 一般连接的是交换机设备;
 #支持的VLAN不同;
     access, 永远只能属于一个 VLAN ; 
     trunk , 可以同时支持多个VLAN ;
 #对数据的操作不同  
     access :
        对于出向数据而言,是不打标签的;
        对于入向数据而言,是不打标签的;
     trunk :
        对于出向数据而言,肯定是需要打标签的;
        对于入向数据而言, 
                #如果接收到的数据是携带标签的,
                      &如果该接收端口是允许该vlan的,则直接接收;
                      &如果该接收端口不允许该vlan的,则直接丢弃;
                #如果接受到的数据是不携带标签的,   
                      就会使用该 trunk 端口上的 PVID 表示的
                      vlan 号,为数据打一个标签;
                      注意:
                        trunk 链路上的默认的 PVID 是 1 ;                          

Through the above access and trunk links to understand the operation of tag tags,

In the future, when we troubleshoot the fault in the switching network, we
should use the following commands in sequence on each switch on the data forwarding path to troubleshoot:

1. When the switch receives a data frame, we use the following command to check:
display port vlan ---> In order to determine the PVID of the ingress port of the data frame;

2. Check the MAC-address table of the VLAN indicated by the PVID of the ingress port on the switch;
display mac-address vlan {pvid} #In
the display of the mac-address table of the vlan, if there is a corresponding mac-address
entry, then The data frame is sent out from the corresponding port;
#In the display of the mac-address table of the vlan, if there is no corresponding mac-address
entry, go to "Step 3"

3. Further determine the "outgoing port of the data frame" by the following command:
display vlan [pvid] --> First check the "outgoing port" corresponding to the vlan.
At the same time, determine the processing action of the label when the data goes out on the port:
UT - do not label;
TG - label;
in fact, the value of the label is PVID;

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325300057&siteId=291194637