資源描述:
《思科交換機(jī)路由器常用命令》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在應(yīng)用文檔-天天文庫。
1、思科交換機(jī)路由器命令大全序號/類別基于ios的交換機(jī)命令基于CLI的交換機(jī)命令1.設(shè)置主機(jī)名/系統(tǒng)名switch(config)#hostname"hostname"switch(enable)setsystemnamename-string2.設(shè)置登錄口令switch(config)#enablepasswordlevel1passwordswitch(enable)setpasswordswitch(enable)setenalbepass3.設(shè)置遠(yuǎn)程訪問switch(config)#intecevlan1switch
2、(config-if)#ipaddressip-addressnetmaskswitch(config-if)#ipdefault-gatewayip-addressswitch(enable)setintecesc0ip-addressnetmaskbroadcast-addressswitch(enable)setintecesc0vlanswitch(enable)setiproutedefaultgateway4.啟用和瀏覽CDP信息switch(config-if)#cdpenableswitch(config-
3、if)#nocdpenableswitch(enable)setcdp{enabledisable}module/port5.查看Cisco鄰接設(shè)備的CDP通告switch#showcdpintece[typemodle/port]switch#showcdpneighbors[typemodule/port][detail]switch(enable)showcdpneighbors[module/port][vlanduplexcapabilitiesdetail]6.端口描述switch(config-if)#des
4、criptionescription-stringswitch(enable)setportnamemodule/numberdescription-string7.設(shè)置端口速度switch(config-if)#speed{10100auto}switch(enable)setportspeedmoudle/number{10100auto}switch(enable)setportspeedmoudle/number{416auto}8.設(shè)置以太網(wǎng)的鏈路模式switch(config-if)#duplex{autofu
5、llhalf}switch(enable)setportduplexmodule/number{fullhalf9.配置靜態(tài)VLANswitch#vlandatabaseswitch(vlan)#vlanvlan-numnamevlaswitch(vlan)#exitswitch#configureteriminalswitch(config)#inteceintecemodule/numberswitch(config-if)#switchportmodeaccessswitch(config-if)#switchpor
6、taccessvlanvlan-numswitch(config-if)#endswitch(enable)setvlanvlan-num[namename]switch(enable)setvlanvlan-nummod-num/port-list10.配置VLAN中繼線switch(config)#inteceintecemod/portswitch(config-if)#switchportmodetrunkswitch(config-if)#switchporttrunkencapsulation{isldotlq
7、}switch(config-if)#switchporttrunkallowedvlanremovevlan-listswitch(config-if)#switchporttrunkallowedvlanaddvlan-listswitch(enable)settrunkmodule/port[onoffdesirableautononegotiate]Vlan-range[isldotlqdotl0lanenegotiate]11.配置VTP管理域switch#vlandatabaseswitch(vlan)#vtp
8、domaindomain-nameswitch(enable)setvtp[domaindomain-name]12.配置VTP模式switch#vlandatabaseswitch(vlan)#vtpdomaindomain-nameswitch(vlan)#vtp{severcilenttransp