2950交换机简要配置手册(中文)
最新思科cisco2950交换机配置手册(中文)

2950交换机简明配置维护手册目录第1章说明 (3)第2章产品特性 (3)第3章配置端口 (3)3.1配置一组端口 (3)3.2配置二层端口 (5)3.2.1配置端口速率及双工模式 (6)3.2.2端口描述 (7)3.3监控及维护端口 (8)3.3.1监控端口和控制器的状态 (8)3.3.2刷新、重置端口及计数器 (10)3.3.3关闭和打开端口 (10)第4章配置VLAN (11)4.1理解VLAN (11)4.2可支持的VLAN (12)4.3配置正常范围的VLAN (12)4.3.1生成、修改以太网VLAN (13)4.3.2删除VLAN (15)4.3.3将端口分配给一个VLAN (15)4.4配置VLAN Trunks (16)4.4.2使用STP实现负载均衡 (19)第5章配置Cluster (23)第1章说明本手册只包括日常使用的有关命令及特性,其它未涉及的命令及特性请参考英文的详细配置手册。
第2章产品特性2950是只支持二层的交换机支持VLAN•到250 个VLAN•支持VLAN ID从1到4094(IEEE 802.1Q 标准)•支持ISL及IEEE 802.1Q封装安全•支持IOS标准的密码保护•支持标准及扩展的访问列表来定义安全策略•支持基于VLAN的访问列表监视•交换机LED指示端口状态•SPAN及远端SPAN (RSPAN) 可以监视任何端口或VLAN的流量•内置支持四组的RMON监控功能(历史、统计、告警及事件)第3章配置端口3.1 配置一组端口当使用interface range命令时有如下的规则:•有效的组范围:o vlan从1 到4094o fastethernet槽位/{first port} - {last port}, 槽位为0o gigabitethernet槽位/{first port} - {last port},槽位为0o port-channel port-channel-number - port-channel-number, port-channel号从1到64•端口号之间需要加入空格,如:interface range fastethernet 0/1 –5是有效的,而interface range fastethernet 0/1-5是无效的.•interface range命令只能配置已经存在的interface vlan•所有在同一组的端口必须是相同类别的。
2950交换机trunk-vlan配置实例

VLAN的划分与互通实验准备工作:按照下图所示,连接实验环境。
如果没有设备,可下载Boson NetSim局域网交换与路由模拟器。
拓扑图:配置过程:说明:本实验完全在Boson Netsim模拟器上完成,下面红色下划线文字均为配置过程输入的命令。
一、交换机2950B配置1、配置交换机主机名、管理ip、默认网关Switch>enSwitch#config tSwitch(config)#hostname 2950B2950B(config)#int vlan 12950B(config-if)#ip address 172.16.10.3 255.255.255.0 //设置管理IP地址2950B(config-if)#no shut2950B(config-if)#exit2950B(config)#ip default-gateway 172.16.10.1 //设置默认网关IP地址2、配置中继口(即trunk口)2950B(config)#int f0/12950B(config-if)#switchport mode trunk2950B(config-if)#exit2950B(config)#int f0/42950B(config-if)#switchport mode trunk2950B(config-if)#exit2950B(config)#int f0/52950B(config-if)#switchport mode trunk2950B(config-if)#exit2950B(config)#3、配置vtp,把2950B交换机设置成客户机模式,2950B从2950C接收vlan信息2950B#vlan database2950B(vlan)#vtp client2950B(vlan)#vtp domain cisco4、创建Vlan2950B(vlan)#vlan 2 name sales // 将vlan 2设置名称为sales2950B(vlan)#vlan 3 name marketing // 将vlan 2设置名称为marketing 2950B(vlan)#apply2950B(vlan)#exit5、将交换机端口分配到vlan中2950B#config t2950B(config)#int f0/22950B(conf-if)#switchport mode access // 设置二层交换端口2950B(config-if)#switchport access vlan 22950B(config-if)#exit2950B(config)#int f0/32950B(conf-if)#switchport mode access // 设置二层交换端口2950B(config-if)#switchport access vlan 32950B(config-if)#exit2950B(config)#exit2950B#6、保存配置2950B#copy run start二、交换机2950C配置1、配置交换机主机名、管理ip、默认网关Switch>enSwitch#config tSwitch(config)#hostname 2950C2950C(config)#int vlan 12950C(config-if)#ip address 172.16.10.2 255.255.255.02950C(config-if)#no shut2950C(config-if)#exit2950B(config)#ip default-gateway 172.16.10.12、配置中继口(即trunk口)2950C(config)#int f0/42950C(config-if)#switchport mode trunk2950C(config-if)#exit2950C(config)#int f0/52950C(config-if)#switchport mode trunk2950C(config-if)#exit2950C(config)#3、配置vtp,把2950C交换机设置成服务器模式,2950B从2950C接收vlan信息2950C#vlan database2950C(vlan)#vtp server2950C(vlan)#vtp domain cisco4、创建Vlan2950C(vlan)#vlan 2 name sales2950C(vlan)#vlan 3 name marketing2950C(vlan)#apply2950C(vlan)#exit5、将交换机端口分配到vlan中2950C#config t2950C(config)#int f0/22950C(conf-if)#switchport mode access // 设置二层交换端口2950C(config-if)#switchport access vlan 22950C(config-if)#exit2950C(config)#int f0/32950C(conf-if)#switchport mode access // 设置二层交换端口2950C(config-if)#switchport access vlan 32950C(config-if)#exit2950C(config)#exit2950C#6、保存配置2950C#copy run start三、vlan间路由器2600配置过程1、配置路由器主机名、清除f0/0端口ip地址、启动f0/0端口Router>enRouter#config tRouter(config)#hostname trunkrouterTrunkrouter(config)#int f0/0Trunkrouter(config-if)#no ip addressTrunkrouter(config-if)#no shut2、将路由器的快速以太网端口fa0/0划分为三个子接口fa0/0.1、fa0/0.2和fa0/0.3,对每个子接口配置,并采用802.1q的数据封装。
2950交换机的详细配置

2950交换机的详细配置switch> 用户模式1:进入特权模式 enableswitch> enableswitch#2:进入全局配置模式 configure terminalswitch> enableswitch#configure terminalswitch(conf)#3:交换机命名 hostname aptech2950 以aptech2950为例switch> enableswitch#configure terminalswitch(conf)#hostname aptch-2950aptech2950(conf)#4:配置使能口令 enable password cisco 以cisco为例switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable password cisco5:配置使能密码 enable secret ciscolab 以cicsolab为例switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable secret ciscolab6:设置虚拟局域网vlan 1 inte***ce vlan 1switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# inte***ce vlan 1aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip和子网掩码aptech2950(conf-if)#no shut 使配置处于运行中aptech2950(conf-if)#exitaptech2950(conf)#ip default-gateway 192.168.254 设置网关地址7:进入交换机某一端口 inte***ce fastehernet 0/17 以17端口为例switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# inte***ce fastehernet 0/17aptech2950(conf-if)#8:查看命令 showswitch> enableswitch# show version 察看系统中的所有版本信息show inte***ce vlan 1 查看交换机有关ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show inte***ce fastethernet 0/1 察看交换机1接口具体配置和统计信息show mac-address-table 查看mac地址表show mac-address-table aging-time 查看mac地址表自动老化时间9:交换机恢复出厂默认恢复命令switch> enableswitch# erase startup-configureswitch# reload10:双工模式设置switch> enableswitch#configure terminalswitch2950(conf)#hostname aptch-2950aptech2950(conf)# inte***ce fastehernet 0/17 以17端口为例aptech2950(conf-if)#duplex full/half/auto 有full , half, auto 三个可选项11:cdp相关命令switch> enableswitch# show cdp 查看设备的cdp全局配置信息show cdp inte***ce fastethernet 0/17 查看17端口的cdp配置信息show cdp traffic 查看有关cdp包的统计信息show cdp nerghbors 列出与设备相连的cisco设备12:csico2950的密码恢复拔下交换机电源线。
PowerEdge 2950 用户指南说明书

用户指南注和注意本说明文件中的信息如有更改,恕不另行通知。
© 2007 Dell Inc. 版权所有,翻印必究。
未经 Dell Inc. 书面许可,严禁以任何形式进行复制。
本文中用到的商标:Dell 、DELL 徽标、Dell OpenManage 和 PowerEdge 是 Dell Inc. 的商标;Microsoft 、Active Directory 、Internet Explorer 、Windows 、Windows NT 、Windows Server 和 Windows Vista 是 Microsoft 公司在美国和其他国家/地区的商标或注册商标;Red Hat 是 Red Hat, Inc. 的注册商标;Novell 和 SUSE 是 Novell Corporation 的注册商标。
Intel 是 Intel 公司的注册商标;UNIX 是 The Open Group 在美国和其他国家/地区的注册商标。
Avocent 是 Avocent 公司的商标; OSCAR 是 Avocent 公司或其子公司的注册商标。
版权 1998-2006 The OpenLDAP Foundation 。
版权所有,翻印必究。
无论修改与否,以源代码和二进制的形式重新分发或使用都必须经过 OpenLDAP Public License 的授权许可。
此许可证的副本包括在分发目录顶层中的 LICENSE 文件中,您也可以在 /license.html 中找到。
OpenLDAP 是 The OpenLDAP Foundation 的注册商标。
一些单独文件和/或附送软件包的版权可能归其它方所有,受其它条款的制约。
此软件系根据 University of Michigan LDAP v3.3 分发版本开发出来。
此软件还包含来自公共资源的材料。
有关 OpenLDAP 的信息可以从 / 获得。
部分版权 1998-2004 Kurt D 。
2950交换机简要配置手册(中文)

2950交换机简明配置维护手册目录说明 (3)产品特性 (3)配置端口 (4)配置一组端口 (4)配置二层端口 (6)配置端口速率及双工模式 (6)端口描述 (7)监控及维护端口 (8)监控端口和控制器的状态 (8)刷新、重置端口及计数器 (10)关闭和打开端口 (10)配置VLAN (11)理解VLAN (11)可支持的VLAN (12)配置正常范围的VLAN (12)生成、修改以太网VLAN (13)删除VLAN (14)将端口分配给一个VLAN (15)配置VLAN Trunks (16)使用STP实现负载均衡 (19)配置Cluster (23)说明本手册只包括日常使用的有关命令及特性,其它未涉及的命令及特性请参考英文的详细配置手册。
产品特性2950是只支持二层的交换机支持VLAN•到250 个VLAN•支持VLAN ID从1到4094(IEEE 802.1Q 标准)•支持ISL及IEEE 802.1Q封装安全•支持IOS标准的密码保护•支持标准及扩展的访问列表来定义安全策略•支持基于VLAN的访问列表监视•交换机LED指示端口状态•SPAN及远端SPAN (RSPAN) 可以监视任何端口或VLAN的流量•内置支持四组的RMON监控功能(历史、统计、告警及事件)配置端口配置一组端口当使用interface range命令时有如下的规则:•有效的组范围:o vlan从1 到4094o fastethernet槽位/{first port} - {last port}, 槽位为0o gigabitethernet槽位/{first port} - {last port},槽位为0o port-channel port-channel-number - port-channel-number, port-channel号从1到64•端口号之间需要加入空格,如:interface range fastethernet 0/1 – 5是有效的,而interface range fastethernet 0/1-5是无效的.•interface range命令只能配置已经存在的interface vlan•所有在同一组的端口必须是相同类别的。
交换机基础及2950的配置

交换机启动与初始化
加电启动
连接好交换机电源,按下 电源开关,交换机将开始 启动。
初始化过程
交换机启动后会进行自检, 加载并运行操作系统,初 始化硬件和接口。
进入命令行界面
初始化完成后,可以通过 控制台或远程登录方式进 入交换机的命令行界面。
交换机端口配置
端口类型
2950交换机支持多种端口类型, 包括以太网端口、快速以太网端
案例一
交换机无法启动
分析
可能原因包括电源故障、主板损坏等。
解决思路
首先检查电源插头和电源线是否连接良好,然后尝试更换电源模块。 如果问题仍然存在,考虑更换主板。
故障案例分析与解决思路
案例二
部分端口无法通信
分析
可能原因包括端口故障、配置错误等。
解决思路
首先确认端口配置和连接状态,检查端口模块是否损坏。如果配置 有误,及时更正配置命令。
控和配置。
2950交换机性能指标
端口数量和速度
提供24个或48个10/100Mbps 自适应端口,以及可选的千兆
上行链路端口。
背板带宽
高达13.6Gbps,确保数据在交 换机内部的高速传输。
转发速率
线速转发,无阻塞交换。
MAC地址表大小
8K或更大,快速学习并存储网 络中的MAC地址。
2950交换机应用场景
生成树协议工作原理
STP通过阻塞某些端口来消除环路,并选举出一个根桥和多个指定 桥,以确保网络拓扑的稳定。
生成树协议配置命令
在2950交换机上,可以使用spanning-tree命令启用或关闭STP, 并配置相关参数。
05
2950交换机高级配置
交换机安全配置
cisco2950交换机简单配置2950是只支持二层的交换机支持VLAN第1步

cisco2950交换机简单配置2950是只支持二层的交换机支持VLAN第1步cisco2950 交换机简单配置2950 是只支持二层的交换机支持VLAN 第1 步:单击“开始”按钮,在“程序”菜单的“附件”选项中单击“超级终端” 第2 步:在“名称”文本框中键入“Cisco” 第3 步:在“连接时使用”下拉列表框中选择与交换机相连的计算机的串口。
台式机为“com 1”,笔记本为“com 3 或者com 5”。
第4 步:在“波特率”下拉列表框中选择“9600”-确定. 如果通信正常的话就会出现类似于如下所示的主配置界面,并会在这个窗口中就会显示交换机的初始配置情况。
enter enter enter no!1)配置交换机姓名switch>ena switch#configure enter switch#configure terminal (进入配置状态) Switch(config)#hostname 配置的交换机姓名如:30FLoor-2960-1 30FLoor-2960-1(config)#end 30FLoor-2960-1# 2)配置交换机的ip 30FLoor-2960-1#configure terminal (进入配置状态) 30FLoor-2960-1(config)#interface vlan 1 30FLoor-2960-1(config)#ip address ip 地址子网掩码例如:30FLoor-2960-1(config)#ip address 10.11.90.10 255.255.255.0 30FLoor-2960-1(config)#no shutdown 30FLoor-2960-1(config)#end 30FLoor-2960-1# 30FLoor-2960-1# 3)配置交换机的默认网关30FLoor-2960-1(config)#ip default-gateway 网关ip 例如:30FLoor-2960-1(config)#ip default-gateway 10.11.90.254 4)设置路由30FLoor-2960-1(config)#ip route 0.0.0.0 X.X.X.X 5)设置console 口密码30FLoor-2960-1(config)#line console 0 30FLoor-2960-1(config-line)#password 输入密码30FLoor-2960-1(config-line)#login 30FLoor-2960-1(config-line)#end 6)设置telnet 的密码30FLoor-2960-1(config)#line vty 0 10 30FLoor-2960-1(config-line)#password 输入密码(yuxuan)30FLoor-2960-1(config-line)#login 30FLoor-2960-1(config-line)#end7)设置交换机的enable 密码30FLoor-2960-1(config)#enablepassword 输入密码(xuan)30FLoor-2960-1(config)#enable secret 输入密码(yuxuan)30FLoor-2960-1(config)#end 8)将当前配置信息保存到闪存中30FLoor-2960-1(config)#write 9)查看交换机信息30FLoor-2960-1# show version 查看交换机版本信息show ip interfaces 查看交换机的ip 地址show interface vlan 1 验证管理ip 地址已经配置并开启show ip redirect 查看交换机的网关show running-configure 查看交换机当前的配置信息show configure 查看交换机保存的配置信息switch#write ;保存配置信息switch#show vtp ;查看vtp 配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan 配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息10)交换机基本配置步骤1.登陆到交换机2.进入特权模式命令:enable 3.进入全局配置模式命令:configure terminal 4.进入相应的配置子模式如:接口子模式命令:interface vlan 1 交换机基本状态:switch: ;ROM 状态,路由器是rommon> hostname> ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname ;设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令switch(config)#enable password xxa ;设置特权非密口令switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xx switch#exit ;返回命令交换机VLAN 设置:switch#vlan database ;进入VLAN 设置switch(vlan)#vlan 2 ;建VLAN 2 switch(vlan)#no vlan 2 ;删vlan 2 switch(config)#int f0/1 ;进入端口 1 switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2 switch(config-if)#switchport mode trunk ;设置为干线switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain ;设置发vtp 域名switch(config)#vtp password ;设置发vtp 密码switch(config)#vtp mode server ;设置发vtp 模式switch(config)#vtp mode client ;设置发vtp 模式交换机设置IP 地址:switch(config)#interface vlan 1 ;进入vlan 1 switch(config-if)#ip address ;设置IP 地址switch(config)#ip default-gateway ;设置默认网关switch#dir flash: ;查看闪存交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp 配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan 配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息思科2950 交换机VLAN 划分cisco 首先配置一下交换机SC-2950> SC-2950>en SC-2950#conf t Enter configuration commands, one per line. End with CNTL/Z. SC-2950(config)#config-register 0x2102 SC-2950(config)#end 添加三个VLAN SC-2950#vlan data SC-2950(vlan)#vlan 10 name v1 VLAN 10 added: Name: v1 SC-2950(vlan)#vlan 20 name v2 VLAN 20 added: Name: v2 SC-2950(vlan)#vlan 30 name v3 VLAN 30 added: Name: v3 SC-2950(vlan)#exitAPPLY completed. Exiting.... SC-2950# 划分接口到各个VLAN SC-2950#conf t Enter configuration commands, one per line. End with CNTL/Z. SC-2950(config)#int fa0/1 //留给管理员SC-2950(config-if)#switchport mode access SC-2950(config-if)#sw acc vlan 10 SC-2950(config-if)#no shutdown SC-2950(config-if)#exit SC-2950(config)#int range f0/2 - 15 SC-2950(config-if-range)#sw mode acc SC-2950(config-if-range)#sw acc vlan 20 SC-2950(config-if-range)#no sh SC-2950(config-if-range)#exit SC-2950(config)#int range f0/16 - 24 SC-2950(config-if-range)#sw mode acc SC-2950(config-if-range)#sw acc vlan 30 SC-2950(config-if-range)#no sh SC-2950(config-if-range)#exit 激活VLAN,并且给VLAN 10 加个IP 以便管理SC-2950(config)#int vlan 10 SC-2950(config-if)#ip add 192.168.1.1 255.255.255.0 SC-2950(config-if)#no sh SC-2950(config-if)#exit SC-2950(config)#int vlan 20 SC-2950(config-if)#no sh SC-2950(config-if)#exit SC-2950(config)#int vlan 30 SC-2950(config-if)#no sh SC-2950(config-if)#exit 将交换机指向网关SC-2950(config)#ip default-gateway 192.168.1.254 SC-2950(config)#end SC-2950# 检测配置SC-2950#sh vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------1 default active 10 v1 active Fa0/1 20 v2 active 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/1530v3activeFa0/16, Fa0/17, Fa0/18, Fa0/19 Fa0/20, Fa0/21, Fa0/22, Fa0/23 Fa0/24 Prot down down down up up downSC-2950#sh ip int b Interface IP-Address ocol FastEthernet0/23 unassigned FastEthernet0/24 unassigned Vlan1 unassigned Vlan10 192.168.1.1 Vlan20 unassigned Vlan30 unassigned SC-2950#sh run Building configuration... Current configuration : 1482 bytes ... ! interface FastEthernet0/24 switchport access vlan 30 ! interface Vlan1 no ip address ! interface Vlan10 ip address 192.168.1.1 255.255.255.0 ! interface Vlan20 no ip address ! interface Vlan30 no ip address ! ip default-gateway 192.168.1.254 ip http server ! ... 保存配置SC-2950#write Building configuration... [OK] cisco 2960 交换机安装配置基础新设备配置内容:1. interface vlan 1 的ip,gateway conf t int vlan 1 ip address xx.xx.xx.xx 255.255.255.0OK? Method Status YES unset up YES unset up YES unset up YES manual up YES unset up YES unset upip default-gateway ip-address no shutdown exit 2.en 的密码3.line vty 0-4 telnet 的密码4.wr 存盘show interface vlan 1 show run 将F0/1-10 端口加入到VLAN20 中,对应以下命令interface range f0/1 -10 switchport mode acccess switchport access vlan 20 注意,f0/1 后面有个空格,然后才是-10 cisco 2950 常用配置命令产品相关命令1、配置IP 地址交换机要能够被网管,必须给它标识一个管理IP 地址,默认情况下CISCO 交换机的VLAN 1 为管理VLAN,为该VLAN 配上IP 地址,交换机就可以被网管了。
思科2950

2950交换机简明配置维护手册配置端口配置一组端口当使用interface range命令时有如下的规则: 有效的组范围:o vlan从1 到4094o fastethernet槽位/{first port} - {last port}, 槽位为0o gigabitethernet槽位/{first port} - {last port},槽位为0o port-channel port-channel-number - port-channel-number, port-channel号从1到64∙端口号之间需要加入空格,如:interface range fastethernet 0/1 – 5是有效的,而interface range fastethernet 0/1-5是无效的.∙interface range命令只能配置已经存在的interface vlan∙所有在同一组的端口必须是相同类别的。
见以下例子:Switch# configure terminalSwitch(config)# interface range fastethernet0/1 - 5Switch(config-if-range)# no shutdownSwitch(config-if-range)#*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to up*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/4, changed state to up*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/5, changed state to up*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/05, changed state to up*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changedstate to up*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changedstate to up以下的例子显示使用句号来配置不同类型端口的组:Switch# configure terminalSwitch(config)# interface range fastethernet0/1 - 3, gigabitethernet0/1 - 2Switch(config-if-range)# no shutdownSwitch(config-if-range)#*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to up*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet0/1, changed state to up*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet0/2, changed state to up *Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/ 1, changed state to up*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/ 2, changed state to up*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/ 3, changed state to up配置二层端口2950的所有端口缺省的端口都是二层口,如果此端口已经配置成三层端口的话,则需要用switchport来使其成为二层端口。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
2950交换机简明配置维护手册中望商业机器公司2002-12-14目录说明 (3)产品特性 (3)配置端口 (4)配置一组端口 (4)配置二层端口 (6)配置端口速率及双工模式 (6)端口描述 (7)监控及维护端口 (8)监控端口和控制器的状态 (8)刷新、重置端口及计数器 (10)关闭和打开端口 (10)配置VLAN (11)理解VLAN (11)可支持的VLAN (12)配置正常范围的VLAN (12)生成、修改以太网VLAN (13)删除VLAN (14)将端口分配给一个VLAN (15)配置VLAN Trunks (16)使用STP实现负载均衡 (19)配置Cluster (23)说明本手册只包括日常使用的有关命令及特性,其它未涉及的命令及特性请参考英文的详细配置手册。
产品特性2950是只支持二层的交换机支持VLAN∙到250 个VLAN∙支持VLAN ID从1到4094(IEEE 802.1Q 标准)∙支持ISL及IEEE 802.1Q封装安全∙支持IOS标准的密码保护∙支持标准及扩展的访问列表来定义安全策略∙支持基于VLAN的访问列表监视∙交换机LED指示端口状态∙SPAN及远端SPAN (RSPAN) 可以监视任何端口或VLAN的流量∙内置支持四组的RMON监控功能(历史、统计、告警及事件)配置端口配置一组端口当使用interface range命令时有如下的规则:∙有效的组范围:o vlan从1 到4094o fastethernet槽位/{first port} - {last port}, 槽位为0o gigabitethernet[英] [ˈdʒiɡəbit]槽位/{first port} - {last port},槽位为0o port-channel port-channel-number - port-channel-number, port-channel号从1到64∙端口号之间需要加入空格,如:interface range fastethernet 0/1 – 5是有效的,而interface range fastethernet 0/1-5是无效的.∙interface range命令只能配置已经存在的interface vlan∙所有在同一组的端口必须是相同类别的。
见以下例子:Switch# configure terminalSwitch(config)# interface range fastethernet0/1 - 5Switch(config-if-range)# no shutdownSwitch(config-if-range)#*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to up*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/4, changed state to up*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/5, changed state to up*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/05, changed state to up*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changedstate to up*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changedstate to up以下的例子显示使用句号来配置不同类型端口的组:Switch# configure terminalSwitch(config)# interface range fastethernet0/1 - 3, gigabitethernet0/1 - 2Switch(config-if-range)# no shutdownSwitch(config-if-range)#*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to up*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet0/1, changed state to up *Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet0/2, changed state to up *Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/ 1, changed state to up*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/ 2, changed state to up*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/ 3, changed state to up配置二层端口2950的所有端口缺省的端口都是二层口,如果此端口已经配置成三层端口的话,则需要用switchport来使其成为二层端口。
配置端口速率及双工模式可以配置快速以太口的速率为10/100Mbps及千兆以太口的速率为10/100/1000-Mbps; 但对于GBIC端口则不能配置速率及双工模式,有时可以配置nonegotiate,当需要联接不支持自适应的其它千兆端口时Switch# configure terminalSwitch(config)# interface fastethernet0/3Switch(config-if)# speed 10Switch(config-if)# duplex half端口描述Use the no description interface configuration command to delete the description.This example shows how to add a description on Fast Ethernet interface 0/4 and to verify the description:Switch# config terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)# interface fastethernet0/4Switch(config-if)# description Connects to MarketingSwitch(config-if)# endSwitch# show interfaces fastethernet0/4 descriptionInterface Status Protocol DescriptionFa0/4 up down Connects to Marketing 监控及维护端口监控端口和控制器的状态主要命令见下表:举例如下:Switch# show interfaces statusPort Name Status Vlan Duplex Speed TypeGi0/1 connected routed a-full a-100 10/100/1000Base TXGi0/2 wce server 20.20.2 disabled routed auto auto 10/100/1000Base TX Gi0/3 ip wccp web-cache notconnect routed auto auto 10/100/1000Base TX Gi0/4 notconnect routed auto auto 10/100/1000Base TX Gi0/5 notconnect routed auto auto 10/100/1000Base TX Gi0/6 disabled routed auto auto 10/100/1000Base TX Gi0/7 disabled routed auto auto 10/100/1000Base TX Gi0/8 disabled routed auto 100 10/100/1000Base TX Gi0/9 notconnect routed auto auto 10/100/1000Base TX Gi0/10 notconnect routed auto auto 10/100/1000Base TX Gi0/11 disabled routed auto auto unknownGi0/12 notconnect routed auto auto unknownSwitch# show interfaces fastethernet 0/1 switchportName: Fa0/1Switchport: EnabledAdministrative Mode: static accessOperational Mode: downAdministrative Trunking Encapsulation: dot1qNegotiation of Trunking: OffAccess Mode VLAN: 1 (default)Trunking Native Mode VLAN: 1 (default)Trunking VLANs Enabled: ALLPruning VLANs Enabled: 2-1001Protected: falseUnknown unicast blocked: disabledUnknown multicast blocked: disabledVoice VLAN: dot1p (Inactive)Appliance trust: 5Switch# show running-config interface fastethernet0/2Building configuration...Current configuration : 131 bytesinterface FastEthernet0/2switchport mode accessswitchport protectedno ip addressmls qos cos 7mls qos cos overrideend刷新、重置端口及计数器Note clear counters 命令只清除用show interface所显示的计数,不影响用snmp得到的计数举例如下:Switch# clear counters fastethernet0/5Clear "show interface" counters on this interface [confirm] ySwitch#*Sep 30 08:42:55: %CLEAR-5-COUNTERS: Clear counter on interface FastEthernet0/5by vty1 (171.69.115.10)可使用clear line命令来清除或重置某一端口或串口,在大部分情况下并不需要这样做:Switch# clear interface fastethernet0/5关闭和打开端口使用no shutdown命令重新打开端口.举例如下:Switch# configure terminalSwitch(config)# interface fastethernet0/5Switch(config-if)# shutdownSwitch(config-if)#*Sep 30 08:33:47: %LINK-5-CHANGED: Interface FastEthernet0/5, changed state to a administratively downSwitch# configure terminalSwitch(config)# interface fastethernet0/5Switch(config-if)# no shutdownSwitch(config-if)#*Sep 30 08:36:00: %LINK-3-UPDOWN: Interface FastEthernet0/5, changed state to up 配置VLAN理解VLAN一个VLAN就是一个交换网,其逻辑上按功能、项目、应用来分而不必考虑用户的物理位置。