cisco3560--配置资料_第1页
cisco3560--配置资料_第2页
cisco3560--配置资料_第3页
cisco3560--配置资料_第4页
cisco3560--配置资料_第5页
已阅读5页,还剩12页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、CISCO 3560中文配置手册CISCO 3560中文配置手册0第一章 概述11.1概述11.2通过Console口访问设备2第2章命令行方式访问设备22.1命令行模式22.2基本设置命令32.2.1用户名和密码设置命令32.2.2 路由设置命令32.2.3 物理线路设置命令32.2.4显示命令32.3通过Console口进入命令行接口42.4通过Telnet进入命令行接口4第3章接口配置43.1概述43.2二层口配置43.2.1配置端口速率及双工模式53.3配置一组端口53.4配置三层口63.5监控及维护端口73.5.1监控端口和控制器的状态73.5.2刷新、重置端口及计数器83.5.3关

2、闭和打开端口93.6交换机端口镜像配置93.6.1创建一个本地SPAN会话103.7以太通道端口组(Ethernet Port Groups)11第4章配置VLAN114.1简介114.2可支持的VLAN124.3配置正常范围的VLAN124.3.1删除VLAN134.3.2将端口分配给一个VLAN134.4配置VLAN Trunks144.5配置VTP DOMAIN154.6配置VLAN接口地址15第一章 概述1.1概述3560交换机是支持二层、三层功能的交换机,共分为EMI,SMI两个版本。1. Enhanced Multilayer Software Image增强多层软件镜像软件 (E

3、MI)l EMI提供了一组更加丰富的企业级功能,包括基于硬件的高级IP单播和多播路由。l 支持双机热备(HSRP) 、 OSPF路由功能.2. Standard Multilayer Software Image标准多层软件镜像软件(SMI)l SMI功能集包括高级QoS、速率限制、访问控制列表,以及基本的静态和动态(RIP)路由功能3560支持VLANl 到1005 个VLANl 支持VLAN ID从1到4094( IEEE 802.1Q 标准)l 支持ISL及IEEE 802.1Q封装3560安全性l 支持IOS标准的密码保护l 静态MAC地址映射l 标准及扩展的访问列表,对于路由端口支持

4、入出双向的访问列表,对于二层端口支持入的访问列表l 支持基于VLAN的访问列表3560的3层支持(需要多层交换的IOS)l HSRPl IP路由协议l RIPversions 1 and 2l OSPFl IGRP及EIGRPl BGPVersion 4 3560支持以下SFP模块:l 1000BASE-T SFP: 铜线最长100 ml 1000BASE-SX SFP: 光纤最长1804 feet (550 m)l 1000BASE-LX/LH SFP: 光纤最长32,808 feet (6 milesor10 km)l 1000BASE-ZX SFP: 光纤最长328,084 feet (

5、62 milesor100 km)3560管理特性从用户与设备交互的特点来分,访问设备的方式可以分为命令行方式和Web方式。l 命令行方式:包括从Console口登录进行访问和通过Telnet登录进行访问;l Web方式:包括通过HTTP进行的普通Web访问。1.2通过Console口访问设备用户接收到新设备后一般通过Console口第一次登录设备并开始对设备进行配置,过程如下:第一步:建立本地配置环境,只需将计算机(或终端)的串口通过标准RS-232电缆与此Catalyst 3560设备的Console口连接第二步:在计算机上运行终端仿真程序(如WinXP的超级终端等),设置终端通信参数为9

6、600bps、8位数据位、1位停止位、无奇偶校验和无流量控制,如下图(还原默认值即可)。第三步:Catalyst 3560设备上电自检,出现命令行提示符,如:Switch。此时用户已经进入到设备命令行配置接口的用户模式,就可以参考本手册其余章节对设备进行配置。第2章命令行方式访问设备如果用户通过Console口登录,或者通过Telne从设备管理口登录都将进入到设备的命令行接口,对系统的配置和交互都通过命令行的方式进行。2.1命令行模式命令行接口提供的命令行视图和各视图的功能特性、进入各视图的命令等的细则如下表所示。交换机模式模式功能提示符进入命令退出命令非特权模式查看CISCO 设备的简单运行

7、状态Sw开机时自动进入特权模式配置系统参数,升级IOS软件,备份配置文件Sw#在非特权模式下键入ENABLE quit返回非特权模式全局模式CISCO交换机主要配置都是在此模式下进行Sw(config)# 在特权模式下键入configure terminal quit返回特权模式监控模式升级IOS系统软件Sw:开机时摁住面板上的MODE键约5秒2.2基本设置命令2.2.1用户名和密码设置命令任务 命令 全局设置 config terminal (conf t)设置访问用户及密码 Username username password password 设置特权密码 enable secret p

8、assword 设置路由器名 Hostname name 2.2.2 路由设置命令*设置静态路由 ip route destination subnet-mask next-hop *启动IP路由 ip routing *端口设置 nterface type slot/number *设置IP地址 ip address address subnet-mask 启动IPX路由 ipx routing 设置IPX网络 ipx network network *激活端口 no shutdown 2.2.3 物理线路设置命令物理线路设置 line type number 启动登录进程 login lo

9、cal|tacacs server 设置登录密码 Password password 2.2.4显示命令任务 命令 查看版本及引导信息 show version 查看运行设置 show running-config (sh run)查看开机设置 show startup-config 显示端口信息 show interface type slot/number 显示路由信息 show ip route 2.3通过Console口进入命令行接口详细内容请参见“1.2.1通过Console口访问设备”。2.4通过Telnet进入命令行接口Telnet协议在TCP/IP协议族中属于应用层协议,通过网

10、络提供远程登录和虚拟终端功能。CATALYST 3560向用户提供Telnet服务,第一步:在计算机上运行Telnet程序,键入CATALYST 3560设备管理IP地址SwitchenableSwitch#conf tSwitch(config)# interface vlan 1Switch(config-if)#ip address 0 Switch(config-if)#no shutdownSwitch(config-if)#exitSwitch(config)#line vty 0 4Switch(configline)#loginSwit

11、ch(configline)#password cisco上述命令中的IP地址为CATALYST 3560设备IP地址,即vlan1的接口地址第3章接口配置3.1概述Catalyst 3560支持的以太网接口说明请见下表。项目 说明接口类型 FE电接口:符合100Base-TX物理层规范 GE电接口:1000Base-TX物理层规范工作速率 FE电 接口可以选择10Mbit/s、100Mbit/s两种速率 GE电接口可以选择10Mbit/s、100Mbit/s、1000Mbit/s三种速率工作模式 自动协商模式3.2二层口配置3560的所有端口缺省的端口都是二层口,如果此端口已经配置成三层端口

12、的话,则需要用switchport来使其成为二层端口。3.2.1配置端口速率及双工模式1. 可以配置快速以太口的速率为10/100Mbps及千兆以太口的速率为10/100/1000-Mbps; 但对于SFP端口则不能配置速率及双工模式,有时可以配置nonegotiate,当需要联接不支持自适应的其它千兆端口时表3-2 管理口配置 命令 目的 Step 1 configure terminal 进入配置状态.Step 2 interface interface-id 进入端口配置状态.Step 3 speed 10 | 100 | 1000 | auto | nonegotiate 设置端口速率

13、 注:1000 只工作在千兆口. GBIC模块只工作在1000 Mbps下. nonegotiate 只能在这些GBIC上用 1000BASE-SX, -LX, and -ZX GBIC.Step 4 duplex auto | full | half 设置全双工或半双工. Step 5 end 退出Step 6 show interfaces interface-id 显示有关配置情况Step 7 copy running-config startup-config 保存Switch# configure terminalSwitch(config)# interface fastether

14、net0/3Switch(config-if)# speed 10Switch(config-if)# duplex half3.3配置一组端口 命令 目的 Step 1 configure terminal 进入配置状态Step 2 interface range port-range 进入组配置状态Step 3 可以使用平时的端口配置命令进行配置Step 4 end 退回Step 5 show interfaces interface-id 验证配置Step 6 copy running-config startup-config 保存见以下例子:Switch# configure ter

15、minalSwitch(config)# interface range fastethernet0/1 - 5 Switch(config-if-range)# no shutdown Switch(config-if-range)#*Oct6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up*Oct6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to up*Oct6 08:24:35: %LINK-3-UP

16、DOWN: Interface FastEthernet0/3, changed state to up*Oct6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/4, changed state to up*Oct6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/5, changed state to up*Oct6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/05, changed st

17、ate to up*Oct6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up*Oct6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up以下的例子显示使用句号来配置不同类型端口的组:Switch# configure terminalSwitch(config)# interface range fastethern

18、et0/1 - 3, gigabitethernet0/1 - 2 Switch(config-if-range)# no shutdown Switch(config-if-range)#*Oct6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up*Oct6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to up*Oct6 08:29:28: %LINK-3-UPDOWN: Interface FastEth

19、ernet0/3, changed state to up*Oct6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet0/1, changed state to up*Oct6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet0/2, changed state to up*Oct6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/ 1, changed state to up*Oct6

20、 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/ 2, changed state to up*Oct6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/ 3, changed state to up3.4配置三层口Catalyst 3560支持三种类型的三层端口: SVIs: 即interface vlan Note当生成一个interface Vlan时,只有当把某一物理端口分配给它时才能被激活 三

21、层以太网通道口(EtherChannel): :以太通道由被路由端口组成。以太通道端口接口在“配置以太通道”中被描述。 .路由口:路由口是指某一物理端口在端口配置状态下用no switchport命令生成的端口 所有的三层都需要IP地址以实现路由交换配置步骤如下: 命令 目的Step 1 configure terminal 进入配置状态Step 2 interface fastethernet | gigabitethernet interface-id | vlan vlan-id | port-channel port-channel-number 进入端口配置状态Step 3 no s

22、witchport 把物理端口变成三层口Step 4 ip address ip_address subnet_mask 配置IP地址和掩码Step 5 no shutdown 激活端口Step 6 End 退出Step 7 show interfaces interface-idshow ip interface interface-idshow running-config interface interface-id 验证配置Step 8 copy running-config startup-config 保存配置配置举例如下:Switch# configure terminalEnt

23、er configuration commands, one per line.End with CNTL/Z.Switch(config)# interface gigabitethernet0/2Switch(config-if)# no switchportSwitch(config-if)# ip address 1 Switch(config-if)# no shutdownSwitch(config-if)# end 3.5监控及维护端口3.5.1监控端口和控制器的状态主要命令见下表:Show Commands for Interf

24、aces Command 目的 show interfaces interface-id 显示所有端口或某一端口的状态和配置.show interfaces interface-id status err-disabled 显示一系列端口的状态或错误关闭的状态show interfaces interface-id switchport 显示二层端口的状态,可以用来决定此口是否为二/三层口。show interfaces interface-id description 显示端口描述show ip interface interface-id 显示所有或某一端口的IP可用性状态show run

25、ning-config interface interface-id 显示当前配置中的端口配置情况show version 显示软硬件等情况举例如下:Switch# show interfaces statusPort Name Status Vlan DuplexSpeed TypeGi0/1 connected routed a-fulla-100 10/100/1000BaseTXGi0/2 wce server 20.20.2 disabled routed auto auto 10/100/1000Base TXGi0/3 ip wccp web-cachenotconnect ro

26、uted auto auto 10/100/1000Base TXGi0/4 notconnect routed auto auto 10/100/1000Base TXGi0/5 notconnect routed auto auto 10/100/1000Base TXGi0/6 disabled routed auto auto 10/100/1000Base TXGi0/7 disabled routed auto auto 10/100/1000Base TXGi0/8 disabled routed auto 100 10/100/1000Base TXGi0/9 notconne

27、ct routed auto auto 10/100/1000Base TXGi0/10 notconnect routed auto auto 10/100/1000Base TXGi0/11 disabled routed auto auto unknownGi0/12 notconnect routed auto auto unknownSwitch# show interfaces fastethernet 0/1 switchportName: Fa0/1Switchport: EnabledAdministrative Mode: static accessOperational

28、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:

29、 dot1p (Inactive)Appliance trust: 5Switch# show running-config interface fastethernet0/2Building configuration.Current configuration : 131 bytes!interface FastEthernet0/2switchport mode accessswitchport protectedno ip addressmls qos cos 7mls qos cos overrideend3.5.2刷新、重置端口及计数器Clear命令 目的 clear counte

30、rs interface-id 清除端口计数器.clear interface interface-id 重置某一端口的硬件逻辑clear line number | console 0 | vty number 重置异步串口的硬件逻辑Note clear counters 命令只清除用show interface所显示的计数,不影响用snmp得到的计数 举例如下:Switch# clear counters fastethernet0/5 Clear show interface counters on this interface confirm y Switch#*Sep 30 08:4

31、2:55: %CLEAR-5-COUNTERS: Clear counter on interface FastEthernet0/5by vty1 (0)可使用clear interface 或 clear line 命令来清除或重置某一端口或串口,在大部分情况下并不需要这样做:Switch# clear interface fastethernet0/5 3.5.3关闭和打开端口 命令 目的 Step 1 configure terminal 进入配置状态Step 2 interface vlan vlan-id | fastethernet | gigabitet

32、hernet interface-id | port-channel port-channel-number 选择要关闭的端口Step 3 Shutdown 关闭Step 4 End 退出Step 5 show running-config 验证使用 no shutdown 命令重新打开端口.举例如下:Switch# configure terminalSwitch(config)# interface fastethernet0/5 Switch(config-if)# shutdown Switch(config-if)#*Sep 30 08:33:47: %LINK-5-CHANGED:

33、 Interface FastEthernet0/5, changed state to a administratively downSwitch# configure terminalSwitch(config)# interface fastethernet0/5 Switch(config-if)# no shutdown Switch(config-if)#*Sep 30 08:36:00: %LINK-3-UPDOWN: Interface FastEthernet0/5, changed state to up3.6交换机端口镜像配置端口镜像的数据流程基于端口的镜像是把被镜像端口

34、的进出数据报文完全拷贝一份到镜像端口,这样来进行流量观测或者故障定位。Figure 27-1 Example of Local SPAN Configuration on a Single Switch 3.6.1创建一个本地SPAN会话 Beginning in privileged EXEC mode, follow these steps to create a SPAN session and specify the source (monitored) portsorVLANs and the destination (monitoring) ports: 命令 目的Step 1 c

35、onfigure terminal Enter global configuration mode. Step 2 no monitor session session_number | all | local | remote Remove any existing SPAN configuration for the session. For session_number, the range is 1 to 66. Specify all to remove all SPAN sessions, local to remove all local sessions,orremote to

36、 remove all remote SPAN sessions. Step 3 monitor session session_number source interface interface-id | vlan vlan-id , | - both | rx | tx Specify the SPAN session and the source port (monitored port). For session_number, the range is 1 to 66. For interface-id, specify the source portorsource VLAN to

37、 monitor. For source interface-id, specify the source port to monitor. Valid interfaces include physical interfaces and port-channel logical interfaces (port-channel port-channel-number). Valid port-channel numbers are 1 to 48. For vlan-id, specify the source VLAN to monitor. The range is 1 to 4094

38、(excluding the RSPAN VLAN). NoteA single session can include multiple sources (portsorVLANs), defined in a series of commands, but you cannot combine source ports and source VLANs in one session. (Optional) , | - Specify a seriesorrange of interfaces. Enter a space before and after the comma; enter

39、a space before and after the hyphen. (Optional) Specify the direction of traffic to monitor. If you do not specify a traffic direction, the SPAN monitors both sent and received traffic. bothMonitor both received and sent traffic. This is the default. rxMonitor received traffic. txMonitor sent traffi

40、c. NoteYou can use the monitor session session_number source command multiple times to configure multiple source ports. Step 4 monitor session session_number destination interface interface-id , | - encapsulation replicate Specify the SPAN session and the destination port (monitoring port). For sess

41、ion_number, specify the session number entered in step 3. NoteFor local SPAN, you must use the same session number for the source and destination interfaces. For interface-id, specify the destination port. The destination interface must be a physical port; it cannot be an EtherChannel, and it cannot

42、 be a VLAN. (Optional) , | - Specify a seriesorrange of interfaces. Enter a space before and after the comma; enter a space before and after the hyphen. (Optional) Enter encapsulation replicate to specify that the destination interface replicates the source interface encapsulation method. If not sel

43、ected, the default is to send packets in native form (untagged). NoteYou can use monitor session session_number destination command multiple times to configure multiple destination ports. Step 5 end 返回特权模式 Step 6 show monitor session session_number show running-config 验证Step 7 copy running-config st

44、artup-config (Optional) Save the configuration in the configuration file. 举例:通过交换机的第2号口监控第1号口的流量Switch(config)# monitor session 1 source interface gigabitethernet0/1Switch(config)# monitor session 1 destination interface gigabitethernet0/2 Switch(config)# end删除一个span会话: Switch(config)# no monitor se

45、ssion 1 source interface gigabitethernet0/1Switch(config)# end3.7以太通道端口组(Ethernet Port Groups)以太通道端口组提供把多个交换机端口像一个交换端口对待。这些端口组为交换机之间或交换机和服务器之间提供一条单独的高带宽连接的逻辑端口。以太通道在一个通道中提供穿越链路的负载平衡。如果以太通道中的一个链路失效,流量会自动从失效链路转移到被用链路。你可以把多干道端口加到一个逻辑的干道端口;把多访问端口加到一个逻辑访问端口;或者多隧道端口加到一个逻辑的隧道接口。绝大多数的协议能够在单独或是集合的接口上运行,并且不会意

46、识到在端口组中的物理端口。除了DTP、CDP和PAgP,这些协议只能在物理接口上运行。 当你配置一个以太通道,你创建一个端口通道逻辑接口,并且指派一个接口给以太通道。对于三层接口,你人工创建该逻辑接口:Figure 33-1 Typical EtherChannel Configuration 举例:把交换机A,B的1,2号口添加到同一个组5里面SwitchA# configure terminal SwitchA (config)# interface range gigabitethernet0/1 -2 SwitchA (config-if-range)# switchport mode

47、 accessSwitchA (config-if-range)# switchport access vlan 10SwitchA (config-if-range)# channel-group 5 mode ONSwitch(config-if-range)# end SwitchB# configure terminal SwitchB(config)# interface range gigabitethernet0/1 -2 SwitchB(config-if-range)# switchport mode accessSwitchB(config-if-range)# switc

48、hport access vlan 10SwitchB(config-if-range)# channel-group 5 mode ONSwitchB(config-if-range)# end 第4章配置VLAN4.1简介VLAN(Virtual Local Area Network),是一种通过将局域网内的设备逻辑地而不是物理地划分成一个个网段从而实现虚拟工作组的技术。IEEE于1999年颁布了用以标准化VLAN实现方案的IEEE 802.1Q协议标准草案。 VLAN技术允许网络管理者将一个物理的LAN逻辑地划分成不同的广播域(或称虚拟LAN,即VLAN),每一个VLAN都包含一组有着相

49、同需求的计算机,由于VLAN是逻辑地而不是物理地划分,所以同一个VLAN内的各个计算机无须被放置在同一个物理空间里,即这些计算机不一定属于同一个物理LAN网段。 VLAN的优势在于VLAN内部的广播和单播流量不会被转发到其它VLAN中,从而有助于控制网络流量、减少设备投资、简化网络管理、提高网络安全性。4.2可支持的VLANCatalyst 3560交换机支持1005个 VLAN,可以分别是VTPclient, server, 及 transparent modes. VLAN号可以从1到4094. VLAN号1002到1005保留给令牌环及FDDI VLAN. VTP只能学习到普通范围的VLAN, 即从VLAN到1到1005; VLAN号大于1005属于扩展VLAN,不存在VLAN数据庫中。 交

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论