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

第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、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 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信息和状态的小结, 列出接口的状态和全局参数。