![思科cisco2950交换机配置手册(中文)_第1页](http://file2.renrendoc.com/fileroot_temp3/2021-4/23/d1b7c6fc-c1b9-40f1-b247-16e9712ed6bf/d1b7c6fc-c1b9-40f1-b247-16e9712ed6bf1.gif)
![思科cisco2950交换机配置手册(中文)_第2页](http://file2.renrendoc.com/fileroot_temp3/2021-4/23/d1b7c6fc-c1b9-40f1-b247-16e9712ed6bf/d1b7c6fc-c1b9-40f1-b247-16e9712ed6bf2.gif)
![思科cisco2950交换机配置手册(中文)_第3页](http://file2.renrendoc.com/fileroot_temp3/2021-4/23/d1b7c6fc-c1b9-40f1-b247-16e9712ed6bf/d1b7c6fc-c1b9-40f1-b247-16e9712ed6bf3.gif)
![思科cisco2950交换机配置手册(中文)_第4页](http://file2.renrendoc.com/fileroot_temp3/2021-4/23/d1b7c6fc-c1b9-40f1-b247-16e9712ed6bf/d1b7c6fc-c1b9-40f1-b247-16e9712ed6bf4.gif)
![思科cisco2950交换机配置手册(中文)_第5页](http://file2.renrendoc.com/fileroot_temp3/2021-4/23/d1b7c6fc-c1b9-40f1-b247-16e9712ed6bf/d1b7c6fc-c1b9-40f1-b247-16e9712ed6bf5.gif)
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、2950 交换机简明配置维护手册精选文库#目录说明产品特性配置端口 配置一组端口 配置二层端口 配置端口速率及双工模式 端口描述监控及维护端口 监控端口和控制器的状态 刷新、重置端口及计数器 关闭和打开端口 配置VLAN理解VLAN可支持的VLAN配置正常范围的 VLAN 生成、修改以太网 VLAN 删除VLAN将端口分配给一个 VLAN配置 VLAN Trunks使用STP实现负载均衡.配己置 Cluster101011111212131415161923精选文库? 支持ISL 及 IEEE 802.1Q 封装第1章说明本手册只包括日常使用的有关命令及特性,其它未涉及的命令及特性请参考英文的
2、详细配置手册。第2章产品特性2950是只支持二层的交换机支持VLAN到 250 个 VLAN? 支持VLAN ID 从 1 至U 4094( IEEE 802.1Q 标准)5安全? 支持IOS标准的密码保护支持标准及扩展的访问列表来定义安全策略 支持基于VLAN的访问列表监视交换机LED指示端口状态SPAN及远端SPAN (RSPAN)可以监视任何端口或 VLAN的流量内置支持四组的 RMON监控功能(历史、统计、告警及事件)第3章配置端口命令3.1配置一组端口目的Ste p 1con figure termi nal进入配置状态Ste p 2in terface range p ort-ra
3、 nge 进入组配置状态Ste p 3可以使用平时的端口配置命 令进行配置Ste p 4end退回Ste p 5show in terfaces in terface-id 验证配置Ste p 6copy runnin g-c onfig start up-config保存当使用 in terface range命令时有如下的规则:? 有效的组范围:vlan从1到4094fastethernet槽位 /first port - last port,槽位为 0gigabitethernet 槽位 /first port - last port,槽位为 0 port-channel port-ch
4、annel-number - port-channel-number , port-channel 号从 1 到645是有端口号之间需要加入空格,如:in terface ran ge fastethernet 0/1效的,而 in terface range fastethernet 0/1-5是无效的.? in terface range 命令只能配置已经存在的in terface vlan? 所有在同一组的端口必须是相同类别的。见以下例子:Switch# con figure termi nalSwitch(c on fig)#in terface range fastether net
5、0/1 - 5Switch(c on fig-if-ra nge)# *Oct*Oct*Oct*Oct*Oct*Oct6 08:24:35: %LINK-3-UP DOWN: I nterface FastEthernet0/1, cha nged state to up6 08:24:35: %LINK-3-UP DOWN: I nterface FastEthernet0/2, cha nged state to up6 08:24:35: %LINK-3-UP DOWN: I nterface FastEthernet0/3, cha nged state to up6 08:24:35
6、: %LINK-3-UP DOWN: I nterface FastEthernet0/4, cha nged state to up6 08:24:35: %LINK-3-UP DOWN: I nterface FastEthernet0/5, cha nged state to up6 08:24:36: %LINE PROTO-5-UP DOWN: Line p rotoco l on In terface FastEther net0/05,cha nged state to up*Oct 6 08:24:36: %LINE PROTO-5-UP DOWN: Line p rotoco
7、 l on In terface FastEther net0/3, changedstate to up*Oct 6 08:24:36: %LINE PROTO-5-UP DOWN: Line p rotoco l on In terface FastEther net0/4, changedstate to up以下的例子显示使用句号来配置不同类型端口的组Switch# con figure termi nalSwitch(c on fig)#in terface range fastether net0/1 - 3, gigabitether net0/1 - 2Switch(c on
8、fig-if-ra nge)#Switch(c on fig-if-ra nge)#*Octno shutdow n*Oct*Oct*Oct*Oct*Oct6 08:29:28: %LINK-3-UP DOWN: I nterface FastEthernet0/1, cha nged state to up6 08:29:28: %LINK-3-UP DOWN: I nterface FastEthernet0/2, cha nged state to up6 08:29:28: %LINK-3-UP DOWN: I nterface FastEthernet0/3, cha nged st
9、ate to up6 08:29:28: %LINK-3-UP DOWN: I nterface GigabitEthernet0/1, cha nged state to up6 08:29:28: %LINK-3-UP DOWN: I nterface GigabitEthernet0/2, cha nged state to up608:29:29:%LINE PROTO-5-UP DOWNi ne p rotocolon In terfaceGigabitEthernet0/ 1,cha nged state to up*Oct 6 08:29:29: %LINE PROTO-5-UP
10、 DOWN: Line p rotoco l on In terface FastEther net0/ 2,cha nged state to up*Oct 6 08:29:29: %LINE PROTO-5-UP DOWN: Line p rotoco l on In terface FastEther net0/ 3, cha nged state to up2950的所有端口缺省的端口都是二层口,如果此端口已经配置成三层端口的话,则需要用switch port来使其成为二层端口。精选文库321配置端口速率及双工模式Switch(co nfig-if)#end#3.2.1.1可以配置快速
11、以太口的速率为10/100Mb ps 及千兆以太口的速率为Switch(co nfig-if)#speed 1010/100/1000-Mbps; 但对于GBIC端口则不能配置速率及双工模式,有时可以配置nonegotiate,当需要联接不支持自适应的其它千兆端口时命令目的Ste p 1con figure termi nal进入配置状态.Ste p 2in terface in terface-id进入端口配置状态.Ste p 3sp eed 10 | 100 | 1000 | auto | nonegotiate 设置端口速率注1000只工作在千兆口 . GBIC模块只工作在1000 Mb
12、ps下.nonegotiate 只能在这些GBIC上用 1000BASE-SX, -LX, and -ZX GBIC.Ste p 4duplex auto | full | half 设置全双工或半双工.Ste p 5end退出Ste p 6show in terfaces in terface-id显示有关配置情况Ste p 7copy runnin g-c onfig start up-config保存Switch# con figure termi nalSwitch(co nfig)#in terface fastethernetO/3322端口描述命令目的Ste p 1con fig
13、ure termi nal进入配置模式Ste p 2in terfacein terface-id进入要加入描述的端口Ste p 3descri ptio nstri ng加入描述(最多240个 字符).Ste p 4end退回.Ste p 5show in terfacesin terface-iddescri pti onorshow runnin g-c onfig验证.Ste p 6copy runnin g-c onfigstart up-config保存Use the no descri pti onin terface con figurati on comma nd to de
14、lete thedescri pti on.This exa mple shows how to add a descri ptio n on Fast Ethernet in terface 0/4 and to verify the descri ptio n:Switch# config termi nalEn ter con figurati on comma nds, one per line. End with CNTL/Z.Switch(c on fig)#in terface fastethernet0/4Switch(co nfig-if)#descri pti on Con
15、n ects to Market ingSwitch# show in terfaces fastether netO/4 descri pti on精选文库In terface StatusPr otocol Descri pti onFa0/4 updow nConn ects to Marketi ng3.3监控及维护端口331监控端口和控制器的状态主要命令见下表:1Show Comma nds for In terfaces Comma nd目的show in terfaces in terface-id 显示所有端口或某一端口的状态和配 置.show in terfacesin te
16、rface-idstatuserr-disabled 显示一系列端口的状态或错误一关闭 的状态show in terfaces in terface-idswitch port显示二层端口的状态,可以用来决定 此口是否为二层或三层口。show in terfaces in terface-id descri pti on显示端口描述show runnin g-c onfig in terface in terface-id 显示当前配置中的端口配置情况show versi on显示软硬件等情况举例如下:Switch# show in terfaces statusPortNameGiO/1St
17、atusVlanDuplex Sp eed Typeconn ected routeda-fulla-100 10/100/1000BaseTXGi0/2wce server 20.20.2 disabled routedauto auto 10/100/1000Base TXGi0/3ip wcc p web-cache notconnect routedauto auto 10/100/1000Base TXGi0/4notconnectroutedautoauto 10/100/1000Base TXGi0/5notconnectroutedautoauto 10/100/1000Bas
18、e TXGi0/6disabledroutedautoauto 10/100/1000Base TXGi0/7disabledroutedautoauto 10/100/1000Base TXGi0/8disabledroutedauto100 10/100/1000Base TXGi0/9notconnectroutedautoauto 10/100/1000Base TXGi0/10notconnect:routedautoauto 10/100/1000Base TXGi0/11disabledroutedautoauto unknownGi0/12notconnect:routedau
19、toauto unknownSwitch# show in terfaces fastethernet 0/1 switch portName: Fa0/1Switch port: EnabledAdmini strative Mode: static accessOp erati onal Mode: dow nAdmini strative Trunking Encap sulati on: dot1qNegotiati on of Trunking: OffAccess Mode VLAN: 1 (default)Trunking Native Mode VLAN: 1 (default
20、)Trun ki ng VLANs En abled: ALLPruning VLANs En abled: 2-1001Protected: falseUnknown uni cast blocked: disabledUnknown multicast blocked: disabledVoice VLAN: dot1 p (In active)App lia nee trust: 5Switch# show runnin g-c onfig in terface fastether net0/2Buildi ng con figurati on Curre nt con figurati
21、 on : 131 bytesin terface FastEther net0/2switch port mode access switch port protected no ip addressmls qos cos 7mls qos cos override end332刷新、重置端口及计数器Clear命令目的clear coun ters in terface-id清除端口计数器.clear line nu mber | con sole 0 | vty nu mber重置异步串口的硬件逻辑X Note clear cou nters命令只清除用 show in terface所显
22、示的计数,不影响用snmp得到的计数举例如下:Switch# clear cou nters fastethernetO/5Clear show in terface cou nters on this in terface con firm Switch#*Sep 30 08:42:55: %CLEAR-5-COUNTERS: Clear cou nter on in terface FastEther net0/5 by vty1 (171.69.115.10)可使用clear line 命令来清除或重置某一端口或串口,在大部分情况下并不需 要这样做:Switch# clear in te
23、rface fastethernet0/5333关闭和打开端口命令目的Ste P 1con figure termi nal进入配 置状态27Ste p 2in terface vla n vla n-id | fastethernet | gigabitether net in terface-id | p ort-cha nnelport-channel-number 选择要 关闭的 端口Ste p 3shutdow n关闭Ste p 4end退出Ste p 5show runnin g-c onfig验证使用no shutdown命令重新打开端口 .举例如下:Switch# con fi
24、gure termi nalSwitch(c on fig)#in terface fastethernetO/5Switch(co nfig-if)#Switch(co nfig-if)#*Sep 30 08:33:47: %LINK-5-CHANGED: I nterface FastEthernet0/5, chan ged state to a adm ini stratively dow nshutdow nSwitch# con figure termi nalSwitch(c on fig)#in terface fastethernet0/5Switch(co nfig-if)
25、#Switch(co nfig-if)#*Sep 30 08:36:00: %LINK-3-UP DOWN: I nterface FastEthernet0/5, chan ged state to upno shutdow n第4章配置VLAN4.1 理解 VLAN一个VLAN就是一个交换网, 置。任何交换口都可以属于某一 VLAN内的最终用户。每一个必须由路由器或网桥转发(如下图)其逻辑上按功能、项目、应用来分而不必考虑用户的物理位 VLAN, IP包、广播包及组播包均可以发送或广播给在此VLAN均可看成是一个逻辑网络,发往另一VLAN的数据包。由于VLAN被看成是一个逻辑网络,其具有自
26、己的网桥管理信息庫(MIB)并可支持自己的生成树VLAN作为逻辑定义的网络示意图Ciuu r&uWrHoOf 3F|f 2VLANE訪朗GAMJMarking VbWFlWf IIVLAN常常与的数据包可以由VLAN端 口进行转发。IP子网相联系,同一 IP子网属于同一 VLAN在3550上VLAN之间4.2可支持的VLANCatalyst 3550 交换机支持 250 个 VLAN,可以分别是 VTP client, server, 及 transparent modes. VLAN 号可以从 1 到 4094. VLAN 号 1002 到 1005保留给令 牌环及FDDI VLAN. VT
27、P只能学习到普通范围的 VLAN,即从VLAN到1到1005;VLAN号大于1005属于扩展VLAN不存在VLAN数据庫中。 交换机必须配置成 VTP透明模式当需要生成VLAN号从1006到4094.本交换机支持基于每一 VLAN的生成树(PVST),最多支持128个生成树。本交换 机支持ISL及IEEE 802.1Q trunk 二种封装。4.3配置正常范围的 VLANVLAN号1,1002到1005是自动生成的不能被去掉。VLAN号 1到1005的配置被写到文件vian.dat中,可以用showvian命令查看, vian.dat 文件存放在NVRA中.A注意不要手工删除vian.dat文
28、件,可能造成 VLAN的不完整。如要删除vlan需要尘用有关的命令来进行431生成、修改以太网VLAN命令目的Ste p 1con figure termi nal进入配置状态Ste p 2vlanvlan-id输入一个VLAN号,然后进入vlan配置 状态,可以输入一个新的 VLAN号或旧 的来进行修改。Ste p 3name vlan-name(可选)输入一个VLAN名,如果没有配 置VLAN名,缺省的名字是VLAN号前面 用0填满的4位数,如VLAN0004是 VLAN4 的缺省名字Ste p 4mtu mtu-size(可选)改变MTI大小Ste p 5end退出Ste p 6show
29、 vlan name vla n-n ame | id vlan-id 验证Ste p 7copy runnin g-c onfig start up config(可选)保存配置用 no vian name或 no vian mtu 退回到缺省的 vian 配置状态举例如下:Switch# con figure termi nalSwitch(co nfig)# vlan 20Switch(c on fig-vla n)#n ame test20Switch(c on fig-vla n)#end也可以在enable状态下,进行VLAN配置:命令目的1 Ste p 1vla n databa
30、se进入VLAN配置状态Ste p 2vlan vian-idname vlan-name加入VLAN号及VLAN 名Ste p3vlan vlan-idmtu mtu-size(可选)修改MTI大小Ste p 4exit更新VLAN数据庫并退 出Ste p 5show vlan name vlan-name | id vlan-id 验证配置Ste p 6copy runnin g-c onfig start up config保存配置(可选)举例如下:Switch# vlan databaseSwitch(vla n)#vlan 20 name test20Switch(vla n)#ex
31、itAPPLY com pl eted.Exit in g.Switch#432删除 VLAN当删除一个处于 VTP服务器的交换机上删除VLAN时,则此VLAN将在所有相同 VTP的交换机上删除。当在透明模式下删除时,只在当前交换机上删除。A注意 当删除一个VLAN时,原来属于此 VLAN的端口将处于非激活的状态,直到将 出其分配给某一 VLAN。命令目的Ste P 1con figure termi nal进入配置状态Ste p 2no via n vla n-id删除某一 VLAN.Ste p 3end退出Ste p 4show via n brief验证Ste p 5copy runni
32、n g-c onfig start up config保存也可用vlan database 进入VLAN配置状态,用no vian vian-id来删除。433将端口分配给一个VLAN命令目的Ste P 1con figure termi nai进入配置状态Ste p 2in terfacein terface-id进入要分配的端口Ste p 3switch port mode access定义二层口Ste p 4switch port access vianvian-id把端口分配给某一 VLANSte p 5end退出Ste p 6show runnin g-c onfig in terf
33、ace in terface-id验证端口的VLAN号Ste p 7show in terfacesin terface-idswitch port验证端口的管理模式和VLAN情 况Ste p 8copy runnin g-c onfig start up-config保存配置使用 default in terfacein terface-id还原到缺省配置状态。举例如下:Switch# con figure termi nalin terface fastethernetO/1En ter con figurati on comma nds, one per line. End with C
34、NTL/Z.Switch(co nfig)#Switch(co nfig-if)#switch port mode accessSwitch(co nfig-if)#endswitch port access vian 2Switch(co nfig-if)#Switch#4.4 配置 VLAN Trunks1命令目的1 Ste P 1con figure termi nai进入配置状态Ste p 2in terfacein terface-id进入端口配置状态Ste p 3switch port mode dyn amic auto | desirable |配置二层trunk模式。trun
35、k ?dyn amic auto 自动协商是否成为 trunk?dyn amic desirable 把端口设置为trunk如果对方端口是trunk,desirable,或自动模式? trunk 设置端口为强制的 trunk 方式,而不理会对方端口是否为 trunkSte p 4switch port access vlan vla n-id(可选)指定一个缺省VLAN,如果 此端口不再是trunkSte p 5switch port trunk n ative vlan vlan-id指定 802.1Q native VLAN 号Ste p 6end退出Ste p 7show in terf
36、aces in terface-idswitch port显示有关switch port的配置Ste p 8show in terfaces in terface-idtrunk显示有关trunk的配置Ste p 9copy runnin g-c onfig start up-config保存配置举例:Switch# con figure termi nalin terface fastether netO/4En ter con figurati on comma nds, one per line. End with CNTL/Z. Switch(co nfig)#Switch(co nf
37、ig-if)#switch port mode trunkSwitch(co nfig-if)#end441.1定义trunk允许的VLAN缺省情况下trunk允许所有的VLAN通过。可以使用 switch port trunk allowed vlan remove vlan-list来去掉某一 VLAN回到允许所有 置命令.VLAN通 过时,可用 no switch port trunk allowed vlan端口配举例如下:Switch(co nfig)#in terface fastethernetO/1Switch(co nfig-if)#switch port tru nk al
38、lowed vla n remove 2Switch(co nfig-if)#endComma ndPurposeSte p 1con figure termi nal进入配置状态Ste p 2in terfacein terface-id进入端口配置Ste p 3switch port mode trunk配置二层口为trunkSte p 4switch port trunk allowed vla n add |all | except | remove vlan-list(可选)配置trunk 允许的VLAN.使用 add, all , except, remove 关 健字Ste p
39、5end退出Ste p 6show in terfacesin terface-idswitch port验证VLAN配置情况.Ste p 7copy runnin g-c onfig start up-config保存配置441.2 配置 Native VLAN (802.1q )圭寸装802.1q的trunk端口可以接受带有标签和不带标签的数据流,交换机向 native vlan传送不带标签的数据流,缺省情况下native VLAN是1。命令目的1 1Ste P 1con figure termi nai进入配置状态Ste p 2in terfacein terface-id进入配置成80
40、2.1qtrunk的端口Ste p 3switch port trunk n ative via n via n-id配置 native VLAN 号Ste p 4end退出Ste p 5show in terfacesin terface-idswitch port验证native VLAN配置Ste p 6copy runnin g-c onfig start up-config保存配置端口配置命令回到缺省的状态使用 no switch port trunk n ative via n442使用STP实现负载均衡负载均衡可以使用流量分流到其它平行的trunks上去.交换机为了避免环路,ST
41、P通常是阻断所有端口交换机之间只留一条链路。使用负载均衡后,可以把不同VLAN的流量分配到不同的trunk上。可以通过配置STP端 口权值STP路径值来实现负载均衡.如果使用STP端 口权值 来配置那么二条负载均衡的trunk必须联同一交换机上。使用路径值则即可以联 相同的交换机与可以联不同的交换机。4.421使用STP端口权值的负载均衡当同一台交换机的二个口形成环路时, STP端口权值用来决定那个口是en able 的,那个口是阻断的。可以通过配置端口权值来决定二对 trunk各走那些VLAN, 有较高权值的端口(数字较小的)vla n,将处于转发状态,同一个 VLAN在另一 个trunk有
42、较低的权值(数字较大)则将处在阻断状态。 即同一 VLAN只在一个 trunk上发送接受。基于端口权值的负载均衡示意图trunk1将发送和接收VLAN8- 10的数据,trunk2将发送和接收VLAN 6的数据HunksVLAN53-Q(potjrrty 10 VL砂S- lOlp伽lyl绚Comma ndPurposeSte p 1con figure termi nal进入Switch 1配置状态Ste p 2vtp domai n doma in-n ame配置VTP域Ste p 3vtp server将 Switch 1 配置成 VTPserver.Ste p 4end退出Ste p
43、5show vtp status验证VTP的配置Ste p 6show vla n验证VLANSte p 7con figure termi nal进入配置状态Ste p 8in terfacefastethernet 0/1进入F0/1端口Ste p 9switch port mode trunk配置成trunk端口Ste p 10end退出Ste p 11show in terfaces fastethemetO/1 switch port验证VLAN配置Ste p 12在switch1上的F0/2上重复7到11步骤Ste p 13在 Switch 2 的 F0/1,F0/2 上重 复7到
44、11步骤。Ste p 14show via n当trunk已经起来,在switch2 上验证已经学到相关的vian配 置Ste p 15con figure termi nai在Switch 1上进入配置状态Ste p 16in terface fastethernetO/1进入要配置的端口Ste p 17spannin g-tree via n 8 p ort- priority 10将端口权值10赋与VLAN 8.Ste p 18spannin g-tree via n 9 p ort- priority 10将端口权值10赋与VLAN 9.Ste p 19spannin g-tree via n 10 p ort- priority 10将端口权值10赋与VLAN 1
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 湘教版地理八年级下册7.4《长江三角洲区域的内外联系》(第2课时)听课评课记录
- 北师大版道德与法治七年级下册9.1《我们身边的法律》听课评课记录
- 湘教版数学九年级下册听评课记录:2.3 垂径定理
- 小学二年级上册数学口算练习题人教版新课标
- 小学二年级人教版口算及竖式计算寒假练习A4排版
- 小学二年级加减乘法口算练习题
- 苏教版小学二年级数学上册口算题卡
- 超市连锁加盟合同范本
- 储藏室租赁合同范本
- 汽车二级经销商合作协议书范本
- 高标准农田施工组织设计(全)
- 宿舍、办公楼消防应急预案
- 细胞全能性的课件资料
- 职业安全健康工作总结(2篇)
- 14S501-1 球墨铸铁单层井盖及踏步施工
- YB 4022-1991耐火泥浆荷重软化温度试验方法(示差-升温法)
- 水土保持方案中沉沙池的布设技术
- 安全生产技术规范 第25部分:城镇天然气经营企业DB50-T 867.25-2021
- 现代企业管理 (全套完整课件)
- 走进本土项目化设计-读《PBL项目化学习设计》有感
- 高中语文日积月累23
评论
0/150
提交评论