思科交换机划分vlan

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

配置vlan
1、 从特权模式进入vlan模式,添加vlan。


Switch>
Switch>
Switch>en
Switch#vlan data
% Warning: It is recommended to configure VLAN from config mode,
as VLAN database mode is being deprecated. Please consult user
documentation for configuring VTP/VLAN in config mode.

Switch(vlan)#vlan 2 name yv1
VLAN 2 added:
Name: yv1
Switch(vlan)#vlan 3 name yv2
VLAN 3 added:
Name: yv2
Switch(vlan)#vlan 4 name yv3
VLAN 4 added:
Name: yv3
Switch(vlan)#exit
APPLY completed.
Exiting....


2、 从特权模式进入全局模式,再进入各端口划分接口到各vlan。


Switch#
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int fa0/1
Switch(config-if)#switchport mode access
Switch(config-if)#sw acc vlan 2
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#int range fa0/2-12
Switch(config-if-range)#sw mode acc
Switch(config-if-range)#sw acc vlan 3
Switch(config-if-range)#no shutdown
Switch(config-if-range)#exit
Switch(config)#int range fa 0/13-24
Switch(config-if-range)#sw mode acc
Switch(config-if-range)#sw acc vlan 4
Switch(config-if-range)#no shutdown
Switch(config-if-range)#exit
Switch(config)#exit
Switch#
%SYS-5-CONFIG_I: Configured from console by console


3、 查看配置的vlan


Switch#
Switch#show vlan

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active
2 yv1 active Fa0/1
3 yv2 active Fa0/2, Fa0/3, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12
4 yv3 active Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
4 enet 100004 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005

1500 - - - ibm - 0 0

Remote SPAN VLANs
------------------------------------------------------------------------------


Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
Switch#

相关文档
最新文档