锐捷路由器命令大全

合集下载

锐捷路由器命令全集

锐捷路由器命令全集

锐捷路由器命令全集锐捷路由器命令全集一、基本配置命令1.登录命令1.1.登录路由器:login1.2.切换用户:su [用户名]1.3.修改用户密码:passwd2.接口配置命令2.1.查看接口信息:show interface2.2.配置接口IP地质:ip address [接口名称] [IP地质] [子网掩码]2.3.启用/禁用接口:shutdown / no shutdown [接口名称]2.4.配置接口描述:description [接口名称] [描述]3.静态路由配置命令3.1.添加静态路由:ip route [目标网络地质] [子网掩码] [下一跳地质]3.2.删除静态路由:no ip route [目标网络地质] [子网掩码] [下一跳地质]3.3.查看静态路由表:show ip route static4.动态路由配置命令4.1.启用/禁用动态路由:router ospf [进程号] / no router ospf [进程号]4.2.配置OSPF路由:network [网络地质] [子网掩码] area [区域号]4.3.查看OSPF邻居状态:show ip ospf neighbor5.NAT配置命令5.1.配置静态NAT:ip nat inside source static [内部地质] [外部地质]5.2.配置动态NAT:ip nat inside source list [访问控制列表] [外部地质池] overload5.3.查看NAT转换表:show ip nat translations6.VLAN配置命令6.1.创建VLAN:vlan database / vlan [VLAN号] name [VLAN名称]6.2.将接口加入VLAN:interface [接口名称] /switchport mode trunk / switchport mode access / switchport access vlan [VLAN号]6.3.查看VLAN配置信息:show vlan brief7.安全配置命令7.1.配置登录密码:enable password [密码]7.2.配置Telnet/SSH登录:line vty 0 [最小号] [最大号] / transport input telnet / transport input ssh7.3.配置访问控制列表:access-list [序号] permit [源地质] [目标地质] [协议]7.4.应用访问控制列表:interface [接口名称] / ip access-group [序号] in / out8.系统管理命令8.1.查看系统信息:show version8.2.配置系统时钟:clock set [时间]8.3.保存配置:write memory二、附件:无三、法律名词及注释:1.IP地质:Internet Protocol Address,互联网协议地质,用于唯一标识网络上的设备。

关于锐捷路由器配置命令

关于锐捷路由器配置命令

关于锐捷路由器配置命令,这些命令可能用的都不是很多,但是对于网络安全和性能来说很重要。

1. #Exit返回上一级操作模式2. #del flash:config.text删除配置文件(交换机及1700系列路由器)3. #erase startup-config删除配置文件(2500系列路由器)4. #write memory 或copy running-config startup-config 保存配置5. #Configure terminal 进入全局配置模式6. (config)# hostname routerA配置设备名称为routerA7.(config)#banner motd &配置每日提示信息&为终止符8. (config)# enable secret star或者:enable password star9.设置路由器的特权模式密码为star;secret 指密码以非明文显示,password指密码以明文显示10.锐捷路由器配置命令之查看信息11. #show running-config 查看当前生效的配置信息12. #show interface fastethernet 0/3查看F0/3端口信息13. #show interface serial 1/2 查看S1/2端口信息14. #show ip interface brief 查看端口信息15. #show version查看版本信息16.#show running-config 查看当前生效的配置信息17. #show controllers serial 1/2 查看该端口信息 , 用于R250118. #show ip route 查看路由表信息19. #show access-lists 1查看标准访问控制列表1的配置信息20.锐捷路由器配置命令之远程登陆(telnet)21. (config)# line vty 0 4 进入线路0~4的配置模式,4为连续线路最后一位的编号,线路为0~422. (conifg-line)#login23. (config-line)#password star配置远程登陆密码为star24. (config-line)#end返回上层25. 锐捷路由器配置命令之端口的基本配置26. (config)#Interface fastethernet 0/3 进入F0/3的端口配置模式27. (config)#interface range fa 0/1-2进入F01至F0/2的端口配置模式28. (config-if)#speed 10 配置端口速率为10M,可选10,100,auto29. (config-if)#duplex full配置端口为全双工模式,可选full(全双工),half(半双式),auto(自适应)30. (config-if)#no shutdown 开启该端口31. (config)# interface serial 1/2 进入端口S1/2的配置模式32. (config-if)# ip address 1.1.1.1 255.255.255.0 配置端口IP及掩码33.(config-if)# clock rate 64000 配置时钟频率(单位为K , 仅用于DCE端)34.(config-if)# bandwidth 512 配置端口带宽速率为512KB(单位为KB)35. (config-if)# no shutdown 开启该端口36. (config-if)#encapsulation PPP 定义封装类型为PPP,可选项:37. Frame-relay 帧中继38. Hdlc 高级数据链路控制协议39. lapb X.25的二层协议40. PPPPP点到点协议41. X25X.25协议42.锐捷路由器配置命令之路由协议43.(config)# ip route 172.16.1.0 255.255.255.0 172.16.2.1 配置静态路由44.注:172.16.1.0 255.255.255.0 为目标网络的网络号及子网掩码45. 172.16.2.1 为下一跳的地址,也可用接口表示,如ip route 172.16.1.0 255.255.255.0 serial 1/2(172.16.2.0所接的端口)46. (config)# router rip 开启RIP协议进程47.(config-router)# network 172.16.1.0 申明本设备的直连网段信息48. (config-router)# version 2 开启RIP V2,可选为version 1(RIPV1)、version 2(RIPV2)49. (config-router)# no auto-summary 关闭路由信息的自动汇总功能(只有在RIPV2支持)50. (config)# router ospf 开启OSPF路由协议进程(针对1762,无需使用进程ID)51. (config)# router ospf 1开启OSPF路由协议进程(针对2501,需要加OSPF进程ID)52. (config-router)# network 192.168.1.0 0.0.0.255 area 053.RA(config)#int serial054. RA(config-if)#ip address 172.16.2.1 255.255.255.0 secondary55. RB(config)#int serial056. RB(config-if)#ip address 172.16.2.2 255.255.255.0 secondary57.锐捷路由器配置命令之PAP58.路由器Ra为被验证方、Rb为验证方;两路由器用V.35 线连接(串口线),分别配置各端口的IP及时钟频率后:59. Rb(config)# username Ra password 0 star验证方配置被验证方的用户名,密码60. Rb(config)# intterface serial 1/2进入S1/2端口61. Rb(config-if)# encapsulation ppp 定义封装类型为PPP62. Rb(config-if)# ppp authentication pap PPP启用PAP认证方式63. Ra(config)# itnterface serial 1/2进入S1/2端口64.Ra(config-if)# encapsulation ppp 定义封装类型PPP65. Ra(config-if)# ppp pap sent-username Ra password 0 star 设置用户名为ra 密码为star,用于发送到验证方进行验证66. #debug ppp authentication67.锐捷路由器配置命令之被验证方配置68. Ra(config)# username Rb password 0 star以对方的主机名作为用户名,密码和对方的路由器一致69. Ra(config)# interface serial 1/2进入S1/2端口70. Ra(config-if)# encapsulation PPP 定义封装类型为PPP71. 锐捷路由器配置命令之验证方配置72. Rb(config)# username Ra password 0 star以对方的主机名作为用户名,密码和对方的路由器一致73. Rb(config)# interface serial 1/2进入S1/2端口74. Rb(config-if)# encapsulation PPP 定义封装类型为PPP75.Rb(config-if)# ppp authentication chapPPP启用CHAP方式验证76.锐捷网络交换机的配置命令集交换机>Enable 进入特权模式#Exit 返回上一级操作模式#End 返回到特权模式#write memory 或copy running-config startup-config 保存配置文件#del flash:config.text 删除配置文件(交换机及1700系列路由器)#erase startup-config 删除配置文件(2500系列路由器)#del flash:vlan.dat 删除Vlan配置信息(交换机)#Configure terminal 进入全局配置模式(config)# hostname switchA 配置设备名称为switchA(config)#banner motd & 配置每日提示信息 &为终止符(config)#enable secret level 1 0 star 配置远程登陆密码为star (config)#enable secret level 15 0star 配置特权密码为star Level 1为普通用户级别,可选为1~15,15为最高权限级别;0表示密码不加密(config)#enable services web-server 开启交换机WEB管理功能 Services 可选以下:web-server(WEB管理)、telnet-server(远程登陆)等查看信息#show running-config查看当前生效的配置信息 #show interface fastethernet 0/3查看F0/3端口信息 #show interface serial 1/2查看S1/2端口信息 #show interface查看所有端口信息#show ip interface brief 以简洁方式汇总查看所有端口信息#show ip interface查看所有端口信息#show version查看版本信息#show mac-address-table查看交换机当前MAC地址表信息#show running-config查看当前生效的配置信息#show vlan查看所有VLAN信息#show vlan id 10查看某一VLAN (如VLAN10)的信息#show interface fastethernet 0/1 switchport查看某一端口模式(如F 0/1) #show aggregateport 1 summary查看聚合端口AG1的信息#show spanning-tree查看生成树配置信息#show spanning-tree interface fastethernet 0/1查看该端口的生成树状态#show port-security查看交换机的端口安全配置信息#show port-security address查看地址安全绑定配置信息#show ip access-lists listname查看名为listname的列表的配置信息#show access-lists端口的基本配置(config)#Interface fastethernet 0/3 进入F0/3的端口配置模式(config)#interface range fa 0/1-2,0/5,0/7-9 进入F0/1、F0/2、F0/5、F0/7、F0/8、F0/9的端口配置模式(config-if)#speed 10 配置端口速率为10M,可选10,100,auto(config-if)#duplex full 配置端口为全双工模式,可选full(全双工),half(半双式),auto(自适应) (config-if)#no shutdown 开启该端口(config-if)#switchport access vlan 10 将该端口划入VLAN10中,用于VLAN(config-if)#switchport mode trunk 将该端口设为trunk模式,用于Tag vlan 可选模式为access , trunk(config-if)#port-group 1 将该端口划入聚合端口AG1中,用于聚合端口聚合端口的创建(config)# interface aggregateport 1 创建聚合接口AG1(config-if)# switchport mode trunk 配置并保证AG1为trunk 模式(config)#int f0/23-24 (config-if-range)#port-group 1 将端口(端口组)划入聚合端口AG1中生成树(config)#spanning-tree 开启生成树协议(config)#spanning-tree mode stp 指定生成树类型为stp 可选模式stp , rstp , mstp (config)#spanning-tree priority 4096 设置交换机的优先级为4096 , 优先级值小为高。

锐捷路由器配置命令大全(一)

锐捷路由器配置命令大全(一)

锐捷路由器配置命令大全(一)引言概述:锐捷路由器是一款常用于企业网络的设备,它具有强大的性能和丰富的功能。

本文将介绍锐捷路由器的配置命令大全,帮助用户更有效地管理和配置路由器。

正文:1. 硬件配置命令:a. 管理接口配置命令:用于配置路由器管理接口的IP地址、子网掩码、网关等参数。

b. 接口配置命令:用于配置路由器各个接口的类型、速率、全双工模式等参数。

c. VLAN配置命令:用于配置VLAN(虚拟局域网)并进行VLAN间的映射和绑定。

d. NAT配置命令:用于配置网络地址转换(NAT)功能,实现内网IP地址和公网IP地址的映射。

e. 静态路由配置命令:用于配置静态路由,指定路由器在转发数据包时的路径。

2. 动态路由配置命令:a. OSPF配置命令:用于配置开放最短路径优先(OSPF)协议,实现自治系统内路由的计算和传播。

b. BGP配置命令:用于配置边界网关协议(BGP),实现自治系统间的路由通告和选择。

c. RIP配置命令:用于配置路由信息协议(RIP),实现小型网络的路由选择。

d. EIGRP配置命令:用于配置增强内部网关路由协议(EIGRP),实现路由选择和距离矢量路由计算。

e. IS-IS配置命令:用于配置中间系统到中间系统(IS-IS)协议,实现自治系统内的路由传播。

3. 安全配置命令:a. 访问控制列表(ACL)配置命令:用于配置ACL,限制允许通过路由器的流量。

b. VPN配置命令:用于配置虚拟专用网络(VPN),实现远程接入和安全通信。

c. 防火墙配置命令:用于配置路由器上的防火墙策略,保护网络安全。

d. AAA配置命令:用于配置AAA(认证、授权、计费)功能,加强网络访问控制和管理。

e. 802.1X配置命令:用于配置IEEE 802.1X认证协议,提供网络用户的身份验证和访问控制。

4. 网络服务配置命令:a. DHCP配置命令:用于配置动态主机配置协议(DHCP)服务器,提供自动分配IP地址的功能。

锐捷交换机和路由器的命令大全

锐捷交换机和路由器的命令大全

锐捷交换机和路由器的命令大全交换机&路由器命令大全1. 交换机支持的命令:交换机基本状态:switch: ;ROM状态,路由器是rommon>hostname> ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname;设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令switch(config)#enable password xxa ;设置特权非密口令switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xxswitch#exit ;返回命令答案补充交换机VLAN设置:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2 switch(config-if)#switchport mode trunk ;设置为干线switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain答案补充设置发vtp域名switch(config)#vtp password;设置发vtp密码switch(config)#vtp mode server ;设置发vtp模式switch(config)#vtp mode client ;设置发vtp模式交换机设置IP地址:switch(config)#interface vlan 1 ;进入vlan 1switch(config-if)#ip address;设置IP地址switch(config)#ip default-gateway答案补充设置默认网关switch#dir flash: ;查看闪存交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息答案补充2. 路由器支持的命令:路由器显示命令:router#show run ;显示配置信息router#show interface ;显示接口信息router#show ip route ;显示路由信息router#show cdp nei ;显示邻居信息router#reload ;重新起动路由器口令设置:router>enable ;进入特权模式router#config terminal ;进入全局配置模式router(config)#hostname ;设置交换机的主机名答案补充router(config)#enable secret xxx ;设置特权加密口令router(config)#enable password xxb ;设置特权非密口令router(config)#line console 0 ;进入控制台口router(config-line)#line vty 0 4 ;进入虚拟终端router(config-line)#login ;要求口令验证router(config-line)#password xx ;设置登录口令xx router(config)#(Ctrl+z) ;返回特权模式router#exit ;返回命令路由器配置:router(config)#int s0/0 ;进入Serail接口router(config-if)#no shutdown ;激活当前接口router(config-if)#clock rate 64000 ;设置同步时钟router(config-if)#ip address;设置IP地址答案补充router(config-if)#ip addresssecond ;设置第二个IProuter(config-if)#int f0/0.1 ;进入子接口router(config-subif.1)#ip address;设置子接口IProuter(config-subif.1)#encapsulation dot1q;绑定vlan中继协议router(config)#config-register 0x2142 ;跳过配置文件router(config)#config-register 0x2102 ;正常使用配置文件router#reload ;重新引导答案补充路由器文件操作:router#copy running-config startup-config ;保存配置router#copy running-config tftp ;保存配置到tftprouter#copy startup-config tftp ;开机配置存到tftprouter#copy tftp flash: ;下传文件到flashrouter#copy tftp startup-config;下载配置文件ROM状态:Ctrl+Break ;进入ROM监控状态rommon>confreg 0x2142 ;跳过配置文件rommon>confreg 0x2102 ;恢复配置文件rommon>reset;重新引导答案补充rommon>copy xmodem: flash: ;从console传输文件rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IPrommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IPrommon>TFTP_FILE=c2600.bin ;指定下载的文件rommon>tftpdnld ;从tftp下载rommon>dir flash: ;查看闪存内容rommon>boot ;引导IOS静态路由:ip route;命令格式答案补充router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;静态路由举例router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例动态路由:router(config)#ip routing ;启动路由转发router(config)#router rip ;启动RIP路由协议。

锐捷基本命令大全

锐捷基本命令大全

>Enable‎进入特权模式‎#Exit 返回上一级操‎作模式#End 返回到特权模‎式#write memory‎或copy runnin‎g-config‎startu‎p-config‎保存配置文件‎#del flash:config‎.text 删除配置文件‎(交换机及17‎00系列路由‎器)#erase startu‎p-config‎删除配置文件‎(2500系列‎路由器)#del flash:vlan.dat 删除Vlan‎配置信息(交换机)#Config‎u re termin‎al进入全局配置‎模式(config‎)# hostna‎m e switch‎A配置设备名称‎为switc‎hA(config‎)#banner‎ motd & 配置每日提示‎信息&为终止符(config‎)#enable‎secret‎ l evel 1 0 star 配置远程登陆‎密码为sta‎r(config‎)#enable‎secret‎ l evel 15 0 star 配置特权密码‎为starLevel 1为普通用户‎级别,可选为1~15,15为最高权‎限级别;0表示密码不‎加密(config‎)#enable‎servic‎e s web-server‎开启交换机W‎EB管理功能‎Servic‎e s 可选以下:web-server‎(WEB管理)、telnet‎-server‎(远程登陆)等查看信息#show runnin‎g-config‎查看当前生效‎的配置信息#show interf‎a ce fastet‎h ernet‎ 0/3 查看F0/3端口信息#show interf‎a ce serial‎ 1/2 查看S1/2端口信息#show interf‎a ce 查看所有端口‎信息#show ip interf‎a ce brief 以简洁方式汇‎总查看所有端‎口信息#show ip interf‎a ce 查看所有端口‎信息#show versio‎n查看版本信息‎#show mac-addres‎s-table 查看交换机当‎前MA C地址‎表信息#show runnin‎g-config‎查看当前生效‎的配置信息#show vlan 查看所有VL‎A N信息#show vlan id 10 查看某一VL‎A N (如VLAN1‎0)的信息#show interf‎a ce fastet‎h ernet‎ 0/1 switch‎p ort 查看某一端口‎模式(如F 0/1)#show aggreg‎a tepor‎t 1 summar‎y查看聚合端口‎A G1的信息‎#show spanni‎n g-tree 查看生成树配‎置信息#show spanni‎n g-tree interf‎a ce fastet‎h ernet‎ 0/1 查看该端口的‎生成树状态#show port-securi‎t y 查看交换机的‎端口安全配置‎信息#show port-securi‎t y addres‎s查看地址安全‎绑定配置信息‎#show ip access‎-li sts listna‎me 查看名为li‎s tname‎的列表的配置‎信息#show access‎-l ists端口的基本配‎置(config‎)#Interf‎a ce fastet‎h ernet‎ 0/3 进入F0/3的端口配置‎模式(config‎)#interf‎a ce range fa 0/1-2,0/5,0/7-9 进入F0/1、F0/2、F0/5、F0/7、F0/8、F0/9的端口配置‎模式(config‎-i f)#speed 10 配置端口速率‎为10M,可选10,100,auto(config‎-i f)#duplex‎full 配置端口为全‎双工模式,可选full‎(全双工),half(半双式),auto(自适应)(config‎-i f)#no shutdo‎wn开启该端口(config‎-i f)#switch‎p ort access‎vlan 10 将该端口划入‎V LAN10‎中,用于VLAN‎(config‎-i f)#switch‎p ort mode trunk 将该端口设为‎t runk模‎式,用于Tag vlan可选模式为a‎c cess , trunk(config‎-i f)#port-group 1 将该端口划入‎聚合端口AG‎1中,用于聚合端口‎聚合端口的创‎建(config‎)# interf‎a ce aggreg‎a tepor‎t 1 创建聚合接口‎A G1(config‎-i f)# switch‎p ort mode trunk 配置并保证A‎G1为trunk 模式(config‎)#int f0/23-24(config‎-i f-range)#port-group 1 将端口(端口组)划入聚合端口‎A G1中生成树(config‎)#spanni‎n g-tree 开启生成树协‎议(config‎)#spanni‎n g-tree mode stp 指定生成树类‎型为stp可选模式st‎p , rstp , mstp(config‎)#spanni‎n g-tree priori‎t y 4096 设置交换机的‎优先级为40‎96 , 优先级值小为‎高。

锐捷路由器配置命令

锐捷路由器配置命令

锐捷路由器配置命令锐捷路由器配置命令本文档为锐捷路由器配置命令的详细说明,包括配置网络基本设置、构建静态路由、配置动态路由协议、设置访问控制列表等内容。

1·网络基本设置1·1 设置主机名命令:set hostname [hostname]说明:用于设置路由器的主机名。

1·2 设置管理口IP地质命令:set interface ip [interface] [ip_address/mask]说明:用于给指定接口设置IP地质。

1·3 设置网关命令:set ip route default [gateway]说明:用于配置默认网关。

2·静态路由配置2·1 添加静态路由命令:set ip route [destination_network] [mask] [nexthop]说明:用于手动添加静态路由。

2·2 删除静态路由命令:delete ip route [destination_network] [mask] [nexthop]说明:用于删除已配置的静态路由。

3·动态路由协议配置3·1 开启动态路由协议命令:router [protocol]说明:用于开启指定的动态路由协议。

3·2 配置邻居命令:set neighbor [interface] [ip_address]说明:用于配置与指定接口连接的邻居路由器的IP地质。

3·3 设置网络区域命令:set area [area_id]说明:用于设置本路由器所属的区域ID。

4·访问控制列表配置4·1 创建访问控制列表命令:access-list [acl_number] [permit/deny][source_address/mask] [destination_address/mask]说明:用于创建访问控制列表,并设置允许或禁止指定源地质和目的地质的流量通过。

锐捷路由器配置命令大全

锐捷路由器配置命令大全

锐捷路由器配置命令大全1、网络设置1.1 WAN口配置用于配置WAN口连接的参数,包括IP地质、子网掩码、网关、DNS服务器等。

配置命令示例:set interface wan0 address 192.168.1.100/24set interface wan0 gateway 192.168.1.1set interface wan0 primary-dns 8.8.8.8:::1.2 LAN口配置用于配置LAN口连接的参数,包括IP地质、子网掩码、DHCP 服务器等。

配置命令示例:set interface lan1 address 192.168:0.1/24set interface lan1 dhcp enable:::1.3 VLAN配置用于配置VLAN,将不同的LAN口划分成不同的虚拟网络。

配置命令示例:set vlan vlan1 ports allset vlan vlan2 ports lan1,lan2:::2、安全设置2.1 密码设置用于设置路由器登录密码和特权密码。

配置命令示例:set system login user admin password encrypted 123456 set system login enable-password encrypted 654321:::2.2 ACL配置用于设置访问控制列表,限制某些IP地质或端口的访问。

配置命令示例:set access-list 1 permit ip 192.168:0:0/24 anyset access-list 2 deny tcp any any eq 22:::3、路由配置3.1 静态路由用于设置静态路由,手动指定下一跳地质。

配置命令示例:set static-route 0:0:0:0/0 next-hop 192.168.1.1:::3.2 动态路由用于配置动态路由协议,如RIP、OSPF、BGP等。

精!锐捷路由器配置命令大全,有案例分析

精!锐捷路由器配置命令大全,有案例分析

精!锐捷路由器配置命令大全,有案例分析一、路由器基本配置命令由远程终端登录路由器Red-Giant>enable ——由用户模式进入特权模式Password:****** ——输入密码Red-Giant#configure ——由特权模式进入全局配置模式Configuring from terminal, memory, or network [terminal]? t ——输入t继续Red-Giant(config)#hostname Router ——修改路由器名称配置接口IP地址Router(config)#interface fastethernet 0 ——进入以太网口0接口模式Router(config-if)#ip address 192.168.1.1 255.255.255.0 ——为其配置IP地址Router(config-if)#no shutdown ——启用配置Router(config-if)#exit ——退至配置模式Router(config)#interface fastethernet 1 ——进入以太网口0接口模式Router(config-if)#ip address 192.168.2.1 255.255.255.0 ——为其配置IP地址Router(config-if)#no shutdown ——启用配置Router(config-if)#exit ——退至配置模式Router(config)#interface serial 0 ——进入Serial 0 接口模式Router(config-if)#ip address 192.168.3.1 255.255.255.0 ——为其配置IP地址Router(config-if)#no shutdown ——启用配置Router(config-if)#exit ——退至配置模式Router(config)#interface serial 1 ——进入 Serial 1 接口模式Router(config-if)#ip address 192.168.4.1 255.255.255.0 ——为其配置IP地址Router(config-if)#no shutdown ——启用配置Router(config-if)#end ——退至特权模式Router#write ——保存配置信息Router(config)#interface loopback 0 ——新建Loopback 0Router(config-if)#ip add 10.10.1.1 255.255.255.0 ——为其配置IP地址Router(config-if)#int loopback 1 ——新建Loopback 1Router(config-if)#ip add 10.10.2.1 255.255.255.0 ——为其配置IP地址Router(config-if)#end——退至特权模式查看路由器相关配置信息Router#show ip interface brief ——查看配置状态Router#show version ——显示路由器版本信息Router#show ip interface fastethernet 0 ——查看以太网口0接口配置状态Router#show running-config——显示当前运行的配置参数Router#show startup-config——显示 NVRAM中中配置参数的副本Router#copy running-config startup-config ——将当前运行的配置参数复制到NVRAMRouter#erase startup-config——清空NVRAM中的配置参数Router#reload——重新启动路由器配置console 登陆密码Router(config)#line console 0Router(config-line)#loginRouter(config-line)#password star配置VTY登陆密码Router(config)#line vty 0 4Router(config-line)#loginRouter(config-line)#password star配置特权模式登录密码Router(config)#enable password star——配置明文密码Router(config)#enable secret star——配置的密码不能与 password 密码相同二、路由器密码丢失的处理方法1.关闭路由器,重新登录超级终端,按默认方法设置;2.启动路由器,不停地按Ctrl+Pause Break,直至出现Boot:提示符,输入 Setup-Reg;Boot:Setup-Reg3.出现如下提示信息,按“ Y”回车确认:Do you wish to change the configuration?y/n[n]:4.出现提示如下信息,按“ Y”回车确认:Enable“bypass the system configure file”y/n[n]:5.出现提示如下信息,按“ N”回车确认:Enable“debug mode?”y/n[n]:6.出现提示如下信息,按“ N”回车确认:Enable“user break/abort enabled?”y/n[n]:7.出现提示如下信息,按“ N”回车确认:Change console speed?y/n[n]:8.出现提示如下信息,按“ N”回车确认:Do you wish to change the configuration?y/n[n]:9.出现提示符“Boot:”,输入Reset;Boot:reset10.出现提示如下信息,按“ N”回车确认:Would you like to enter the initial configuration dialog?[Yes]: 此时密码及路由器信息被清除,你就可以顺利进入路由器了⋯⋯可以归纳为“Setup-Reg,两个Y五个N,Reset”。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

锐捷路由器命令大全
2007-09-07 21:08
出现攻击时掉线时请用console链接路由,保存好如下命令的相关内容,用以分析:
1、show ver (版本信息)
2、show run (配置信息)
3、show arp (arp信息)
4、show interface (端口信息)
5、show ip nat trans (nat信息)
6、show ip nat stat
7、show ip nat statistics per-user (只要第1屏的信息)
8、show ip cache (只要第1屏的信息)
9、show ip nat statistics suspicious-pc 发送免费arp:
lh#conf t
Enter configuration commands, one per line. End with CNTL/Z.
lh(config)#int f 0/0(内网)
lh(config)#arp gr int 1
lh(config)#int f 1/0(外网)
lh(config)#arp gr int 1
lh(config)#end
lh#wr端口映射:
lh#conf t
Enter configuration commands, one per line. End with CNTL/Z.
lh(config)#ip nat source static tcp 192.168.3.99ip 80 219.128.102.110 80 permit-inside
lh(config)#end
lh#wr限制内网某机器不限速(192.168.2.80):
lh#conf t
Enter configuration commands, one per line. End with CNTL/Z.
lh(config)#ip nat translation rate-limit iprange 192.168.2.2 192.168.2.79 inbound 500 outbound 1000 lh(config)#ip nat translation rate-limit iprange 192.168.2.81 192.168.3.253 inbound 500 outbound 1000
lh(config)#end
lh#wr限制内网PC的链接线程数同限速:
lh#conf t
Enter configuration commands, one per line. End with CNTL/Z.
lh(config)#ip nat translation per-user 0.0.0.0 250
lh(config)#ip nat translation rate-limit default inbound 500 outbound 1000
lh(config)#end
lh#wr禁止公网访问IP
lh#conf t
Enter configuration commands, one per line. End with CNTL/Z.
lh(config)#access-list 3199 deny icmp any any echo
lh(config)#access-list 3199 deny tcp any any eq 135
lh(config)#access-list 3199 deny tcp any any eq 139
lh(config)#access-list 3199 deny udp any any eq netbios-ss
lh(config)#access-list 3199 deny tcp any any eq 445
lh(config)#access-list 3199 deny tcp any host 219.128.102.110 eq www
lh(config)#access-list 3199 permit ip any any
lh(config)#end
lh#wr禁止内网部分IP访问网关的
lh#conf t
Enter configuration commands, one per line. End with CNTL/Z.
lh(config)#webaccess-list 3198 deny tcp 192.168.2.1 192.168.2.100 host 192.168.3.254 eq www lh(config)#access-list 3198 permit ip any any
lh(config)#end
lh#wr禁止IP访问网络
lh#conf t
Enter configuration commands, one per line. End with CNTL/Z.
lh(config)#access-list 3001 deny ip host 202.96.128.166 any
lh(config)#access-list 3001 permit any
lh(config)#end lh#wr
arp绑定
lh#conf t
Enter configuration commands, one per line. End with CNTL/Z.
lh(config)#arp 192.168.3.1 0011.5b71.2869 arpa
lh(config)#end
lh#wr
取消arp绑定:
lh#conf t
Enter configuration commands, one per line. End with CNTL/Z.
lh(config)#no arp 192.168.3.1
lh(config)#end
lh#wr
防范DDOS攻击
lh#conf t
Enter configuration commands, one per line. End with CNTL/Z.
lh(config)#security anti-wan-attack level high
lh(config)#end
lh#wr
防范sysflood攻击
lh#conf t
Enter configuration commands, one per line. End with CNTL/Z.
lh(config)#access-list 10 permit host 192.168.3.254
lh(config)#int f 0/0
lh(config)#rate-limit input access-group 10 64000 3000 3000 conform-action transmit exceed-action drop
lh(config)#end
lh#wr
禁止机器上网
lh#conf t
Enter configuration commands, one per line. End with CNTL/Z.
lh(config)#acl 99 deny 192.168.1.2
lh(config)#acc 99 deny 192.168.1.10
lh(config)#acc 99 per any
lh(config)#end
lh#wr
时间同步配置
lh#conf t
Enter configuration commands, one per line. End with CNTL/Z.
lh(config)#sntp enable
lh(config)#sntp interval 60
lh(config)#sntp server 128.105.37.11
lh(config)#clock up
lh(config)#end
lh#wr
SNMP配置
lh#conf t
Enter configuration commands, one per line. End with CNTL/Z.
lh(config)#snmp-server location ShunDe
lh(config)#snmp-server host 192.168.2.252 version 2 mrtg
lh(config)#snmp-server enable traps snmp authentication
lh(config)#snmp-server community public ro
lh(config)#end
lh#wr
日志服务器配置
lh#conf t
Enter configuration commands, one per line. End with CNTL/Z. lh(config)#logging 219.128.1.3
lh(config)#end
lh#wr
现用配置
lh(config)#show run
Building configuration...。

相关文档
最新文档