
[Switch]int g0/0/1[Switch-GigabitEthernet0/0/1]port link-type access[Switch]vlan 10 [Switch]vlan 20[Switch-vlan10]port GigabitEthernet 0/0/1 to 0/0/2 [Switch-vlan20]port GigabitEthernet 0/0/3 to 0/0/4[Switch]undo vlan 10

int g0/0/24port link-type trunkport trunk allow-pass vlan allPC1和PC2能ping通PC5 (同属于vlan10)
原文:https://www.cnblogs.com/Cyanix/p/9933463.html