迈普路由配置命令集合
迈普路由器配置手册

第1章系统基础本章主要讲述迈普路由器中MYPOWER-R系统的基本知识,包括MYPOWER-R系统模式、配置环境的准备及命令行接口的有关知识等。
本章主要内容:●路由器配置方式●命令运行模式●搭建配置环境●命令行接口●路由器WEB配置1.1路由器配置方式迈普路由器为用户提供了四种典型的配置方式,分别是:●通过console口,采用shell命令进行配置●通过336modem模块LINE口进行配置●通过Telnet远程登录到路由器上配置●通过SNMP网管系统对路由器进行配置其中最后一种配置方式提供中英文的用户界面,主要用于用户监控网络的工作状态及收集系统统计信息。
本用户手册主要描述通过console口配置路由器的方法,通过336modem模块LINE口、Telnet远程登录配置路由器的方法与之类似,通过SNMP网管系统对路由器进行配置的细节详见路由器网管系统说明书。
1.2命令运行模式迈普路由器MYPOWER-R 为系统命令的管理及执行专门提供了一个命令处理子系统,称之为shell,其主要功能包括:●系统命令的注册●系统配置命令的用户编辑●用户输入命令(通过Console口或Telnet连接)的语法分析●系统命令的执行用户通过shell命令配置路由器时,系统为命令的执行提供了多种运行模式,每种命令模式分别支持特定的MYPOWER-R 配置命令,从而达到分级保护系统的目的,确保系统不受未经授权的访问。
Shell子系统当前为配置命令的运行提供以下多种模式,不同的模式对应于不同的系统提示符,用以提示用户当前所处的系统模式。
可能的一些模式如下:●普通用户模式(user EXEC)●特权用户模式(privileged EXEC)●全局配置模式(global configuration)●接口配置模式(interface configuration)●路由配置模式(router configuration)●文件系统模式(file system configuration)●访问列表配置模式(access list configuration)●语音口配置模式(voice-port configuration)●拨号端配置模式(dial-peer configuration)●加密变换配置模式(crypto transform-set configuration)●加密映射配置模式(crypto map configuration)●IKE策略配置模式(isakmp configuration)●公钥系列配置模式(pubkey-chain configuration)●公钥配置模式(pubkey-key configuration)●DHCP配置模式(dhcp configuration)其他配置模式在相关章节中进行介绍,表1-1描述了各种命令模式的进入方法及模式间的切换方法。
迈普路由器配置说明

router#write ------------------------------------------------------------------------------------保存
Are you sure to overwrite /flash/startup (Yes|No)?yBuilding Configuration...done
router(dhcp-config)#dns-server 211.140.197.58 211.137.32.178 ------------------配置dhcp地址池dns
router(dhcp-config)#exit ------------------退到全局模式
router(config-if-gigaethernet0)#exit -----------------退出到配置模式
router(config)#interface switchethernet 0 -----------------进入下联到用户侧交换0口
router(config)#ip access-list standard 1 --------------配置acl列表
router(config-std-nacl)#permit 192.168.1.0 0.0.0.255 --------------允许接入的IP地址
router(config-if-gigaethernet0)#ip address 10.59.6.54 255.255.255.252 ----------------配置上联到移动设备g0 口ip地址
router(config-if-gigaethernet0)#ip nat outside ----------------公网地址出口nat
迈普命令

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 捆绑链路协议 hdlc 或者 ppp 思科缺省串口封装的链路层协议是HDLC所以在show run配置的时候接口上的配置没有,如果要封装为别的链路层协议例如PPP/FR/X25就是看到接口下的enca ppp或者enca fr
router(config-line)#login /使能可以登陆
router(config)#line con 0 /进入控制口的服务模式
(config-line)#password xxx /要设置console的密码
router(config-line)#login /使能可以登陆
3、路由配置:
(1)静态路由 router(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 /关闭自动汇总功能,rip V2才有作用 router(config-router)# passive-int 接口名 /启动本路由器的那个接口为被动接口 router(config-router)# nei xxx.xxx.xxx.xxx /广播转单播报文,指定邻居的接i
迈普交换机基本配置

1)查看交换机端口状态
2)查看交换机端口描述
3)查寻mac地址
4)修改交换机配置打开端口 Nhomakorabeaoshutdown
关闭端口shutdown
1、迈普设备配置基本命令
用户名密码为adminadmin
Switch>enable
Swith#config?terminal
Swith(config)#vlan70//新建vlan70
Switch(Config-If-Vlan70)#nameguanli//将vlan70命名为guanli
Switch(Config-If-Vlan70)#ipaddress
Switch(Config-Ethernet1-0/0/1)#exit
Switch(Config)#intethernet0/0/2-19;ethernet0/0/20//进入端口组
Switch(Config-Port-Range)#switchportmodeaccess//将端口组定义为access口
Switch(Config-Ethernet1-0/0/21)#switchporttrunkallowedvlan70;338;440//该端口允许vlan70,338,440通过
Switch(Config-Ethernet1-0/0/21)#exit
Switch(Config)#exit
Switch#write//保存
//配置交换机管理地址
Switch(Config-If-Vlan70)#noshutdown
Switch(Config-If-Vlan70)#exit
//配置交换机路由
Swith(config)#vlan338,440//新建vlan338,440
迈普路由器设置命令

迈普路由器设置命令修改已设有IP的MP路由器IPcmdtelnet 192.168.1.1密码:adminen密码:admin查看路由设置:sh run配置权限:conf t输入:ip access-list extended 1001输入:permit ip any any (允许任何IP地址通过)退出:exit修改参数:interface fastethernet0输入外网IP:ip address 外网IP和掩码218.204.51.111 255.255.255.128表明上面输入的是外网IP:ip nat outside退出:exit输入局域网IP:interface fastethernet1输入局域网IP:ip address 局域网IP和掩码192.168.1.1 255.255.255.0表明上面输入的是局域网IP:ip nat inside退出:exit输入:ip nat inside source list 1001 interface fastethernet0 overload设置外网网关:ip route 0.0.0.0 0.0.0.0 218.204.51.1配置telnet权限:line vty 0 4输入:password 0 admin输入:login退出:exit配置权限:conf tRouter (config)#hostname XXXX //配置路由器名称,可将router修改为需要的名称。
Router (config)#Enable password admin //配置密码设置自动分配:ip dhcp pool 250局域网ip分配:range 192.168.1.2 192.168.1.250 255.255.255.0 局域网网关:default-router 192.168.1.1局域网DNS:dns-server 211.138.245.180 203.196.0.6退出:exit退出:end输入:wr选择:y映射:全局模式:ip nat inside source static tcp 192.168.1.3 3389 172.88.1.146 3389。
迈普路由器BGP基本配置示例

迈普路由器BGP基本配置示例随着互联网的发展,网络规模逐渐扩大,大型企事业单位的网络也越来越复杂。
在这样的背景下,BGP(边界网关协议)作为一种最常用的外部网关协议,被广泛应用于企业网络中。
本文将为你介绍迈普路由器BGP基本配置示例,帮助你更好地理解和应用BGP协议。
1. 路由器基本设置首先,我们需要对迈普路由器进行基本设置。
打开终端连接迈普路由器,进入路由器的全局配置模式。
输入以下命令完成路由器的基本设置:hostname RouterAip address 192.168.1.1 255.255.255.0interface GigabitEthernet 0/0/0ip address 10.0.0.1 255.255.255.0以上命令中,设置了路由器的主机名为RouterA,配置了路由器的管理IP地址为192.168.1.1/24,同时设置了路由器的接口GigabitEthernet 0/0/0的IP地址为10.0.0.1/24。
2. BGP协议配置接下来,我们需要配置BGP协议。
BGP协议是一种路由选择协议,用于跨自治系统的路由选择。
输入以下命令完成BGP协议的基本配置:router bgp 65001bgp router-id 192.168.1.1neighbor 10.0.0.2 remote-as 65002network 192.168.1.0 mask 255.255.255.0以上命令中,设置了本路由器的自治系统号为65001,指定了本路由器的BGP路由器ID为192.168.1.1,同时配置了邻居路由器的IP地址为10.0.0.2,邻居路由器的自治系统号为65002。
最后,我们将本路由器的192.168.1.0/24网段添加到BGP路由表中。
3. BGP邻居关系建立在上一步中,我们配置了本路由器的邻居路由器的信息。
接下来,我们需要建立BGP邻居关系。
输入以下命令完成邻居关系的建立:neighbor 10.0.0.2 activateneighbor 10.0.0.2 next-hop-self以上命令中,首先激活邻居路由器10.0.0.2,然后指定本路由器作为下一跳地址。
迈普交换机基本配置

迈普交换机基本配置 Revised by BLUE on the afternoon of December 12,2020.1、迈普设备配置基本命令用户名密码为 admin adminSwitch>enableSwith#configterminalSwith(config)#vlan 70 //新建vlan70Switch(Config-If-Vlan70)#name guanli //将vlan70 命名为guanliSwitch(Config-If-Vlan70)#ip address 172.17.202.21255.255.255.0//配置交换机管理地址Switch(Config-If-Vlan70)#no shutdownSwitch(Config-If-Vlan70)#exitSwith(config)#ip route-static 0.0.0.0 0.0.0.0172.17.202.1//配置交换机路由Swith(config)#vlan 338,440 //新建vlan338,440Switch(Config)# int ethernet 0/0/1 //进入端口Switch(Config-Ethernet1-0/0/1)# no shutdown //打开端口Switch(Config-Ethernet1-0/0/1)# switchport mode access//将端口定义为access口Switch(Config-Ethernet1-0/0/1)# switchport access vlan 338 //将vlan338加入到该端口Switch(Config-Ethernet1-0/0/1)# exitSwitch(Config)# int ethernet 0/0/2-19;ethernet 0/0/20 //进入端口组Switch(Config-Port-Range)#switchport mode access //将端口组定义为access口Switch(Config-Port-Range)#switchport access vlan 440 //将vlan440加入到该端口组Switch(Config-Port-Range)#exitSwitch(Config)#int ethernet 0/0/21 //进入端口Switch(Config-Ethernet1-0/0/21)# switchport mode trunk //将端口定义为trunk口Switch(Config-Ethernet1-0/0/21)#switchport trunk allowed vlan 70;338;440 //该端口允许vlan70,338,440通过Switch(Config-Ethernet1-0/0/21)#exitSwitch(Config)#exitSwitch#write //保存2、迈普设备故障处理基本命令1)查看交换机端口状态2)查看交换机端口描述3)查寻mac地址4)修改交换机配置打开端口 no shutdown 关闭端口 shutdown。
迈普路由配置命令集合

迈普配置命令集合视图模式介绍:普通视图router>特权视图router# /在普通模式下输入enable全局视图router(config)# /在特权模式下输入config t接口视图router(config-if)# /在全局模式下输入int 接口名称例如int s0或int e0路由协议视图router(config-route)# /在全局模式下输入router 动态路由协议名称1、基本配置:router>enable /进入特权模式router#conf t /进入全局配置模式router(config)# hostname xxx /设置设备名称就好像给我们的计算机起个名字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 /进入控制口的服务模式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 捆绑链路协议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(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 /关闭自动汇总功能,rip 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)#variance 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协议----开放最短路径协议(OSPF)协议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 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 startup-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)#endrouter#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 /查看当前运行配置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信息和状态的小结, 列出接口的状态和全局参数。
迈普交换机基本配置

迈普交换机配置1、迈普设备配置基本命令用户名密码为:admin adminSwitch>enable //进入普通用户模式-只能看看Switch#config terminal //进入全局配置模式Switch(config)#vlan 70 //新建vlan 70Switch(config-If-Vlan70)#name guanli //将vlan70命名为guanli Switch(config-If-Vlan70)#ip address 172.17.202.21255.255.255.0//配置交换机管理地址Switch(config-If-Vlan70)#no shutdownSwitch(config-If-Vlan70)#exitSwitch(config)#ip route-static 0.0.0.0 0.0.0.0 172.17.202.1//配置交换机路由Switch(Config)#vlan 338,440 //新建vlan338,440Switch(config)#int ethernet 0/0/1 //进入端口Switch(Config- Ethernet- 0/0/1)#no shutdown //打开端口Switch(Config- Ethernet- 0/0/1)#switchport mode access//将端口定义为access口Switch(Config- Ethernet- 0/0/1)#switchport access vlan 388//将vlan338加入该端口Switch(Config- Ethernet- 0/0/1)#exit //退出Switch(Config)# int ethernet 0/0/12-19;int ethernet 0/0/20 //进入端口组Switch(Config-Port-Range)#switchport mode access //将端口组定义为access口Switch(Config-Port-Range)#switchport access vlan 440//将vlan440加入该端口组Switch(Config-Port-Range)#exit //退出Switch(Config)# int ethernet 0/0/21 //进入端口Switch(Config- Ethernet-0/0/21)# switchport mode trunk//将端口定义为trunk口Switch(Config- Ethernet-0/0/21)#switchport trunk aaowed vlan70;338;440 //该端口允许Vlan70,338,440通过Switch(Config- Ethernet-0/0/21)exit //退出0/0/21 端口Switch(Config)# exit //退出.Switch#write //保存2、迈普设备故障处理基本命令1)查看交换机端口状态2)查看交换机端口描述3)查询mac地址4)修改交换机配置打开端口no shutdown关闭端口no shutdown迈普路由器配置与维护enable 普通用户模式只能看看特权用户模式:filesystem 文件系统模式configure 全局配置模式---- interface 接口配置模式router*** 路由配置模式ipsccess-list 访问列表配置模式voice-port 语音口配置模式dial-peer 拨号端口配置模式系统配置。
迈普路由器配置命令集合

迈普路由器配置命令集合视图模式介绍:普通视图router>特权视图router# /在普通模式下输入enable全局视图router(config)# /在特权模式下输入config t接口视图router(config-if)# /在全局模式下输入int 接口名称例如int s0或int e0路由协议视图router(config-route)# /在全局模式下输入router 动态路由协议名称1、基本配置router>enable /进入特权模式router#conf t /进入全局配置模式router(config)# hostname xxx /设置设备名称就好像给我们的计算机起个名字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 /进入控制口的服务模式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 捆绑链路协议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(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 /关闭自动汇总功能,rip V2才有作用.router(config-router)# passive-int 接口名/启动本路由器的那个接口为被动接口router(config-router)# nei xxx.xxx.xxx.xxx /广播转单播报文,指定邻居的接ipigrp协议-----内部网关路由协议(IGRP:Interior Gateway Routing Protocol)router(config)#router igrp xxx /启动igrp协议router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段router(config-router)#variance 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协议----开放最短路径协议(OSPF)协议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 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 startup-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)#endrouter#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 /查看当前运行配置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信息和状态的小结, 列出接口的状态和全局参数。
迈普路由器配置

迈普路由器配置一、配置远程管理密码router(config)#enable password level 15 axmcc 配置特权模式密码及强度(没配无法远程)二、建立NAT转换规则router(config)#ip nat inside source list 1 interface fastethernet0 overload 配置内网与公网地址映射,把访问例表1允许的内网地址转换成公网地址三、配置公网IProuter(config)#interface fastethernet0 进入F0口router(config-interface-fastethernet0)#ip address X.X.X.X X.X.X.X 配置公网IProuter(config-interface-fastethernet0)#ip nat outside 把端口设为NA T外网口router(config-interface-fastethernet0)#exit四、配置静态路由router(config)#ip route 0.0.0.0 0.0.0.0 X.X.X.X 配置默认路由五、配置DHCProuter(config)#ip dhcp pool axmcc 创建一个DHCProuter(config-dhcp-axmcc)#range 192.168.0.2 192.168.0.254 255.255.0.0 配置地址池router(config-dhcp-axmcc)#dns-server 211.138.151.161 218.207.128.4 配置DNS服务器router(config-dhcp-axmcc)#default-router 192.168.0.1 配置默认网关router(config-dhcp-axmcc)#exit六、配置内网IProuter(config)#interface switchethernet0router(config-if-switchethernet0)#ip address 192.168.0.1 255.255.0.0router(config-if-switchethernet0)#vlan 1 将SW0口跟VLAN1绑定router(config-if-switchethernet0)#ip nat inside 把端口设为NAT内网口router(config-if-switchethernet0)#exit七、建立访问控制列表router(config)#ip access-list standard 1 配置标准访问控制列表router(config-access-list-1)#permit 192.168.0.0 0.0.255.255router(config-access-list-1)#exitrouter#write 保存迈普路由器限速router(config)#local stat enable 启用localstat功能router(config)#set X.X.X.X receive-flow 1000 设置某IP下行带宽为1Mrouter(config)#set X.X.X.X send-flow 1000 设置某IP上行带宽为1Mrouter(config)#set all receive-flow 100 设置其他的IP下行带宽为100K。
迈普路由器配置

从路由器的console口登陆router>enable ------------------------------进入特权模式router#configure terminal------------------------进入配套模式router(config)#interface fastethernet1----------------进入快速以太网口FA0router(config-if-fastethernet0)#ip address 222.222.222.222 255.255.255.0-------------配置公网IP router(config-if-fastethernet0)# ip nat outside------------------把端口设为NAT外网口router(config-if-fastethernet0)#int switchethernet0 --------------------进入第二个以太网口SW0router(config-if-switchethernet0)#ip address 192.168.1.1 255.255.255.0------------------配置内网IP router(config-if-switchethernet0)# ip nat inside------------------把端口设为NAT内网口router(config-if-switchethernet0)# vlan 1---------------------端口属于VLAN1router(config-if-switchethernet0)#exit ---------------------------退出接口配置模式vlan 1description defaultport 0-7 untaggedexitrouter(config)#ip access-list standard 1000--------配置标准访问列表router(config-std-acl)#10 permit 192.168.1.0 0.0.0.255-----只允许192.168.1.0网段的所有电脑router(config-std-acl)#exit ----------------------退出访问列表配置模式router(config)# ip nat inside source list 1000 interface fastethernet1-------配置内网与公网地址映射,把访问例表1000允许的内网地址转换成公网地址。
迈普路由器开启web界面及基本配置流程图解

本批次迈普路由器出厂未开启web界面,需现场开启,现东坡区编制配置流程图解,配置过程中按次顺序进行即可。
一、准备工具:配置线、网线、电脑、SecureCRT(超级终端)(1)SecureCRT 使用:进入软件后点击文件二、设备面板介绍三、开启web界面配置命令router#enable ->进入特权配置模式router#configure terminal ->进入全局配置模式router(config)#ip http server ->启动web界面router(config)#user maipu privilege 15 password 0 mdcn197411->配置用户名maipu密码mdcn197411router(config)#int vlan 1 ->进入默认vlan1router(config-if-vlan1)#ip address 192.168.1.1 255.255.255.0->配置路由器web界面登陆iprouter(config-if-vlan1)#exit ->退出VLAN配置模式router(config)#exit ->退出全局模式router#write ->保存配置根据提示Are you sure to overwrite / flash/statup(yes/no)? y ->输入y确认保存配置完成上面命令后,断电重启路由器附配置命令截图四、进入web界面,进行路由器配置1、打开IE输入192.168.1.1,进入路由器登陆界面2、点击左上角快速向导3、点击开始配置4、基本信息界面,直接点击下一步5、系统时间:先勾选当前系统时间,再点击下一步6、接入方式优先选择静态IP(OUN用桥接方式),不建议用DHCP方式(ONU用路由模式,新接入路由器通过自动获取NAT后的内网IP地址,多出来一个转节点)7、静态IP配置(在下拉菜单上端口选择gigabitethernet1/0),再对照工单信息配置。
迈普路由器配置

迈普路由器配置迈普路由器配置一、配置远程管理密码router(config)#enable password level 15 axmcc 配置特权模式密码及强度(没配无法远程)二、建立NAT转换规则router(config)#ip nat inside source list 1 interface fastethernet0 overload 配置内网与公网地址映射,把访问例表1允许的内网地址转换成公网地址三、配置公网IProuter(config)#interface fastethernet0 进入F0口router(config-interface-fastethernet0)#ip address X.X.X.X X.X.X.X 配置公网IProuter(config-interface-fastethernet0)#ip nat outside 把端口设为NA T外网口router(config-interface-fastethernet0)#exit四、配置静态路由router(config)#ip route 0.0.0.0 0.0.0.0 X.X.X.X 配置默认路由五、配置DHCProuter(config)#ip dhcp pool axmcc 创建一个DHCProuter(config-dhcp-axmcc)#range 192.168.0.2 192.168.0.254 255.255.0.0 配置地址池router(config-dhcp-axmcc)#dns-server 211.138.151.161 218.207.128.4 配置DNS服务器router(config-dhcp-axmcc)#default-router 192.168.0.1 配置默认网关router(config-dhcp-axmcc)#exit六、配置内网IProuter(config)#interface switchethernet0router(config-if-switchethernet0)#ip address 192.168.0.1 255.255.0.0router(config-if-switchethernet0)#vlan 1 将SW0口跟VLAN1绑定router(config-if-switchethernet0)#ip nat inside 把端口设为NAT内网口router(config-if-switchethernet0)#exit七、建立访问控制列表router(config)#ip access-list standard 1 配置标准访问控制列表router(config-access-list-1)#permit 192.168.0.0 0.0.255.255 router(config-access-list-1)#exitrouter#write 保存迈普路由器限速router(config)#local stat enable 启用localstat功能router(config)#set X.X.X.X receive-flow 1000 设置某IP下行带宽为1Mrouter(config)#set X.X.X.X send-flow 1000 设置某IP上行带宽为1Mrouter(config)#set all receive-flow 100 设置其他的IP下行带宽为100K。
迈普交换机常用命令手册-v1

V1.3目录1概述 (1)2配置命令 (2)2.1系统模式及切换 (2)2.2基础配置 (3)2.2.1配置主机名 (3)2.2.2配置账户 (3)2.2.3配置登陆 (3)2.2.4配置Vlan (3)2.3配置端口 (4)2.3.1双工速率 (4)2.4配置T RACK (4)2.5配置MSTP (5)2.6配置VRRP (5)2.7配置T RUNK (5)2.8多接口LINK-AGGREGATION (6)2.9配置ACL (6)2.10配置路由 (7)2.10.1静态路由 (7)2.10.2配置RIP (7)2.10.3配置OSPF (8)2.11管理配置 (8)2.11.1配置AAA (8)2.11.2配置端口镜像 (9)2.11.3文件管理 (10)2.11.4Logging (10)2.11.5配置SNMP (11)2.11.6配置NTP (11)3迈普常用命令 (12)3.1查找MP命令 (12)3.2常用命令 (12)3.2.1查看信息 (12)3.2.2删除配置 (12)3.2.3查看配置文件 (12)3.2.4查看路由配置 (12)3.2.5查看路由表 (13)3.2.6查看VRRP状态 (13)3.2.7查看二层接口信息 (13)3.2.8查看bfd信息 (13)3.2.9查看设备信息 (13)3.2.10查看用户信息 (13)1概述本手册编写的目的是为了使分行管理员快速掌握迈普MP2900路由交换一体机的常用命令,为设备运维工作提供帮助和指导。
几点说明:➢本文档中用到的网络参数,仅为举例,与实际网络参数无关。
➢更详细的MP交换机配置命令,请参考《MP2900系列路由器命令手册V1.1.chm》、《MP2900系列路由器配置手册V1.1.chm》2配置命令2.1系统模式及切换模式名称模式进入方法系统提示符退出方法功能说明普通用户模式登录设备Hostname> 执行exit命令退出·改变终端设置·执行基本测试·显示系统信息特权用户模式在普通用户模式下执行enable命令Hostname# 执行disable或者exit命令退回到普通用户模式·配置设备运行参数·显示设备运行信息全局配置模式在特权用户模式下执行configureterminal命令Hostname(config)# 执行disable或者exit命令退回到普通用户模式·配置设备运行所需的全局参数接口配置模式在全局模式下执行interface命令(同时指定相应的接口或者接口组)Hostname(config-if-xxx[number])#或者Hostname(config-if-group[number])#执行exit命令退回到全局配置模式执行end命令退回到特权用户模式在该模式下配置设备接口,包括:·配置各种类型的接口·配置接口组文件系统配置模式在特权用户模式执行命令Hostname(config-fs)#执行exit命令退回到特权用户模式·进行设备的文件系统的管理访问列表配置模式在全局配置模式下,执行ipaccess-liststandard命令或者ipaccess-listextended命令Hostname(config-std-nacl)#Hostname(config-ext-nacl)#执行exit命令退回到全局配置模式执行end命令退回到特权用户模式配置ACL访问列表,其任务包括:·配置标准访问列表·配置扩展访问列表2.2基础配置2.2.1配置主机名#configure terminal++进入全局模式++(config)#hostname SQYH-A ++设置主机名SQYH-A ++(config)#exit++退出全局模式++2.2.2配置账户(config)#user admin password0 admin ++配置用户admin,密码为admin ++ (config)#user admin privilege 15 ++配置用户admin的授权级别为15,0-15,默认为1 ++ 2.2.3配置登陆Telnet登陆#configure terminal++进入全局模式++(config)# line vty 0 4 ++进入vty配置模式++(config-line)#password 0 admin ++设置登陆密码为admin,交互模式下只能用明文++ (config-line)#login ++启用login密码认证++(config)#privilege level15 ++配置登陆用户权限级别,默认为1++(config-line)#exec-timeout 10 0 ++设置空闲超时时间为10分0秒,默认为5分钟++ Console登陆#configure terminal++进入全局模式++(config)# line con 0 ++进入vty配置模式++(config)#password 0 admin ++设置登陆密码为admin,交互模式下只能用明文++ (config-line)#login ++启用login密码认证++(config)#privilege level15 ++配置登陆用户权限级别,默认为1++(config-line)#exec-timeout 10 0 ++设置空闲超时时间为10分0秒,默认为5分钟++ 2.2.4配置Vlan#configure terminal++进入全局模式++(config)#vlan 3 ++创建vlan3,并进入vlan视图++(config-vlan3)#name hulian ++为vlan命名++(config-vlan3)#exit ++退出vlan视图++(config)#interface fastethernet 0/1 ++进入接口f0/1视图++(config-if-fastethernet0/1)#switchport mode access ++接口模式为access++(config-if-fastethernet0/1)#switchport access vlan 3 ++将物理接口划到vlan3++ (config)#interface vlan 3 ++进入vlan接口视图++(config-if-vlan3)#ip address 192.168.1.1 255.255.255.0 ++配置vlan接口IP地址++ (config-if-vlan3)#description hulianjiekou ++vlan接口描述++(config-if-vlan3)#no shutdown ++手动激活接口++2.2.5配置时区#configure terminal++进入全局模式++(config)#clock timezone BEIJING ++默认为UTC++(config)#exit#clock yy mm dd hh mm ss ++配置系统时间++2.3配置端口#configure terminal++进入全局模式++(config)#interface gigabitethernet0/1 ++进入物理接口Gi0/1++(config-if-gigabitethernet0/1)#description to-yinlian ++接口描述++(config-if-gigabitethernet0/1)#speed 100 ++手工指定接口速率,和对端保持一致++ (config-if-gigabitethernet0/1)#duplex ful l ++手工指定全双工模式,和对端保持一致++ (config-if-gigabitethernet0/1)#switchport access vlan2++将端口划入vlan 2++2.4配置Track#配置Track组1监控交换端口fastethernet 0/0状态(config)#track 1(config-track)#switchport fastethernet 0/0#配置Track组1监控接口gigabitethernet0网络层协议状态(config)#track 1(config-track)#interface gigabitethernet0 line-protocol#配置Track组1监控到网络10.1.1.0 255.255.255.0的路由可达性(config)#track 1(config-track)#ip-route 10.1.1.0 255.255.255.0#配置Track组1监控BFD会话,BFD会话接口为gigabitethernet0,对端IP地址为10.0.0.2,本端IP地址为10.0.0.1(config)#track 1(config-track)#bfd interface gigabitethernet0 remote-ip 10.0.0.2 local-ip 10.0.0.12.5配置MSTP#configure terminal++进入全局模式++(config)# spanning-tree enable++使能生成树协议++(config)# spanning-tree mst configuration++进入mst域配置视图++(config-mst-region)# region-name CEB ++配置mst域名为CEB++(config-mst-region)# revision-level 1 ++配置mst域的修订级别为1,缺省为0++ (config-mst-region)# instance 1 vlan 1-4094 ++配置vlan1-4094映射到生成树实例1++ (config-mst-region)# active configuration pending ++必须配置,激活mst域参数++ (config-mst-region)# exit(config)#spanning-tree mst instance 1 priority0 ++配置设备在生成树实例1中的网桥优先级为0,即指定为根网桥++2.6配置VRRP#configure terminal++进入全局模式++(config)#interface vlan 3++进入vlan接口视图++(config-if-vlan3)#ip address 192.168.1.252 255.255.255.0 ++配置vlan接口的实地址++ (config-if-vlan3)#vrrp 3 ip 192.168.1.254 ++vrrp组号为3,虚地址192.168.1.254++ (config-if-vlan3)#vrrp 3 priority 120 ++设置优先级为120(默认优先级为100),若优先级相同,则ip地址大的成为Master++(config-if-vlan3)#vrrp 3 preempt ++配置为抢占模式++(config-if-vlan3)#vrrp 3 track interface gigabitethernet 0 20 ++监视gigabitethernet 0,如果接口down掉,优先级减20(默认减10)++2.7配置Trunk#configure terminal++进入全局模式++(config)#interface fastethernet 0/1 ++进入接口视图++(config-if-fastethernet0/1)#switchport mode trunk ++手动指定接口类型为trunk++ (config-if-fastethernet0/1)#switchport trunk allowed vlan add10,20 ++允许vlan 10、vlan20数据通过,vlan号间以逗号间隔++(config-if-fastethernet0/1)#switchport trunk allowed vlan add21-30 ++允许vlan 21至vlan30共10个vlan的数据通过,vlan间以减号间隔++(config-if-fastethernet0/1)#switchport trunk allowed vlan all ++允许全部vlan数据++ (config-if-fastethernet0/1)#switchport trunk pvid vlan 1 ++指定pvid为vlan 1++2.8多接口link-aggregation#configure terminal++进入全局模式++(config)#link-aggregation 1 mode manual ++定义汇聚组1,配置为静态模式++ (config)#interface fastethernet 0/0-0/1 ++选中2个fa接口,进入接口配置视图++ (config-if-range)#link-aggregation 1 manual ++接口加入静态汇聚组1(汇聚组被定义为manual,则加入的接口也必须是manual) ++(config-if-range)## switchport mode trunk ++指定接口为trunk模式++(config-if-range)## switchport trunk allowed vlan add 1,10 ++允许vlan1、vlan10的数据通过汇聚组++(config-if-range)## switchport trunk pvid vlan 1 ++指定汇聚组pvid为vlan 1++ (config-if-range)#no shutdown++启用fa接口++2.9配置ACL#为标准acl 1添加描述字段(config)#access-lis t 1 remark Permit only one workstation through#为标准acl 1配置规则,允许源地址为192.168.1.1的IP报文通过(config)#access-list 1 permit host 192.168.1.1#为扩展acl 1001配置规则,允许192.168.1.0/24网段内的主机与192.168.2.0/24网段内主机的80端口建立连接(config)#access-list 1001 permit tcp 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255 eq 80#为扩展acl 3001配置规则,允许0001.7a00.0000/32网段内的主机与0001.7a01.0000/32网段内主机进行通信(config)#access-list3001 permit0001.7a00.0000 0000.0000.ffff 0001.7a01.0000 0000.0000.ffff#在接口gi 0上应用acl 1,用于对入方向报文进行过滤(config)#interface gigabitethernet 0(config-if-gigabitethernet0)#ip access-group1 in#在端口fa 0/1应用acl 1001,用于过滤端口出方向的转发报文(config)#interface fa 0/1(config-if-fastethernet0/1)#ip access-group 1001 out2.10配置路由2.10.1静态路由#configure terminal++进入全局模式++(config)#ip route 172.16.1.0 255.255.255.0 192.168.1.1 10++配置到达目的网段172.16.1.0/24的静态路由,下一跳为192.168.1.1,默认AD值为1++(config)#ip route 172.16.1.0 255.255.255.0 192.168.1.2 10++配置到达目的网段172.16.1.0/24的静态浮动路由,下一跳为192.168.1.2,配置AD值为10++#配置到达201.0.0.0/24网段的静态路由,并建立与bfd的联动(config)#ip route 201.0.0.0 255.255.255.0 gigabitethernet0 10.1.1.2(config)#ip route static bfd gigabitethernet0 10.1.1.22.10.2配置RIP(config)#router rip ++进入rip路由协议配置视图++(config-rip)#version2++启用协议版本2++(config-rip)#no auto-summary++禁用自动汇总++(config-rip)#distance 200 ++定义rip协议管理距离为200,默认为120++(config- rip)#network 10.0.0.0 ++在rip进程中宣告10.0.0.0/8网段++(config- rip)#network 192.168.1.0 ++在rip进程中宣告192.168.1.0/24网段++ (config- rip)#passive-interface default ++配置接口默认为passive,禁止向邻居发送广播报文,但不能阻止向静态邻居发送报文++(config- rip)#no passive-interface gigabitethernet 0 ++允许gi 0接口收发rip报文,即允许接口gi 0参与rip进程++(config- rip)#no passive-interface vlan 3 ++允许vlan 3接口收发rip报文++(config- rip)#bfd all-interfaces++所有接口启用bfd检测(config- rip)#redistribute ospf 1 route-map rip-ospf ++将进程ospf 1的路由重发布进rip 时应用route-map++2.10.3配置OSPF(config)#router ospf 1 ++启用OSPF进程1++(config-ospf)#router-id 192.168.1.1 ++指定本设备在进程中的route-id++(config-ospf)#network192.168.1.0 0.0.0.255 area0 ++在进程ospf 1区域0中宣告192.168.1.0/24网段++(config-ospf)#passive-interface default ++配置接口默认为passive,不收发ospf报文++ (config-ospf)#no passive-interface gigabitethernet 0 ++允许gi 0接口收发ospf报文++ (config-ospf)#no passive-interface vlan 3 ++允许vlan 3收发ospf报文++(config-ospf)#bfd all-interfaces++所有接口启用bfd检测(config-ospf)#default-information originate++在ospf的AS内泛洪外部默认路由++ (config-ospf)#redistribute rip route-map rip-ospf metric-type 1 ++将rip路由重发布进ospf进程时应用route-map,并定义路由为类型1(默认为类型2路由)++2.11管理配置2.11.1配置AAA(config)#aaa new-model ++启用AAA功能,默认关闭++(config)#aaa authentication login default radius tacacs local ++配置登陆认证方法列表,先后使用radius、tacacs和local三种方式进行认证++(config)#aaa authentication login CONSOLE none ++CONSOLE组中直接通过认证,后续在line console配置时调用++(config)#aaa authentication enable default radius tacacs local ++配置特权模式认证方法列表,先后使用radius、tacacs和local三种方式进行认证++(config)#aaa authorization config-commands ++启用命令授权功能++(config)#aaa authorization commands 15 default radius tacacs local #配置命令授权方法列表,使用radius、tacacs、local三种方法对最高的15级命令进行授权(config)#aaa authorization exec 15 default radius tacacs local #配置SHELL授权方法列表,使用radius、tacacs、local三种方法对最高的15级命令进行授权(config)#aaa authorization commands 15 CONSOLE none ++配置console授权,后续在line console配置时调用,其中CONSOLE是自定义的列表名++(config)#aaa accounting commands 15 default start-stop tacacs 配置使用tacacs对15级命令进行统计(config)#aaa accounting exec default start-stop tacacs #配置使用tacacs对SHELL会话进行统计2.11.2配置端口镜像配置本地SPAN会话1,开启端口fa0/1和fa0/2的镜像功能,监控入方向报文,指定镜像的转发端口为fa0/3(config)#monitor session 1 source interface fa 0/1,0/2 rx(config)#monitor session 1 destination interface fa 0/3配置RSPAN目的会话3,将VLAN 2所属设备上所有端口收到的携带VLAN标记为2的报文被当作镜像报文通过端口fa0/6转发(config)#monitor session 3 source remote vlan 2(config)#monitor session 3 destination interface fa 0/62.11.3文件管理#在全局模式下从ftp服务器copy文件到文件系统中#copy admin admin rp23-i-6.pck rp23-i-6.pck#在设备文件系统模式下从ftp服务器copy文件到文件系统中#(config-fs)#copy admin admin rp23-i-6.pck rp23-i-6.pck#在设备文件系统模式下将startup文件copy到ftp服务器#(config-fs)#copy startup admin admin startup.txt2.11.4Logging#configure terminal++进入全局模式++(config)#no logging enable++禁用日志功能,默认开启++(config)#no logging console++禁止日志信息输出到控制台,默认开启为7级++ (config)#logging buffer informational ++配置储存在内存中的日志级别大于等于6级,日志级别0---7,级别最高是0级;缺省开启,默认级别为5++(config)#logging 102400 ++Flash中日志文件默认容量,若容量已满,则新日志覆盖最旧的日志;文件容量是4096~字节++(config)#logging source-ip 192.168.1.101 ++指定将日志发送到服务器时的源地址,该地址必须是设备的某接口地址;默认为设备出接口地址++(config)#service timestamps log datetime localtime msec ++配置日志信息的时间戳++ (config)#service timestamps debug datetime localtime msec ++配置调制信息的时间戳++ 2.11.5配置SNMP(config)#snmp-server enable traps ++使能snmp的traps功能++(config)#snmp-server enable traps snmp authentication ++认证失败时发送trap报文++ (config)#snmp-server community CEB ro ++配置字符串CEB,权限为只读++ (config)#snmp-server community cebsnmp rw 10 ++配置字符串cebsnmp,权限为读写,只允许acl 10定义的ip进行访问++(config)#snmp-server location GD ++配置location字段++(config)#snmp-server host 10.1.1.1 ++定义snmp发送trap的目的服务器地址++2.11.6配置NTP(config)#ntp server 1.1.1.1 ++启用ntp客户端,server地址是1.1.1.1++(config)#ntp source Loopback0 ++配置Loop0作为ntp报文的源端口++2.11.7软件升级#(config-fs)#volume++升级前查看文件系统剩余空间++#sysupdate 2.0.0.1 rp23-i-6.4.0(21).pck image pass ++使用sysupdate升级主备主控卡的image程序,ftp的用户名/密码admin/pass++#reload ++升级成功后,重启设备;建议在重启后通过命令检查系统版本信息show system mpu ++3查询命令3.1查找MP命令➢对于不熟悉的命令,善于使用“空格”“问号”以搜索后续命令➢help 可作帮助命令3.2常用命令3.2.1命令查找show xxx ++xxx为后续命令,可用“?”查找++3.2.2查看配置信息show running-config ++查看当前的运行配置++show startup-config ++查看保存的启动配置++3.2.3查看路由配置#sh ip rip ++查看rip进程信息++#sh ip rip bfd-session ++查看rip的bfd信息++#sh ip rip interface ++查看rip进程下的接口状态和接口配置信息++#sh ip rip database ++查看rip进程的数据库信息++#show ip ospf interface ++查看参与OSPF路由协议的接口信息++#show ip ospf neighbor ++查看OSPF邻居状态++#show ip ospf route ++查看路由表中OSPF路由++#show ip ospf database ++查看OSPF链路状态数据库++3.2.4查看路由表show ip route ++查看所有路由++show ip route static ++查看静态路由++3.2.5查看VRRP状态show standbyshow standby brief3.2.6查看二层接口信息#show interface switchport#show interface switchport brief#show spanning-tree mst link-aggregation 1 ++查看汇聚组1的接口信息++ 3.2.7查看bfd信息#show bfd session#show bfd session3.2.8查看设备信息#show about ++查看设备硬件信息++#show environment ++查看设备系统温度++#show system fan ++查看设备风扇++#show system module brief ++查看设备模块信息++#show system power ++查看设备电源信息++#show cpu monitor ++查看设备cpu使用率++#show memory ++查看设备内存使用率++#show system mpu ++查看软件版本++3.2.9查看时间show clock3.2.10查看用户信息show users ++查看配置的用户信息++show privilege ++查看当前用户的级别++clear line con|vty xxx ++清除某个终端服务++3.2.11删除现有配置no xxx ++xxx为后续命令,可用“?”查找++。
maipu迈普路由器设置口令

maipu迈普路由器口令恢复
1关闭router,重开电源.
2利用break或ctrl+break进入诊断模式.
3用o/r 0x2142忽略启动配置文件,使用i命令启动路由器. 4ctrl+c退出设置对话,恢复配置,密码.寄存器值.
我的实践总结,跟网上的资料有细微差别:
1、关电,重启路由器一次(冷启动)
2、60秒内在超级终端界面显示连续##...时,同时按下Ctrl+break(强行中断)
3、在rommon1>提示符下输入confreg 0x2142
4、在rommon2>提示符下输入reset
5、路由器提示是否进入初始化界面,按NO
6、在route>提示符下输入enable(表示新路由器进入无口令等其他配置)
7、copy startup-config running-config
8、原路由器名>config term(进入配置模式)
9、enable secret 新密码
10、将所有端口no shut一下
11、config-register 0x2102 (将注册值复原)
12、Ctrl+Z退到特权模式下输入wr保存配置(或者用copy running-config startup-conf ig)
14、热启动reload(可以不进行此步操作)。
迈普路由器常用show命令

精心整理1.查看配置命令:sh run作用:查看路由器的配置2.查看路由表sh ip route作用查看路由器的路由表,如下gigaethernet3 unassigned DOWNswitchethernet5/0switchethernet5/2serial4/0ShenYangserial4/1qingyuanserial4/2Xinbinserial4/3 unassigned DOWNtDcacheUpd 0026a1e8 5ee99a0 250 0% ( 0) 0% ( 0)tTunnel 00397a48 55695d0 250 0% ( 0) 0% ( 0)tCGTask 00737b90 373e6f0 251 0%( 0) 0% ( 0)KERNEL 0% ( 0) 0% ( 0)INTERRUPT 0% ( 0) 0% ( 0)MP2824 Version InformationSystem ID : 00017ab776cdHardware Model : RM3B-MPU204-4GE with 256 MBytes DDR SDRAM, 64 MBytes flashHardware Version : 030(HotswapSupported)MPU CPLD Version : 002Monitor Version : 1.13 )(integrity)Software Image File :Last-Alarm: 0000Card-Port-Num: 0Card-SubSlot-Num: 2Power-INTF-Status: 001fPower-Card-Status: OnCard-Name: <NULL>Description: <NULL>Hardware-Information:HW-State: 0000PCB-Version: H03CPU-Idx: 00Status: 0000Core-Num: 0004Core-State:Core-Idx-00Core-Status: 0000Core-Utilization: 0%Core-Idx-01Core-Status: 0000Core-Utilization: 0%MEM-On-Card-Information: <1 MEMs>MEM-Idx: 00MEM-State:BytesFree bytesBytesAlloc bytesBlocksFree = 515 blocksBlocksAlloc = 3085 blocksMaxBlockSizeFree bytesDISK-Idx: 02Type: UnknownStatus: OfflineLast-Alarm: 0000CMM-Information:Hardware-Type: 0000Monitor-Version: 1.0.9 ---------------------------------------------------------------- STATISTICS: 1 IN, 0 OUT, 0 IERR, 0 OERRSystem Card Information(Mpu 0/0 - ONLINE)----------------------------------------------------------------Type:LGU_RM7A_MPU408_4GE_GEStatus: Start OkLast-Alarm: 0000Card-Port-Num: 4Card-SubSlot-Num: 0Power-INTF-Status: 0000Power-Card-Status: On----------------------------------------------------------------Description: <NULL>Hardware-Information:HW-State: 0000PCB-Version: H03CPLD-Version: 002Software-Information:Monitor-Version: 1.33 Power-RT-Infomation:Voltage-In: 10.49 V Temperature-Information:Core-Utilization: 0%Core-Idx-01Core-Status: 0000Core-Utilization: 0%Core-Idx-02Core-Status: 0000Core-Utilization: 0%Core-Idx-03Core-Status: 0000Core-Utilization: 0%13 blocksBlocksAlloc = 2443 blocksMaxBlockSizeFree bytes DISK-On-Card-Information: <3 DISKs>DISK-Idx: 00Type: FlashStatus: OnlineLast-Alarm: 0000DISK-State:Monitor-Version: 1.0.9---------------------------------------------------------------- STATISTICS: 1 IN, 0 OUT, 0 IERR, 0 OERR System Card Information(Mpu 1/0 - ONLINE)----------------------------------------------------------------Type:LGU_RM7A_MPU408_4GE_DCStatus: Start OkLast-Alarm: 0000Card-Port-Num: 1Card-SubSlot-Num: 0Power-INTF-Status: 0000Power-Card-Status: On---------------------------------------------------------------- STATISTICS: 1 IN, 0 OUT, 0 IERR, 0 OERR9 查看设备业务板卡信息sh syste lpu,类似于上面查看主控信息的命令,这里可以看到包括主控的所有板卡信息MSTP_LiaoNing#sh system lpuMSTP_LiaoNing#sh system lpuSystem Card Information(Lpu 0 - OFFLINE)----------------------------------------------------------------STATISTICS: 0 IN, 0 OUT, 0 IERR, 0 OERRSystem Card Information(Lpu 1 - OFFLINE)----------------------------------------------------------------STATISTICS: 0 IN, 0 OUT, 0 IERR, 0 OERRFPGA-Idx: 01Status: OnlineInfo-Struct:id = 0001type = 0000state = 00000000version = 001CMM-Information:Hardware-Type: 0000Monitor-Version: 1.0.9---------------------------------------------------------------- STATISTICS: 1 IN, 0 OUT, 0 IERR, 0 OERR System Card Information(Lpu 3 - ONLINE)----------------------------------------------------------------Type: LPU_RM7B_4GET4GEFHStatus: Start OkLast-Alarm: 0000Card-Port-Num: 8Card-SubSlot-Num: 0Monitor-Version: 1.0.9---------------------------------------------------------------- STATISTICS: 1 IN, 0 OUT, 0 IERR, 0 OERR System Card Information(Lpu 4 - ONLINE)----------------------------------------------------------------Type: LPU_RM7B_4GET4GEFHStatus: Start OkLast-Alarm: 0000Card-Port-Num: 8Card-SubSlot-Num: 0Power-INTF-Status: 0000Power-Card-Status: OnCard-Name: 4GT4GFDescription: <NULL>Hardware-Information:HW-State: 0000PCB-Version: H01CPLD-Version: 002 Power-RT-Infomation:System Card Information(Lpu 7 - OFFLINE)---------------------------------------------------------------- STATISTICS: 0 IN, 0 OUT, 0 IERR, 0 OERR MSTP_LiaoNing#10 查看电源模块sh system power如果显示normal代表正常11 查看风扇sh system fan如果显示normal代表正常。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
迈普配置命令集合
视图模式介绍:
普通视图router>
特权视图router# /在普通模式下输入enable
全局视图router(config)# /在特权模式下输入config t
接口视图router(config-if)# /在全局模式下输入int 接口名称例如int s0或int e0
路由协议视图router(config-route)# /在全局模式下输入router 动态路由协议名称
1、基本配置:
router>enable /进入特权模式
router#conf t /进入全局配置模式
router(config)# hostname xxx /设置设备名称就好像给我们的计算机起个名字
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 /进入控制口的服务模式
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 捆绑链路协议hdlc 或者ppp 思科缺省串口封装的链路层协议是HDLC所以在show run配置的时候接口上的配置没有,如果要封装为别的链路层协议例如PPP/FR/X25就是看到接口下的enca ppp或者enca fr
router(config)#int loopback /建立环回口(逻辑接口)模拟不同的本机网段
router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码给环回口
在物理接口上配置了ip地址后用no shut启用这个物理接口反之可以用shutdown管理性的关闭接口
3、路由配置:
(1)静态路由
router(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 /关闭自动汇总功能,rip 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)#variance 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协议----开放最短路径协议(OSPF)协议
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 /配置路由的id
router(config-router)#area xxx stub /配置xxx区域为末梢区域,加入这个区域的路由器全部要配置这个条命令
router(config-router)#area xxx 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 startup-config /命令与write效果一样
5、一般的常用命令
router(config-if)#exit
router(config)#
router(config-router)#exit
router(config)#
router(config-line)#exit
router(config)#
router(config)#exit
router#
exit命令/从接口、协议、line等视图模式下退回到全局配置模式,或从全局配置模式退回到特权模式
router(config-if)#end
router(config-router)#end
router(config-line)#end
router#
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 /查看当前运行配置
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信息和状态的小结, 列出接口的状态和全局参数。