欢迎来到天天文库
浏览记录
ID:57899044
大小:21.90 KB
页数:19页
时间:2020-04-02
《华为路由器和交换机地常用命令.doc》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、实用文档一.端口:路由器——ethernet(以太口)、Serial(串口)、loopback(虚拟端口)交换机——ethernet、vlan、loopback注意:交换机默认其24个端口全在vlan1里面,交换机在给vlan配了ip之后就具有路由器的功能了。另一个需要注意的是,所用的端口是否被shutdown了,如果被shutdown了,需要进入相应的端口执行undoshutdown。二.配置ip除了交换机的以太口不可以配置ip外,其他端口都可以,配置方法相同。[Quidway]interface*(所要配置的端口,如vlan1)[Quidway-*]ipadd*.*.*.*(ip)*
2、.*.*.*(掩码)/*(掩码位数,一般只在路由器上适用)—————————————————————————————————————1.在基于IOS的交换机上设置主机名/系统名:switch(config)#hostnamehostname在基于CLI的交换机上设置主机名/系统名:switch(enable)setsystemnamename-string2.在基于IOS的交换机上设置登录口令:switch(config)#enablepasswordlevel1password在基于CLI的交换机上设置登录口令:switch(enable)setpasswordswitch(enabl
3、e)setenalbepass3.在基于IOS的交换机上设置远程访问:switch(config)#interfacevlan1switch(config-if)#ipaddressip-addressnetmaskswitch(config-if)#ipdefault-gatewayip-address在基于CLI的交换机上设置远程访问:switch(enable)setinterfacesc0ip-addressnetmaskbroadcast-addressswitch(enable)setinterfacesc0vlan实用文档switch(enable)setiproutede
4、faultgateway4.在基于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
5、disable}module/port为了查看Cisco邻接设备的CDP通告信息:switc
6、h(enable)showcdpneighbors[module/port][vlan
7、duplex
8、capabilities
9、detail]5.基于IOS的交换机的端口描述:switch(config-if)#descriptiondescription-string基于CLI的交换机的端口描述:switch(enable)setportnamemodule/numberdescription-string6.在基于IOS的交换机上设置端口速度:switch(config-if)#speed{10
10、100
11、auto}在基于CLI的交换机上设置端口速度:switch(enable)set
12、portspeedmoudle/number{10
13、100
14、auto}switch(enable)setportspeedmoudle/number{4
15、16
16、auto}7.在基于IOS的交换机上设置以太网的链路模式:switch(config-if)#duplex{auto
17、full
18、half}在基于CLI的交换机上设置以太网的链路模式:switch(enable)setportduplexmodule/number{full
19、half}实用文档8.在基于IOS的交换机上配置静态VLAN:switch#vlandatabaseswitch(vlan)#vlanvlan-numnamev
20、laswitch(vlan)#exitswitch#configureteriminalswitch(config)#interfaceinterfacemodule/numberswitch(config-if)#switchportmodeaccessswitch(config-if)#switchportaccessvlanvlan-numswitch(config-if)#end在基于CLI的交换机上配置静态VLAN:swi
此文档下载收益归作者所有