分享
 
 
 

交换机专题2

王朝other·作者佚名  2008-05-19
窄屏简体版  字體: |||超大  

Configuring the VLAN on Catalyst 2900/3500 XL, 2950, and 3550 Series Switches

Step 1 Before you create VLANs, you must decide whether to useVTP in your network. Using VTP, you can make configuration changes centrally on a single switch, and have those changes automatically communicated to all the other switches in the network. The default VTP mode on the switches mentioned in this section is the server mode.

For details on VTP, refer to Understanding and Configuring VLAN Trunk Protocol

You can check the VTP status on the XL Series Switches, by using the show vtp status command.

3524XL#show vtp status

VTP Version : 2

Configuration Revision : 0

Maximum VLANs supported locally : 254

Number of existing VLANs : 5

VTP Operating Mode : Server!-- This is the default mode

VTP Domain Name :

VTP Pruning Mode : Disabled

VTP V2 Mode : Disabled

VTP Traps Generation : Disabled

MD5 digest : 0xBF 0x86 0x94 0x45 0xFC 0xDF 0xB5 0x70

Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00

Step 2 By default, there is only a single VLAN for all ports, and this VLAN is called the default. VLAN1 cannot be renamed or deleted. You can run show vlan command to check the VLAN information.

3524XL#show vlan

VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4,

Fa0/5, Fa0/6, Fa0/7, Fa0/8,

Fa0/9, Fa0/10, Fa0/11, Fa0/12,

Fa0/13, Fa0/14, Fa0/15, Fa0/16,

Fa0/17, Fa0/18, Fa0/19, Fa0/20,

Fa0/21, Fa0/22, Fa0/23, Fa0/24,

Gi0/1, Gi0/2

1002 fddi-default active

1003 token-ring-default active

1004 fddinet-default active

1005 trnet-default active

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2

---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

1 enet 100001 1500 - - - - - 1002 1003

1002 fddi 101002 1500 - - - - - 1 1003

1003 tr 101003 1500 1005 0 - - srb 1 1002

1004 fdnet 101004 1500 - - 1 IBM - 0 0

1005 trnet 101005 1500 - - 1 IBM - 0 0

3524XL#

Use the following set of commands in the privileged mode to create another VLAN:

3524XL#vlan database!-- You have to enter into vlan database, to configure any VLAN

3524XL(vlan)#vtp server

Device mode already VTP SERVER.

!-- You may skip the above command, if the switch is already in server mode,

and you want the switch to be in server mode

Note: A switch is only allowed to create VLANs if it is in VTP server or VTP transparent modes. For details on VTP, please refer to the Understanding and Configuring VLAN Trunk Protocol (VTP) document.

3524XL(vlan)#vlan ?

ISL VLAN index

3524XL(vlan)#vlan 2 ?

are Maximum number of All Route Explorer hops for this VLAN

backupcrf Backup CRF mode of the VLAN

bridge Bridging characteristics of the VLAN

media Media type of the VLAN

mtu VLAN Maximum Transmission Unit

name Ascii name of the VLAN

parent ID number of the Parent VLAN of FDDI or Token Ring type VLANs

ring Ring number of FDDI or Token Ring type VLANs

said IEEE 802.10 SAID

state Operational state of the VLAN

ste Maximum number of Spanning Tree Explorer hops for this VLAN

stp Spanning tree characteristics of the VLAN

tb-vlan1 ID number of the first translational VLAN for this VLAN (or zero

if none)

tb-vlan2 ID number of the second translational VLAN for this VLAN (or zero

if none)

3524XL(vlan)#vlan 2 name ?

WORD The ASCII name for the VLAN

3524XL(vlan)#vlan 2 name cisco_vlan_2

VLAN 2 added:

Name: cisco_vlan_2

3524XL(vlan)#exit!-- You have to exit from the VLAN database, for the changes to be committed

APPLY completed.

Exiting....

3524XL#

Step 3 Make sure that the VLAN is created by running the show vlan command.

3524XL#show vlan

VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4,

Fa0/5, Fa0/6, Fa0/7, Fa0/8,

Fa0/9, Fa0/10, Fa0/11, Fa0/12,

Fa0/13, Fa0/14, Fa0/15, Fa0/16,

Fa0/17, Fa0/18, Fa0/19, Fa0/20,

Fa0/21, Fa0/22, Fa0/23, Fa0/24,

Gi0/1, Gi0/2

2 cisco_vlan_2 active

1002 fddi-default active

1003 token-ring-default active

1004 fddinet-default active

1005 trnet-default active

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2

---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

1 enet 100001 1500 - - - - - 1002 1003

2 enet 100002 1500 - - - - - 0 0

1002 fddi 101002 1500 - - - - - 1 1003

1003 tr 101003 1500 1005 0 - - srb 1 1002

1004 fdnet 101004 1500 - - 1 IBM - 0 0

1005 trnet 101005 1500 - - 1 IBM - 0 0

Step 4 You may want to add the ports (interfaces) in the newly created VLAN. You have to go to interface configuration mode for each of the interfaces that you want to add into the new VLAN. Use the following set of commands in the privileged mode to add a particular interface in the VLAN.

3524XL#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

3524XL(config)#interface fastEthernet 0/2

3524XL(config-if)#switchport access ?

vlan Set VLAN when interface is in access mode

3524XL(config-if)#switchport access vlan ?

VLAN ID of the VLAN when this port is in access mode

dynamic When in access mode, this interfaces VLAN is controlled by VMPS

3524XL(config-if)#switchport access vlan 2!-- Assigning interface fa0/2 to vlan 2

3524XL(config-if)#exit

3524XL(config)#interface fastEthernet 0/3

3524XL(config-if)#switchport access vlan 2!-- Assigning interface fa0/3 to vlan 2

3524XL(config-if)#end

3524XL#

00:55:26: %SYS-5-CONFIG_I: Configured from console by console

3524XL#wr mem!-- Saving the configuration

Building configuration...

Step 5 Verify VLAN configuration by using show vlan command.

3524XL#show vlan

VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

1 default active Fa0/1, Fa0/4, Fa0/5, Fa0/6,

Fa0/7, Fa0/8, Fa0/9, Fa0/10,

Fa0/11, Fa0/12, Fa0/13, Fa0/14,

Fa0/15, Fa0/16, Fa0/17, Fa0/18,

Fa0/19, Fa0/20, Fa0/21, Fa0/22,

Fa0/23, Fa0/24, Gi0/1, Gi0/2

2 cisco_vlan_2 active Fa0/2, Fa0/3

1002 fddi-default active

1003 token-ring-default active

1004 fddinet-default active

1005 trnet-default active

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2

---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

1 enet 100001 1500 - - - - - 1002 1003

2 enet 100002 1500 - - - - - 0 0

1002 fddi 101002 1500 - - - - - 1 1003

1003 tr 101003 1500 1005 0 - - srb 1 1002

1004 fdnet 101004 1500 - - 1 IBM - 0 0

1005 trnet 101005 1500 - - 1 IBM - 0 0

To remove ports from the VLAN, use the no switchport access vlan command in the interface configuration mode. Once the port is removed from the VLAN that is not VLAN 1 (the default VLAN), that port is automatically added back to the default VLAN.

For example, if y

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有