迈普路由配置命令集合-

上传人:左****笑 文档编号:145935625 上传时间:2020-09-25 格式:DOCX 页数:3 大小:34.51KB
返回 下载 相关 举报
迈普路由配置命令集合-_第1页
第1页 / 共3页
迈普路由配置命令集合-_第2页
第2页 / 共3页
迈普路由配置命令集合-_第3页
第3页 / 共3页
亲,该文档总共3页,全部预览完了,如果喜欢就下载吧!
资源描述

《迈普路由配置命令集合-》由会员分享,可在线阅读,更多相关《迈普路由配置命令集合-(3页珍藏版)》请在金锄头文库上搜索。

1、迈普配置命令集合视图模式介绍:普通视图 router特权视图 router# /在普通模式下输入enable全局视图 router(config)# /在特权模式下输入config t接口视图 router(config-if)# /在全局模式下输入int 接口名称 例如int s0或int e0路由协议视图 router(config-route)# /在全局模式下输入router 动态路由协议名称1、基本配置:routerenable /进入特权模式router#conf t /进入全局配置模式router(config)# hostname xxx /设置设备名称就好像给我们的计算机起个

2、名字router(config)#enable password /设置特权口令router(config)#no ip domain lookup /不允许路由器缺省使用DNS解析命令router(config)# Service password-encrypt /对所有在路由器上输入的口令进行暗文加密router(config)#line vty 0 4 /进入设置telnet服务模式router(config-line)#password xxx /设置telnet的密码router(config-line)#login /使能可以登陆router(config)#line con 0

3、 /进入控制口的服务模式router(config-line)#password xxx /要设置console的密码router(config-line)#login /使能可以登陆2、接口配置:router(config)#int s0 /进入接口配置模式 serial 0 端口配置(如果是模块化的路由器前面加上槽位编号,例如serial0/0 代表这个路由器的0槽位上的第一个接口)router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码router(config-if)#enca hdlc/ppp 捆绑链路协

4、议 hdlc 或者 ppp 思科缺省串口封装的链路层协议是HDLC所以在show run配置的时候接口上的配置没有,如果要封装为别的链路层协议例如PPP/FR/X25就是看到接口下的enca ppp或者enca frrouter(config)#int loopback /建立环回口(逻辑接口)模拟不同的本机网段router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码给环回口在物理接口上配置了ip地址后用no shut启用这个物理接口反之可以用shutdown管理性的关闭接口3、路由配置:(1)静态路由router

5、(config)#ip route xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 下一条或自己的接口router(config)#ip route 0.0.0.0 0.0.0.0 s 0 添加缺省路由(2)动态路由rip协议router(config)#router rip /启动rip协议router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段router(config-router)#version 2 转换为rip 2版本router(config-router)#no auto-summary /关闭自动汇总功能,r

6、ip V2才有作用router(config-router)# passive-int 接口名 /启动本路由器的那个接口为被动接口router(config-router)# nei xxx.xxx.xxx.xxx /广播转单播报文,指定邻居的接ip,igrp协议-内部网关路由协议(IGRP:Interior Gateway Routing Protocol)router(config)#router igrp xxx /启动igrp协议router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段router(config-router)#var

7、iance xxx /调整倍数因子,使用不等价的负载均衡eigrp-Enhanced Interior Gateway Routing Protocol(增强网关内部路由线路协议)router(config)#router eigrp xxx /启动协议router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段router(config-router)#variance xxx /调整倍数因子,使用不等价的负载均衡router(config-router)#no auto-summary /关闭自动汇总功能ospf协议-开放最短路径协议(OSP

8、F)协议router(config)#router ospf xxx /启动协议启动一个OSPF协议进程router(config-router)#network xxx.xxx.xxx.xxx area xxx /宣告自己的接口或网段在ospf的区域中,可以把不同接口宣告在不同区域中router(config-router)#router-id xxx.xxx.xxx.xxx /配置路由的idrouter(config-router)#area xxx stub /配置xxx区域为末梢区域,加入这个区域的路由器全部要配置这个条命令router(config-router)#area xxx

9、stub no-summary /配置xxx区域为完全末梢区域,只在ABR上配置router(config-router)#area xxx nssa /配置xxx区域为非纯末梢区域,加入这个区域的路由器全部要配置这个条命令router(config-router)#area xxx nssa no-summary /配置xxx区域为完全非纯末梢区域,只在ABR上配置,并发布缺省路由信息进入这个区域内的路由器4、保存当前修改/运行的配置:router#write /将RAM中的当前配置存储到NVRAM中,下次路由器启动就是执行保存的配置router#Copy running-config st

10、artup-config /命令与write效果一样5、一般的常用命令router(config-if)#exitrouter(config)#router(config-router)#exitrouter(config)#router(config-line)#exitrouter(config)#router(config)#exitrouter#exit命令 /从接口、协议、line等视图模式下退回到全局配置模式,或从全局配置模式退回到特权模式router(config-if)#endrouter(config-router)#endrouter(config-line)#endrou

11、ter#end命令 /从任何视图直接回到特权模式router#Logout /退出当前路由器登陆模式相对与windows的注销router#reload /重新启动路由器(热启动)冷启动就是关闭路由器再打开电源开关特权模式下:router#show ip route /查看当前的路由表router#clear ip route * /清楚当前的路由表router#show ip protocol /查看当前路由器运行的动态路由协议情况router#show ip int brief /查看当前的路由器的接口ip地址启用情况router#show running-config /查看当前运行配置

12、router#show startup-config /查看启动配置router#debug ip pack /打开ip报文的调试router#terminal monitor /输出到终端上显示调试信息router#show ip eigrp neighbors /查看eigrp协议的邻居表router#show ip eigrp top /查看eigrp协议的拓朴表router#show ip eigrp interface /查看当前路由器运行eigrp协议的接口情况router#show ip ospf neighbor /查看当前路由器的ospf协议的邻居表router#show ip ospf interface /查看当前路由器运行ospf协议的接口情况router#clear ip ospf process /清楚当前路由器ospf协议的进程router#Show interfaces /显示设置在路由器和访问服务器上所有接口的统计信息. 显示路由器上配置的所有接口的状态router#Show interfaces serial /显示关于一个串口的信息router#Show ip interface /列出一个接口的IP信息和状态的小结, 列出接口的状态和全局参数

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 解决方案

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号