1 / 15
文档名称:

思科交换机配置命令大全.pdf

格式:pdf   大小:1,642KB   页数:15页
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

思科交换机配置命令大全.pdf

上传人:青山代下 2024/7/2 文件大小:1.60 MB

下载得到文件列表

思科交换机配置命令大全.pdf

相关文档

文档介绍

文档介绍:该【思科交换机配置命令大全 】是由【青山代下】上传分享,文档一共【15】页,该文档可以免费在线阅读,需要了解更多关于【思科交换机配置命令大全 】的内容,可以使用淘豆网的站内搜索功能,选择自己适合的文档,以下文字是截取该文章内的部分文字,如需要获得完整电子版,请下载此文档到您的设备,方便您编辑和打印。:..思科交换机配置命令大全switch>用户模式1:进入特权模式enableswitch>enableswitch#2:进入全局配置模式configureterminalswitch>enableswitch#configureterminalswitch(conf)#3:交换机命名hostnameaptech2950以aptech2950为例switch>enableswitch#configureterminalswitch(conf)#hostnameaptch-2950aptech2950(conf)#4:配置使能口令enablepasswordcisco以cisco为例switch>enableswitch#configureterminalswitch(conf)#hostnameaptch2950aptech2950(conf)#enablepasswordcisco5:配置使能密码enablesecretciscolab以cicsolab为例switch>enableswitch#configureterminalswitch(conf)#hostnameaptch2950aptech2950(conf)#enablesecretciscolab6:设置虚拟局域网vlan1interfacevlan1switch>enableswitch#configureterminalswitch(conf)#hostnameaptch2950aptech2950(conf)#interfacevlan1aptech2950(conf-if)#noshut是配置处于运行中aptech2950(conf-if)#exit7:0/17以17端口为例switch>enableswitch#configureterminalswitch(conf)#hostnameaptch2950aptech2950(conf)#0/17aptech2950(conf-if)#8:查看命令showswitch>enableswitch#showversion察看系统中的所有版本信息showinterfacevlan1查看交换机有关ip协议的配置信息showrunning-configure查看交换机当前起作用的配置信息0/1察看交换机1接口具体配置和统计信息精心整理:..showmac-address-table查看mac地址表showmac-address-tableaging-time查看mac地址表自动老化时间9:交换机恢复出厂默认恢复命令switch>enableswitch#erasestartup-configureswitch#reload10:双工模式设置switch>enableswitch#configureterminalswitch2950(conf)#hostnameaptch-2950aptech2950(conf)#0/17以17端口为例aptech2950(conf-if)#duplexfull/half/auto有full,half,auto三个可选项11:cdp相关命令switch>enableswitch#showcdp查看设备的cdp全局配置信息0/17查看17端口的cdp配置信息showcdptraffic查看有关cdp包的统计信息showcdpnerghbors列出与设备相连的cisco设备12:csico2950的密码恢复拔下交换机电源线。用手按着交换机的MODE键,插上电源线在switch:后执行flash_ini命令:switch:flash_ini查看flash中的文件:switch:dirflash:把“”文件改名为“”:switch:renameflash:::switch:boot交换机进入是否进入配置的对话,执行no:进入特权模式察看flash里的文件:showflash:把“”文件改名为“”:switch:renameflash::“”拷入系统的“running-configure”:copyflash::running-configure把配置模式重新设置密码存盘,密码恢复成功。13:远程登录设置:switch>enswitch#configureterminalswitch(conf)#hostnameaptech-2950aptech2950(conf)#enablepasswordcisco以cisco为特权模式密码aptech2950(conf)#0/远程登录端口aptech2950(conf-if)#noshutaptech2950(conf-if)#exitaptech2950(conf)linevty04设置0-远程登陆aptech2950(conf-line)#loginaptech2950(conf-line)#passwordedge以edge为远程登录的用户密码主机设置:运行:远程登录界面password:edge精心整理:..aptech2950>enpassword:ciscoaptech#14:交换机配置的重新载入和保存设置完成交换机的配置后:aptech2950(conf)#reload是否保存(y/n)y:保存设置信息n::switch(config)#hostnamehostname在基于CLI的交换机上设置主机名/系统名:switch(enable)setsystemnamename-:switch(config)#enablepasswordlevel1password在基于CLI的交换机上设置登录口令:switch(enable)setpasswordswitch(enable):switch(config)#interfacevlan1switch(config-if)#ipaddressip-maskswitch(config-if)#ipdefault-gatewayip-address在基于CLI的交换机上设置远程访问:switch(enable)setinterfacesc0ip-maskbroadcast-addressswitch(enable)setinterfacesc0vlanswitch(enable):switch(config-if)#cdpenableswitch(config-if)#nocdpenable为了查看Cisco邻接设备的CDP通告信息:switch#showcdpinterface[typemodle/port]switch#showcdpneighbors[typemodule/port][detail]在基于CLI的交换机上启用和浏览CDP信息:switch(enable)setcdp{enable|disable}module/port为了查看Cisco邻接设备的CDP通告信息:switch(enable)showcdpneighbors[module/port][vlan|duplex|capabilities|detail]:switch(config-if)#descriptiondescription-string基于CLI的交换机的端口描述:switch(enable)setportnamemodule/numberdescription-:switch(config-if)#speed{10|100|auto}在基于CLI的交换机上设置端口速度:switch(enable)setportspeedmoudle/number{10|100|auto}switch(enable)setportspeedmoudle/number{4|16|auto}:switch(config-if)#duplex{auto|full|half}在基于CLI的交换机上设置以太网的链路模式:精心整理:..switch(enable)setportduplexmodule/number{full|half}:switch#vlandatabaseswitch(vlan)#vlanvlan-numnamevlaswitch(vlan)#exitswitch#configureteriminalswitch(config)#interfaceinterfacemodule/numberswitch(config-if)#essswitch(config-if)#essvlanvlan-numswitch(config-if)#end在基于CLI的交换机上配置静态VLAN:switch(enable)setvlanvlan-num[namename]switch(enable)setvlanvlan-nummod-num/port-:switch(config)#interfaceinterfacemod/portswitch(config-if)#switchportmodetrunkswitch(config-if)#switchporttrunkencapsulation{isl|dotlq}switch(config-if)#switchporttrunkallowedvlanremovevlan-listswitch(config-if)#switchporttrunkallowedvlanaddvlan-list在基于CLI的交换机上配置VLAN中继线:switch(enable)settrunkmodule/port[on|off|desirable|auto|nonegotiate]Vlan-range[isl|dotlq|dotl0|lane|negotiate]:switch#vlandatabaseswitch(vlan)#vtpdomaindomain-name在基于CLI的交换机上配置VTP管理域:switch(enable)setvtp[domaindomain-name]:switch#vlandatabaseswitch(vlan)#vtpdomaindomain-nameswitch(vlan)#vtp{sever|cilent|transparent}switch(vlan)#vtppasswordpassword在基于CLI的交换机上配置VTP模式:switch(enable)setvtp[domaindomain-name][mode{sever|cilent|transparent}][passwordpassword]:switch#vlandatabaseswitch(vlan)#vtpv2-mode在基于CLI的交换机上配置VTP版本:switch(enable):switch#vlandatabaseswitch(vlan)#vtppruning在基于CLI的交换机上启动VTP剪裁:switch(enable):精心整理:..switch(config-if)#portgroupgroup-number[distribution{source|destination}]在基于CLI的交换机上配置以太信道:switch(enable)setportchannelmoudle/port-rangemode{on|off|desirable|auto}:switch(config-if)#spanning-tree[vlanvlan-list]costcost在基于CLI的交换机上调整根路径成本:switch(enable)setspantreeportcostmoudle/portcostswitch(enable)setspantreeportvlancostmoudle/port[costcost][vlan-list]:switch(config-if)#spanning-tree[vlanvlan-list]port-priorityport-priority在基于CLI的交换机上调整端口ID:switch(enable)setspantreeportpri{mldule/port}priorityswitch(enable)setspantreeportvlanpri{module/port}priority[vlans]:switch(config)#spanning-tree[vlanvlan-list]hello-timesecondsswitch(config)#spanning-tree[vlanvlan-list]forward-timeseconds`switch(config)#spanning-tree[vlanvlan-list]max-ageseconds在基于CLI的交换机上修改STP时钟:switch(enable)setspantreehellointerval[vlan]switch(enable)setspantreefwddelaydelay[vlan]switch(enable)setspantreemaxageagingtiame[vlan]:switch(config-if)#spanning-treeportfast在基于CLI的交换机端口上启用或禁用PortFast特征:switch(enable)setspantreeportfast{module/port}{enable|disable}:switch(config)#spanning-treeuplinkfast[max-update-ratepkts-per-second]在基于CLI的交换机端口上启用或禁用UplinkFast特征:switch(enable)setspantreeuplinkfast{enable|disable}[rateupdate-rate][all-protocolsoff|on],首先要给管理接口分配一个IP地址,然后使用下列命令:switch(config)#clusterenablecluster-,可使用下列命令:switch(enable)cleartrunkmodule/portvlan-:switch(enable)setvlanvlan-name[namename]typetrbrfbridgebridge-num[stp{ieee|ibm}]:switch(enable)setvlanvlan-num[namename]typetrcrf{ringhex-ring-num|decringdecimal-ring-num}parentvlan-,,可以采用如下命令给VLAN分配端口:switch(enable)setvlanvlan-nummod-num/port-,可以使用下列命令:精心整理:..ATM(config)#(config-subif)#laneserber-elan-:ATM(config)#lanedatabasedatabase-nameATM(lane-config-databade)#nameelan1-nameserver-atm-addressles1-nsap-addressATM(lane-config-databade)#nameelan2-nameserver-atm-addressles2-nsap-addressATM(lane-config-databade)#name…,:ATM(config)#interfaceatmnumberATM(config-if)#laneconfigdatabasedatabase-nameATM(config-if)#laneconfigauto-config-atm-:ATM(config)#(config)#vlan-numelan-:router#configureterminalrouter(config)#interfacemediamodule/portrouter(config-if)#descriptiondescription-stringrouter(config-if)#ipaddressip--maskrouter(config-if)#:router(config)#interfacemodule/(config-ig)#encapsulation[isl|dotlq]vlan-numberrouter(config-if)#ipaddressip--:router(config)#interfaceatmmodule/portrouter(config-if)#noipaddressrouter(config-if)#atmpvc105qsaalrouter(config-if)#atmpvc2016ilnirouter(config-if)#interfaceatmmodule/(config-if)#ipaddressip--maskrouter(config-if)#elan-numrouter(config-if)#interfaceatmmodule/(config-if)#ipaddressip--namerouter(config-if)#elan-namerouter(config-if)#…,可以用下列IOS命令来进行:router(config)#iproutingrouter(config)#routerip-routing-protocolrouter(config-router)#work-numberrouter(config-router)#work-number精心整理:..:switch(enable),可在接口模式下使用下列命令:router(config)#interfaceinterfacenumberrouter(config-if)#mlsrpvlan-idvlan-id-:router(config)#:router(config)#interfaceinterfacenumberrouter(config-if)#mlsrpvtp-domaindomain-:router#showmlsrpvtp-,可以在接口模式下输入下列命令:router(config-if)#mlsrpmanagement--RP的配置情况:router#:router#-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:setmlsflow[destination|destination-source|full],可以在全局模式下使用下列命令:router(config)#mlsrpipinput-,可在交换机的特权模式下输入下列命令:switch(enable),可在特权模式下输入以下命令:switch(enable):switch(enable)-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable):switch(enable)。,可以在接口配置模式下使用下面的命令:router(config-if)#standbygroup-numberipip-,在接口配置模式下:router(config-if)#standygroup-:router(config-if)#standygroup-:router(config-if)#standygroup-numbertracktype-numberinterface-:router#showstandbytype-。:router(config)#ipmuticast-routing精心整理:..:dalllasr1>(config-if)#ippim{dense-mode|sparse-mode|sparse-dense-mode}-稠密模式下的PIM:router#ipmulticast-routingrouter#interfacetypenumberrouter#ippimsparse-dense-:dallasr1>#showippiminterface[typenumber][count]:dallasr1>#,命令如下:dallasr1>#ippimrp-addressip-address[group-access-list-number][override]:dallasr1>#ippimrp-address通告RP和它所服务的组范围:dallasr1>#ippimsend-rp-announcetypenumberscopettlgroup-ess-list-number为管理范围组通告RP的地址:dallasr1>#ippimsend-rp-0scope16group-list1设定一个RP映像代理:dallasr1>#ippimsend-rp-discoveryscopettl核实组到RP的映像:dallasr1>#showippimrpmappingdallasr1>#showippimrp[group-name|group-address][mapping]-thresholdttl-value设定TTL阀值:dallasr1>(config-if)#ipmulticastttl-thresholdttl-。:dallasr1>showipmroute[group-name|group-address][scoure][summary][count][activekbps]:dallasr1>#debugipmpacket[detail][access-list][group]:dallasr1>(config-if)#,使之加入某一个特定的组播组:dallasr1>(config-if)#ipigmpjoin-groupgroup-:dallasr1>(config-if)#:dallasr1>(enable):catalystla1>(enable)showconfigsetpromptcatalystla1>:Dallas_SW(enable):R1(config)#lineconsole0精心整理:..R1(config-line)#loginR1(config-line)#passwordLisbonR1(config)#enablepasswordLilbaoR1(config)#loginlocalR1(config)#