实验拓扑
步骤:
第一步
首先打开SW1,配置它vlan信息
SW1#conf t
Enter configuration commands, one per line. End with
CNTL/Z.
SW1#vlan database
SW1(vlan)#vlan 10 name ccna
VLAN 10 added:
Name: ccna
SW1(vlan)#vlan 20 name ccnp
VLAN 20 added:
Name: ccnp
SW1(vlan)#exit
APPLY completed.
Exiting....
SW1#conf t
Enter configuration commands, one per line. End with
CNTL/Z.
SW1(config)#int f0/1
SW1(config-if)#switchport access vlan 10
SW1(config-if)#int f0/2
SW1(config-if)#switchport access vlan 20
SW1(config-if)#int f0/0
SW1(config-if)#switchport mode trunk
*Mar 1 00:05:15.851: %DTP-