不同公司的设备配置指令略有不同,有些路由协议也是只限于协议的开发公司所生产的设备使用的(如Cisco公司的动态路由协议EIGRP协议)。下面来分享一下思科路由器的配置命令。
路由器显示命令:
router#showinterface;显示接口信息
router#showiproute;显示路由信息
router#showcdpnei;显示邻居信息
router#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;要求口令验证
router(config-line)#passwordxx;设置登录口令xx
router(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
router(config-if)#intf0/0.1;进入子接口
router(config-subif.1)#ipaddress;设置子接口IP
router(config-subif.1)#encapsulationdot1q;绑定vlan中继协议
router(config)#config-register0x2142;跳过配置文件
router(config)#config-register0x2102;正常使用配置文件
router#reload;重新引导