650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/06/2D/wKiom1mzQRrRvkpuAAA8M-h2JiY943.png "title=" Cisco.png "alt=" Wkiom1mzqrrrvkpuaaa8m-h2jiy943.png "/>
switch>en
Switch>enable
Switch#configure Terminal
Switch (config) #vlan 10
Switch (config-vlan) #name lol
Switch (Config-vlan) #vlan 20
Switch (Config-vlan) #name DNF
Switch (Config-vlan) #exit
Switch (config) #exit
Switch#configure T
Switch (config) #interface F0/3
Switch (config-if) #switchport mode access
Switch (config-if) #switchport Access VL 10
Switch (config-if) #exit
Switch (config) #interface F0/4
Switch (config-if) #switchport mode access
Switch (config-if) #switchport Access VL 20
Switch (config-if) #exit
Switch#show VLAN---------------View VLAN-configured information
Switch (config) #interface f0/24
Switch (config-if) #switchport mode trunk
Switch (config-if) #switchport trunk allowed VLAN 10,20
Switch (config-if) #end
Switch#show interfaces Trunk-------> View Port trunk mode
Port Mode encapsulation Status Native VLAN------------ Display Results
FA0/24 on 802.1q trunking 1
Port Vlans allowed on trunk
FA0/24 10,20
Port Vlans allowed and active in management domain
FA0/24 10,20
Port Vlans in Spanning tree forwarding state and not pruned
FA0/24 10,20
switch#
Switch1 VLAN Configuration Complete
Switch2
You can ping each other on the PC to verify the test results.
This article is from the "13266133" blog, please be sure to keep this source http://13276133.blog.51cto.com/13266133/1963942
Cisco VLAN with trunk configuration (Jiang)