您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 冶金工业 > 思科交换机配置维护手册
思科交换机配置维护手册目录一、端口配置1.1配置一组端口命令目的Step1configureterminal进入配置状态Step2interfacerange{port-range}进入组配置状态Step3可以使用平时的端口配置命令进行配置Step4end退回Step5showinterfaces[interface-id]验证配置Step6copyrunning-configstartup-config保存当使用interfacerange命令时有如下的规则:有效的组范围:ovlan从1到4094ofastethernet槽位/{firstport}-{lastport},槽位为0ogigabitethernet槽位/{firstport}-{lastport},槽位为0oport-channelport-channel-number-port-channel-number,port-channel号从1到64端口号之间需要加入空格,如:interfacerangefastethernet0/1–5是有效的,而interfacerangefastethernet0/1-5是无效的.interfacerange命令只能配置已经存在的interfacevlan所有在同一组的端口必须是相同类别的。见以下例子:Switch#configureterminalSwitch(config)#interfacerangefastethernet0/1-5Switch(config-if-range)#noshutdown以下的例子显示使用句号来配置不同类型端口的组:Switch#configureterminalSwitch(config)#interfacerangefastethernet0/1-3,gigabitethernet0/1-2Switch(config-if-range)#noshutdown1.2配置二层端口1.2.1配置端口速率及双工模式命令目的Step1configureterminal进入配置状态.Step2interfaceinterface-id进入端口配置状态.Step3speed{10|100|1000|auto|nonegotiate}设置端口速率注:1000只工作在千兆口.GBIC模块只工作在1000Mbps下.nonegotiate只能在这些GBIC上用1000BASE-SX,-LX,and-ZXGBIC.Step4duplex{auto|full|half}设置全双工或半双工.Step5end退出Step6showinterfacesinterface-id显示有关配置情况Step7copyrunning-configstartup-config保存Switch#configureterminalSwitch(config)#interfacefastethernet0/3Switch(config-if)#speed10Switch(config-if)#duplexhalf1.2.2端口描述命令目的Step1configureterminal进入配置模式Step2interfaceinterface-id进入要加入描述的端口Step3descriptionstring加入描述(最多240个字符).Step4end退回.Step5showinterfacesinterface-iddescriptionorshowrunning-config验证.Step6copyrunning-configstartup-config保存1.2.3配置三层口Catalyst3750支持三种类型的三层端口:SVIs:即interfacevlan三层以太网通道口(EtherChannel).路由口:路由口是指某一物理端口在端口配置状态下用noswitchport命令生成的端口所有的三层都需要IP地址以实现路由交换配置步骤如下:命令目的Step1configureterminal进入配置状态Step2interface{{fastethernet|gigabitethernet}interface-id}|{vlanvlan-id}|{port-channelport-channel-number}进入端口配置状态Step3noswitchport把物理端口变成三层口Step4ipaddressip_addresssubnet_mask配置IP地址和掩码Step5noshutdown激活端口Step6end退出Step7showinterfaces[interface-id]showipinterface[interface-id]showrunning-configinterface[interface-id]验证配置Step8copyrunning-configstartup-config保存配置配置举例如下:Switch#configureterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.Switch(config)#interfacegigabitethernet0/2Switch(config-if)#noswitchportSwitch(config-if)#ipaddress192.20.135.21255.255.255.0Switch(config-if)#noshutdownSwitch(config-if)#endshowipinterface命令:Switch#showipinterfacegigabitethernet0/2GigabitEthernet0/2isup,lineprotocolisupInternetaddressis192.20.135.21/24Broadcastaddressis255.255.255.255AddressdeterminedbysetupcommandMTUis1500bytesHelperaddressisnotsetDirectedbroadcastforwardingisdisabledoutputtruncated1.3监控及维护端口1.3.1监控端口和控制器的状态主要命令见下表:ShowCommandsforInterfacesCommand目的showinterfaces[interface-id]显示所有端口或某一端口的状态和配置.showinterfacesinterface-idstatus[err-disabled]显示一系列端口的状态或错误-关闭的状态showinterfaces[interface-id]switchport显示二层端口的状态,可以用来决定此口是否为二层或三层口。showinterfaces[interface-id]description显示端口描述showipinterface[interface-id]显示所有或某一端口的IP可用性状态showrunning-configinterface[interface-id]显示当前配置中的端口配置情况showversion显示软硬件等情况举例如下:Switch#showinterfacesstatusPortNameStatusVlanDuplexSpeedTypeGi0/1connectedrouteda-fulla-10010/100/1000BaseTXGi0/2wceserver20.20.2disabledroutedautoauto10/100/1000BaseTXGi0/3ipwccpweb-cachenotconnectroutedautoauto10/100/1000BaseTXGi0/4notconnectroutedautoauto10/100/1000BaseTXGi0/5notconnectroutedautoauto10/100/1000BaseTXGi0/6disabledroutedautoauto10/100/1000BaseTXGi0/7disabledroutedautoauto10/100/1000BaseTXGi0/8disabledroutedauto10010/100/1000BaseTXGi0/9notconnectroutedautoauto10/100/1000BaseTXGi0/10notconnectroutedautoauto10/100/1000BaseTXGi0/11disabledroutedautoautounknownGi0/12notconnectroutedautoautounknownSwitch#showinterfacesfastethernet0/1switchportName:Fa0/1Switchport:EnabledAdministrativeMode:staticaccessOperationalMode:downAdministrativeTrunkingEncapsulation:dot1qNegotiationofTrunking:OffAccessModeVLAN:1(default)TrunkingNativeModeVLAN:1(default)TrunkingVLANsEnabled:ALLPruningVLANsEnabled:2-1001Protected:falseUnknownunicastblocked:disabledUnknownmulticastblocked:disabledVoiceVLAN:dot1p(Inactive)Appliancetrust:5Switch#showrunning-configinterfacefastethernet0/2Buildingconfiguration...Currentconfiguration:131bytes!interfaceFastEthernet0/2switchportmodeaccessswitchportprotectednoipaddressmlsqoscos7mlsqoscosoverrideend1.3.2刷新、重置端口及计数器Clear命令目的clearcounters[interface-id]清除端口计数器.clearinterfaceinterface-id重置某一端口的硬件逻辑clearline[number|console0|vtynumber]重置异步串口的硬件逻辑Noteclearcounters命令只清除用showinterface所显示的计数,不影响用snmp得到的计数举例如下:Switch#clearcountersfastethernet0/5Clearshowinterfacecountersonthisinterface[confirm]ySwitch#*Sep3008:42:55:%CLEAR-5-COUNTERS:ClearcounteroninterfaceFastEthernet0/5byvty1(171.69.115.10)可使用clearinterface或clearline命令来清除或重置某一端口或串口,在大部分情况下并不需要这样做:Switch#clearinterfacefastethernet0/51.3.3关闭和打开端口命令目的Step1configureterminal进入配置状态Step2interface{vlanvlan-id}|{{fastethernet|gigabitethernet}interface-id}|{port-channelport-channel-number}选择要关闭的端口Step3shutdown关闭Step4end退出Step5showrunning-config验证使用noshutdown命令重新打开端口.举例如下:Switch#configureterminalSwitch(conf
本文标题:思科交换机配置维护手册
链接地址:https://www.777doc.com/doc-2437238 .html