好文档 - 专业文书写作范文服务资料分享网站

思科交换机配置命令大全

天下 分享 时间: 加入收藏 我要投稿 点赞

思科交换机配置命令大全switch>用户模式1:进入特权模式enableswitch>enableswitch#2:进入全局配置模式configureterminalswitch>enableswitch#configureterminalswitch(conf)#3:交换机命名hostnameaptech2950switch>enableswitch#configureterminalswitch(conf)#hostnameaptch-2950aptech2950(conf)#4:配置使能口令enablepasswordciscoswitch>enableswitch#configureterminalswitch(conf)#hostnameaptch2950aptech2950(conf)#enablepasswordcisco5:配置使能密码enablesecretciscolabswitch>enableswitch#configureterminalswitch(conf)#hostnameaptch2950aptech2950(conf)#enablesecretciscolab以aptech2950为例以cisco为例以cicsolab为例6:设置虚拟局域网vlan1interfacevlan1switch>enableswitch#configureterminalswitch(conf)#hostnameaptch2950aptech2950(conf)#interfacevlan1aptech2950(conf-if)#ipaddress192.168.1.1255.255.255.0码aptech2950(conf-if)#noshutaptech2950(conf-if)#exitaptech2950(conf)#ipdefault-gateway192.168.2547:进入交换机某一端口interfacefastehernet0/17switch>enableswitch#configureterminal配置交换机端口ip和子网掩是配置处于运行中设置网关地址以17端口为例switch(conf)#hostnameaptch2950aptech2950(conf)#interfacefastehernet0/17aptech2950(conf-if)#8:查看命令showswitch>enableswitch#showversion察看系统中的所有版本信息showinterfacevlan1查看交换机有关ip协议的配置信息showrunning-configure查看交换机当前起作用的配置信息showinterfacefastethernet0/1察看交换机1接口具体配置和统计信息showmac-address-table查看mac地址表showmac-address-tableaging-time查看mac地址表自动老化时间9:交换机恢复出厂默认恢复命令switch>enableswitch#erasestartup-configureswitch#reload10:双工模式设置switch>enableswitch#configureterminalswitch2950(conf)#hostnameaptch-2950aptech2950(conf)#interfacefastehernet0/17aptech2950(conf-if)#duplexfull/half/auto项以17端口为例有full,half,auto三个可选11:cdp相关命令switch>enableswitch#showcdp查看设备的cdp全局配置信息showcdpinterfacefastethernet0/17查看17端口的cdp配置信息showcdptraffic查看有关cdp包的统计信息showcdpnerghbors列出与设备相连的cisco设备12:csico2950的密码恢复拔下交换机电源线。用手按着交换机的MODE键,插上电源线在switch:后执行flash_ini命令:switch:flash_ini查看flash中的文件:switch:dirflash:把“config.text”文件改名为“config.old”:switch:renameflash:config.textflash:config.old执行boot:switch:boot交换机进入是否进入配置的对话,执行no:进入特权模式察看flash里的文件:showflash:把“config.old”文件改名为“config.text”:switch:renameflash:config.oldflash:config.text把“config.text”拷入系统的“running-configure”:copyflash:config.textsystem:running-configure把配置模式重新设置密码存盘,密码恢复成功。13:交换机telnet远程登录设置:switch>enswitch#configureterminalswitch(conf)#hostnameaptech-2950aptech2950(conf)#enablepasswordcisco以cisco为特权模式密码aptech2950(conf)#interfacefastethernet0/1以17端口为telnet远程登录端口aptech2950(conf-if)#ipaddress192.168.1.1255.255.255.0aptech2950(conf-if)#noshutaptech2950(conf-if)#exitaptech2950(conf)linevty04设置0-4个用户可以telnet远程登陆aptech2950(conf-line)#loginaptech2950(conf-line)#passwordedge以edge为远程登录的用户密码主机设置:ip192.168.1.2主机的ip必须和交换机端口的地址在同一网络段netmask255.255.255.0gate-way192.168.1.1网关地址是交换机端口地址运行:telnet192.168.1.1进入telnet远程登录界面password:edgeaptech2950>enpassword:ciscoaptech#14:交换机配置的重新载入和保存设置完成交换机的配置后:aptech2950(conf)#reload是否保存(y/n)y:保存设置信息n:不保存设置信息1.在基于IOS的交换机上设置主机名/系统名:switch(config)#hostnamehostname在基于CLI的交换机上设置主机名/系统名:switch(enable)setsystemnamename-string2.在基于IOS的交换机上设置登录口令:switch(config)#enablepasswordlevel1password在基于CLI的交换机上设置登录口令:switch(enable)setpasswordswitch(enable)setenalbepass3.在基于IOS的交换机上设置远程访问:switch(config)#interfacevlan1switch(config-if)#ipaddressip-addressnetmaskswitch(config-if)#ipdefault-gatewayip-address在基于CLI的交换机上设置远程访问:switch(enable)setinterfacesc0ip-addressnetmaskbroadcast-addressswitch(enable)setinterfacesc0vlanswitch(enable)setiproutedefaultgateway4.在基于IOS的交换机上启用和浏览CDP信息: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]5.基于IOS的交换机的端口描述:switch(config-if)#descriptiondescription-string基于CLI的交换机的端口描述:switch(enable)setportnamemodule/numberdescription-string6.在基于IOS的交换机上设置端口速度:switch(config-if)#speed{10|100|auto}在基于CLI的交换机上设置端口速度:switch(enable)setportspeedmoudle/number{10|100|auto}switch(enable)setportspeedmoudle/number{4|16|auto}7.在基于IOS的交换机上设置以太网的链路模式:switch(config-if)#duplex{auto|full|half}在基于CLI的交换机上设置以太网的链路模式:switch(enable)setportduplexmodule/number{full|half}8.在基于IOS的交换机上配置静态VLAN:switch#vlandatabaseswitch(vlan)#vlanvlan-numnamevlaswitch(vlan)#exitswitch#configureteriminalswitch(config)#interfaceinterfacemodule/numberswitch(config-if)#switchportmodeaccessswitch(config-if)#switchportaccessvlanvlan-numswitch(config-if)#end在基于CLI的交换机上配置静态VLAN:switch(enable)setvlanvlan-num[namename]switch(enable)setvlanvlan-nummod-num/port-list9.在基于IOS的交换机上配置VLAN中继线: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]10.在基于IOS的交换机上配置VTP管理域:switch#vlandatabaseswitch(vlan)#vtpdomaindomain-name在基于CLI的交换机上配置VTP管理域:switch(enable)setvtp[domaindomain-name]11.在基于IOS的交换机上配置VTP模式: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]12.在基于IOS的交换机上配置VTP版本:switch#vlandatabaseswitch(vlan)#vtpv2-mode在基于CLI的交换机上配置VTP版本:switch(enable)setvtpv2enable13.在基于IOS的交换机上启动VTP剪裁:switch#vlandatabaseswitch(vlan)#vtppruning

思科交换机配置命令大全

思科交换机配置命令大全switch>用户模式1:进入特权模式enableswitch>enableswitch#2:进入全局配置模式configureterminalswitch>enableswitch#configureterminalswitch(conf)#3:交换机命名hostnameaptech2950switch>enableswitch#configureterminalsw
推荐度:
点击下载文档文档为doc格式
6fro885z6s62a888ee7y
领取福利

微信扫码领取福利

微信扫码分享