思科二层vlan配置:

1、创建vlan,将相关端口指定至vlan

>enable

#config t

()#vlan 10

()#no vlan 20(删除vlan 20)

(可选)()#name vlan-name

()#end

#show vlan

#copy running-config startup-config (保存vlan配置)

()#config t

()#interface Gig0/1

(-if)#switchport mode access (将端口【第二层访问端口】定义为vlan成员)

(-if)switchport access vlan 10

(-if)end

#show interface Gig0/1

#show vlan brief

#copy running-config startup-config (保存vlan配置)