Catalyst3560交换机中文简要配置手册目_第1页
Catalyst3560交换机中文简要配置手册目_第2页
Catalyst3560交换机中文简要配置手册目_第3页
Catalyst3560交换机中文简要配置手册目_第4页
Catalyst3560交换机中文简要配置手册目_第5页
已阅读5页,还剩15页未读 继续免费阅读

下载本文档

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

文档简介

1、Catalyst 3560 交换机中文简要配置手册目录第1章 概述 1-11.1 概述 1-11.2 初次访问设备 1-21.2.1 通过Console口访问设备 1-2第2章 命令行方式访问设备 2-12.1.1 命令行模式 2-12.1.2 基本设置命令 2-12.2 通过Console口进入命令行接口 2-22.3 通过Telnet进入命令行接口 2-2第3章 接口配置 3-13.1 概述 3-13.2 二层口配置 3-13.2.1 配置端口速率及双工模式 3-13.3 配置一组端口 3-23.4 配置三层口 3-33.5 监控及维护端口 3-53.5.1 监控端口和控制器的状态 3-5

2、3.5.2 刷新、重置端口及计数器 3-73.5.3 关闭和打开端口 3-83.6 交换机端口镜像配置 3-93.6.1 创建一个本地SPAN会话 3-103.7 以太通道端口组(Ethernet Port Groups) 3-11第4章 配置VLAN 4-124.1 简介 4-124.2 可支持的VLAN 4-124.3 配置正常范围的VLAN 4-124.3.1 删除VLAN 4-144.3.2 将端口分配给一个VLAN 4-154.4 配置VLAN Trunks 4-164.5 配置VTP DOMAIN 4-184.6 配置VLAN接口地址 4-18第5章 交换机HSRP配置 5-1第6

3、章 路由协议配置 6-36.1.1 静态路由 6-36.1.2 RIP路由 6-36.1.3 OSPF路由 6-5第1章概述1.1概述3560交换机是支持二层、三层功能的交换机,共分为EMI,SMI两个版本Enhanced Multilayer Software Image增强多层软件镜像软件 (EMI) EMI提供了一组更加丰富的企业级功能,包括基于硬件的高级IP单播和多播路由。 支持双机热备(HSRP),OSPF路由功能.Standard Multilayer Software Image标准多层软件镜像软件(SMI) SMI功能集包括高级QoS、速率限制、访问控制列表(ACL),以及基本

4、的静态和路由信息协议(RIP)路由功能支持VLAN 到1005 个VLAN 支持VLAN ID从1到4094( IEEE 802.1Q 标准) 支持ISL及IEEE 802.1Q封装安全 支持IOS标准的密码保护 静态MAC地址映射 标准及扩展的访问列表支持,对于路由端口支持入出双向的访问列表,对于二层端口支持入的访问列表 支持基于VLAN的访问列表3层支持(需要多层交换的IOS) HSRP IP路由协议o RIPversions 1 and 2o OSPFo IGRP及EIGRPo BGPVersion 4 支持以下SFP模块: 1000BASE-T SFP: 铜线最长100 m 1000B

5、ASE-SX SFP: 光纤最长1804 feet (550 m) 1000BASE-LX/LH SFP: 光纤最长32,808 feet (6 miles or 10 km) 1000BASE-ZX SFP: 光纤最长328,084 feet (62 miles or 100 km)管理从用户与设备交互的特点来分,访问设备的方式可以分为命令行方式和Web方式。l 命令行方式:包括从Console口登录进行访问和通过Telnet登录进行访问;l Web方式:包括通过HTTP进行的普通Web访问。1.2初次访问设备1.2.1通过Console口访问设备用户接收到除去包装的新设备后一般通过Cons

6、ole口第一次登录设备并开始对设备进行配置,过程如下:第一步:建立本地配置环境,只需将计算机(或终端)的串口通过标准RS-232电缆与此Catalyst 3560设备的Console口连接第二步:在计算机上运行终端仿真程序(如WinXP的超级终端等),设置终端通信参数为9600bps、8位数据位、1位停止位、无奇偶校验和无流量控制,如图1-1至图1-3所示。图1-1 新建连接图1-2 连接端口设置图1-3 端口通信参数设置第四步:Catalyst 3560设备上电自检,出现命令行提示符,如:Switch。此时用户已经进入到设备命令行配置接口的用户模式,从这里开始就可以参考本手册其余章节对设备进

7、行配置。第2章命令行方式访问设备如果用户通过Console口登录,或者通过Telne从设备管理口登录都将进入到设备的命令行接口,对系统的配置和交互都通过命令行的方式进行。2.1.1命令行模式命令行接口提供的命令行视图和各视图的功能特性、进入各视图的命令等的细则如表2-1所示。表2-1 命令视图功能特性列表模式 功能 提示符 进入命令 退出命令非特权模式 查看CISCO 设备的简单运行状态 Switch 开机时自动进入 特权模式 配置系统参数,升级IOS软件,备份配置文件 Switch# 在非特权模式下键入ENABLE quit返回非特权模式全局模式 CISCO交换机大部分配置都是在这个模式下进

8、行 Switch(config)# 在特权模式下键入configure terminal quit返回特权模式监控模式 升级IOS系统软件 Switch: 开机时摁住面板上的MODE键约5秒钟 2.1.2基本设置命令基本设置命令任务 命令 全局设置 config terminal 设置访问用户及密码 Username username password password 设置特权密码 enable secret password 设置路由器名 Hostname name 设置静态路由 ip route destination subnet-mask next-hop 启动IP路由 ip rou

9、ting 启动IPX路由 ipx routing 端口设置 interface type slot/number 设置IP地址 ip address address subnet-mask 设置IPX网络 ipx network network 激活端口 no shutdown 物理线路设置 line type number 启动登录进程 login local|tacacs server 设置登录密码 Password password 显示命令任务 命令 查看版本及引导信息 show version 查看运行设置 show running-config 查看开机设置 show startu

10、p-config 显示端口信息 show interface type slot/number 显示路由信息 show ip route 2.2通过Console口进入命令行接口详细内容请参见“1.2.1通过Console口访问设备”。2.3通过Telnet进入命令行接口Telnet协议在TCP/IP协议族中属于应用层协议,通过网络提供远程登录和虚拟终端功能。CATALYST 3560向用户提供Telnet服务,第一步:在计算机上运行Telnet程序,键入CATALYST 3560设备管理IP地址SwitchenableSwitch#conf tSwitch(config)# interfac

11、e vlan 1Switch(config-if)#ip address 0 Switch(config-if)#no shutdownSwitch(config-if)#exitSwitch(config)#line vty 0 4Switch(configline)#loginSwitch(configline)#password cisco如图2-1所示。图2-1 与CATALYST 3560建立Telnet连接&说明:图2-1中的IP地址为CATALYST 3560设备IP地址,即vlan1的接口地址第3章接口配置3.1概述Catalyst 3

12、560支持的以太网接口说明请见下表。表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的所有端口缺省的端口都是二层口,如果此端口已经配置成三层端口的话,则需要用switchport来使其成为二层端口。3.2.1配置端口速率及双工模式1. 可以配置快速以太口的速率为10/100Mbps及千

13、兆以太口的速率为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 设置端口速率 注 1000 只工作在千兆口. GBIC模块只工作在1000 Mbps下. nonegotiate 只能在这些GBIC上用 1000BASE

14、-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 fastethernet0/3Switch(config-if)# speed 10Switch(config-if)# duplex half3.3配置一组端

15、口 命令 目的 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 terminalSwitch(config)# interface range fastethernet0/1 - 5 Switch(config-

16、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-UPDOWN: Interface FastEthernet0/3, changed state to up*Oct6 08:24:35: %LI

17、NK-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 state to up*Oct6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interfac

18、e 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 fastethernet0/1 - 3, gigabitethernet0/1 - 2 Switch(config-if-range)# no shutdown

19、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 FastEthernet0/3, changed state to up*Oct6 08:29:28: %LINK-3-UPDOWN: Interface

20、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 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet

21、0/ 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时,只有当把某一物理端口分配给它时才能被激活 三层以太网通道口(EtherChannel): :以太通道由被路由端口组成。以太通道端口接口在“配置以太通道”中被描述。 .路由口:路由口是指某

22、一物理端口在端口配置状态下用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 switchport 把物理端口变成三层口Step 4 ip address ip_address subnet_mask 配置IP地址和掩码S

23、tep 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 terminalEnter configuration commands, one per line.End with CNTL/Z.Switch(config)#

24、 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 Interfaces Command 目的 show interfaces interface-id 显示所有端口或某一端口的状态和配置.show int

25、erfaces interface-id status err-disabled 显示一系列端口的状态或错误关闭的状态show interfaces interface-id switchport 显示二层端口的状态,可以用来决定此口是否为二层或三层口。show interfaces interface-id description 显示端口描述show ip interface interface-id 显示所有或某一端口的IP可用性状态show running-config interface interface-id 显示当前配置中的端口配置情况show version 显示软硬件等情况

26、举例如下: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 routed auto auto 10/100/1000Base TXGi0/4 notconnect routed auto auto 10/

27、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 notconnect routed auto auto 10/100/1000Base TXGi0/10 notconnect routed auto au

28、to 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 Mode: downAdministrative Trunking Encapsulation: dot1qNegotiation of T

29、runking: 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 interfa

30、ce 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 counters interface-id 清除端口计数器.clear interface interface-id 重置某一端口的硬件逻辑clear

31、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:42:55: %CLEAR-5-COUNTERS: Clear counter on interface FastEthernet0/5by

32、 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 | gigabitethernet interface-id | port-channel port-channel-number 选择要关闭的端口Step 3

33、 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: Interface FastEthernet0/5, changed state to a administratively downS

34、witch# 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交换机端口镜像配置端口镜像的数据流程基于端口的镜像是把被镜像端口的进出数据报文完全拷贝一份到镜像端口,这样来进行流量观测或者故障定位。Figure 27-1 Example of Local SPAN

35、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) ports or VLANs and the destination (monitoring) ports: Command Purpose Step 1 configure terminal Enter global configuration mode. Step

36、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, or remote to remove all remote SPAN sessions. Step 3 monitor sessi

37、on 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 port or source VLAN to monitor. For source interface-id, specify the sourc

38、e 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 (excluding the RSPAN VLAN). NoteA single session can

39、 include multiple sources (ports or VLANs), defined in a series of commands, but you cannot combine source ports and source VLANs in one session. (Optional) , | - Specify a series or range of interfaces. Enter a space before and after the comma; enter a space before and after the hyphen. (Optional)

40、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 traffic. NoteYou can use the monitor session session_n

41、umber 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 session_number, specify the session number entered i

42、n 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 be a VLAN. (Optional) , | - Specify a series or

43、 range 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 selected, the default is to send packets in nativ

44、e form (untagged). NoteYou can use monitor session session_number destination command multiple times to configure multiple destination ports. Step 5 end Return to privileged EXEC mode. Step 6 show monitor session session_number show running-config Verify the configuration. Step 7 copy running-config

45、 startup-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

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

47、不会意识到在端口组中的物理端口。除了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 mo

48、de 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)# swi

49、tchport 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都包含一组有着相同需求的计算机,由于VLAN是逻辑地而不是物理地划分,所以同一个VLAN内的各个计算机无须被放置在同一个物理空间里,即这些计算机不一定属于同一个物理LAN网段。VLAN的优势在于VLAN内部的广播和单播流量不会被转发到其它VLAN中,从而有助于控制网络流量、减少设备投资、简化网络管理、提高网络安全性。4.2可支持的VLANCatalyst 3560交换机支持1005个 VLAN,可以分别是VTPcli

温馨提示

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

评论

0/150

提交评论