Switch_config#show run
Building configuration...
Current configuration:
!
service timestamps log date
service timestamps debug date
!
!
interface FastEthernet0/1 //端口1
switchport mode trunk //设定成trunk模式,允许端口属于多个vlan
switchport pvid 2 //数据入端口时加上vlan1的tag
switchport trunk vlan-allowed 1,24 //端口可以属于vlan1和24
switchport trunk vlan-untagged 1,24 //数据出端口时去除tag1和tag24
!
interface FastEthernet0/2 //端口2
switchport mode trunk //设定成trunk模式
switchport pvid 2 //数据入端口时加上vlan2的tag
switchport trunk vlan-allowed 2,24 //端口同时可属于vlan2和24
switchport trunk vlan-untagged 2,24 //数据出端口时去除tag2和tag24
!
interface FastEthernet0/3 //同上
switchport mode trunk
switchport pvid 3
switchport trunk vlan-allowed 3,24
switchport trunk vlan-untagged 3,24
!
interface FastEthernet0/4
switchport mode trunk
switchport pvid 4
switchport trunk vlan-allowed 4,24
switchport trunk vlan-untagged 4,24
!
interface FastEthernet0/5
switchport mode trunk
switchport pvid 5
switchport trunk vlan-allowed 5,24
switchport trunk vlan-untagged 5,24
!
interface FastEthernet0/6
switchport mode trunk
switchport pvid 6
switchport trunk vlan-allowed 6,24
switchport trunk vlan-untagged 6,24
!
interface FastEthernet0/7
switchport mode trunk
switchport pvid 7
switchport trunk vlan-allowed 7,24
switchport trunk vlan-untagged 7,24
!
interface FastEthernet0/8
switchport mode trunk
switchport pvid 8
switchport trunk vlan-allowed 8,24
switchport trunk vlan-untagged 8,24
!
interface FastEthernet0/9
switchport&nbs |