The PVIDs of PC1 and PC2 are 8 and 9 respectively; the PVID of SW2's g0/0/2 port is 10; by setting the Tag list and Untag list of the Hybrid, R1 can communicate with PC1 and PC2 respectively, but PC1 and PC2 cannot communicate; (capture packets to verify the tags carried in the round-trip traffic).

Topology:

image.png 

R1 configuration:

<Huawei>sy

Enter system view, return user view with Ctrl+Z.

[Huawei]sy R1

[R1]int g0/0/0

 

[R1-GigabitEthernet0/0/0]ip address 10.1.10.3 24

SW1 configuration:

<Huawei>sy

Enter system view, return user view with Ctrl+Z.

[Huawei]sy SW1

 

[SW1]v b 8 to 10 //Create vlan 8 9 10

Info: This operation may take a few seconds. Please wait for a moment...done.

 

[SW1]int g0/0/1

[SW1-GigabitEthernet0/0/1]p l h   

[SW1-GigabitEthernet0/0/1]p h p v 8 //Create pvid 8

[SW1-GigabitEthernet0/0/1]p h u v 8 10 //0/0/1 port strips tag 8 and 10

 

 

[SW1-GigabitEthernet0/0/1]int g

0/0/2

[SW1-GigabitEthernet0/0/2]p h p v 9 //Create pvid 9

 

[SW1-GigabitEthernet0/0/2]p h u v 9 10 //0/0/2 port strips tag 9 and 10

 

[SW1-GigabitEthernet0/0/2]int g0/0/3

[SW1-GigabitEthernet0/0/3]p h t v 8 to 10 //Tag 8 9 10 when sending data with SW2

SW2 configuration:

<Huawei>

<Huawei>sy

Enter system view, return user view with Ctrl+Z.

[Huawei]sy SW2

 

 

[SW2]v b 8 to 10 //Create vlan 8 9 10

Info: This operation may take a few seconds. Please wait for a moment...done.

[SW2]

int g0/0/1

[SW2-GigabitEthernet0/0/1]p h t v 8 to 10 //Tag 8 9 10 when receiving data

 

[SW2-GigabitEthernet0/0/1]int g0/0/2

[SW2-GigabitEthernet0/0/2]p h p v 10 //Create pvid 10

[SW2-GigabitEthernet0/0/2]p h u v

8 to 10 //R1 strips the tag when receiving and sending data 8 9 10

PC1 communicates with R1/PC2:

image.png 

PC2 communicates with R1:

image.png 

 

Capture the message:

image.png 

image.png 

image.png 

Analysis: When PC1 sends data to SW1, the PVID is 8, and when R1 replies, the PVID is 10, so the stripped tags are 8 and 10. The same is true for PC2, the PVID is 9, so the stripped tags are 9 and 10; the connection between SW1 and SW2 is in trunk mode, and the data passing through It needs to be tagged. When viewing the tag list, there is a corresponding tag and the data is forwarded. When the data is sent to R1, tags 8, 9, and 10 need to be stripped off, so PC1/PC2 can communicate with R1, but there is no corresponding Untag list between PC1 and PC2, so communication cannot occur.