欢迎来到天天文库
浏览记录
ID:39550106
大小:40.00 KB
页数:11页
时间:2019-07-06
《Cisco 路由器(Router)和交换机(Switch)命令详解》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、Cisco路由器(Router)和交换机(Switch)命令详解2010年06月25日星期五14:20Cisco路由器交换机配置命令详解1.交换机支持的命令:交换机基本状态:switch:;ROM状态,路由器是rommon>hostname>;用户模式hostname#;特权模式hostname(config)#;全局配置模式hostname(config-if)#;接口状态交换机口令设置:switch>enable;进入特权模式switch#configterminal;进入全局配置模式switch(config)#hostname;设置交换机的主机
2、名switch(config)#enablesecretxxx;设置特权加密口令switch(config)#enablepasswordxxa;设置特权非密口令switch(config)#lineconsole0;进入控制台口switch(config-line)#linevty04;进入虚拟终端switch(config-line)#login;允许登录switch(config-line)#passwordxx;设置登录口令xxswitch#exit;返回命令交换机VLAN设置:switch#vlandatabase;进入VLAN设置switc
3、h(vlan)#vlan2;建VLAN2switch(vlan)#novlan2;删vlan2switch(config)#intf0/1;进入端口1switch(config-if)#switchportaccessvlan2;当前端口加入vlan2switch(config-if)#switchportmodetrunk;设置为干线switch(config-if)#switchporttrunkallowedvlan1,2;设置允许的vlanswitch(config-if)#switchporttrunkencapdot1q;设置vlan中继s
4、witch(config)#vtpdomain;设置发vtp域名switch(config)#vtppassword;设置发vtp密码switch(config)#vtpmodeserver;设置发vtp模式switch(config)#vtpmodeclient;设置发vtp模式交换机设置IP地址:switch(config)#interfacevlan1;进入vlan1switch(config-if)#ipaddress;设置IP地址switch(config)#ipdefault-gateway;设置默认网关switch#dirflash:;查
5、看闪存交换机显示命令:switch#write;保存配置信息switch#showvtp;查看vtp配置信息switch#showrun;查看当前配置信息switch#showvlan;查看vlan配置信息switch#showinterface;查看端口信息switch#showintf0/0;查看指定端口信息2.路由器支持的命令:路由器显示命令:router#showrun;显示配置信息router#showinterface;显示接口信息router#showiproute;显示路由信息router#showcdpnei;显示邻居信息router
6、#reload;重新起动路由器口令设置:router>enable;进入特权模式router#configterminal;进入全局配置模式router(config)#hostname;设置交换机的主机名router(config)#enablesecretxxx;设置特权加密口令router(config)#enablepasswordxxb;设置特权非密口令router(config)#lineconsole0;进入控制台口router(config-line)#linevty04;进入虚拟终端router(config-line)#login;
7、要求口令验证router(config-line)#passwordxx;设置登录口令xxrouter(config)#(Ctrl+z);返回特权模式router#exit;返回命令路由器配置:router(config)#ints0/0;进入Serail接口router(config-if)#noshutdown;激活当前接口router(config-if)#clockrate64000;设置同步时钟router(config-if)#ipaddress;设置IP地址router(config-if)#ipaddresssecond;设置第二个IP
8、router(config-if)#intf0/0.1;进入子接口router(config-
此文档下载收益归作者所有