锐捷路由器配置命令详解及实例(操作)

您所在的位置:网站首页 锐捷无线ac配置实例图 锐捷路由器配置命令详解及实例(操作)

锐捷路由器配置命令详解及实例(操作)

#锐捷路由器配置命令详解及实例(操作)| 来源: 网络整理| 查看: 265

新手用户可能会对路由器设置和使用感到困惑,本文锐捷路由器配置命令详解及实例 将为您提供适用于不同操作系统和设备的路由器设置指南和技巧。

一、路由器基本配置命令 由远程终端登录路由器 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 0 Router(config-if)#ip add 10.10.1.1 255.255.255.0 ——为其配置 IP地址 Router(config-if)#int loopback 1 ——新建 Loopback 1 Router(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 ——将当前运行的配置参数复制到 NVRAM Router#erase startup-config——清空 NVRAM中的配置参数 Router#reload——重新启动路由器 配置console 登陆密码 Router(config)#line console 0 Router(config-line)#login Router(config-line)#password star 配置VTY登陆密码 Router(config)#line vty 0 4 Router(config-line)#login Router(config-line)#password star 配置特权模式登录密码 Router(config)#enable password star——配置明文密码 Router(config)#enable secret star——配置的密码不能与 password密码相同 二、路由器密码丢失的处理方法 关闭路由器,重新登录超级终端,按默认方法设置; 启动路由器,不停地按 Ctrl+Pause Break,直至出现 Boot:提示符,输入 Setup-Reg; Boot:Setup-Reg 出现如下提示信息,按“ Y”回车确认: Do you wish to change the configuration?y/n[n]: 出现提示如下信息,按“ Y”回车确认: Enable“bypass the system configure file”y/n[n]: 出现提示如下信息,按“ N”回车确认: Enable“debug mode?”y/n[n]: 出现提示如下信息,按“ N”回车确认: Enable“user break/abort enabled?”y/n[n]: 出现提示如下信息,按“ N”回车确认: Change console speed?y/n[n]: 出现提示如下信息,按“ N”回车确认: Do you wish to change the configuration?y/n[n]: 出现提示符“Boot:”,输入Reset; Boot:reset 出现提示如下信息,按“ N”回车确认: Would you like to enter the initial configuration dialog?[Yes]:

此时密码及路由器信息被清除,你就可以顺利进入路由器了⋯⋯ 可以归纳为“Setup-Reg,两个Y五个N,Reset”。

三、静态路由配置

两台路由器,其中 :

Route A

S0:192.168.3.1 , F1:192.168.2.1 , Loopback 1:12.12.1.1 , Loopback 2:12.12.2.1

Route B

S0:192.168.3.2 , F0:192.168.5.1 , Loopback 3:10.10.1.1 , Loopback 4:10.10.2.1

具体配置如下:

无线路由器-网关-dtu

登录路由器并配置 F0、F1、S0、S1的IP地址Router>enPassword:Router#conConfiguring from terminal, memory, or network [terminal]? tRouter(config-if)#ip address 192.168.1.1 255.255.255.0Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#int f1Router(config-if)#ip address 192.168.2.1 255.255.255.0Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#int s0Router(config-if)#ip address 192.168.3.1 255.255.255.0Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#Router(config)#int s1Router(config-if)#ip address 192.168.4.1 255.255.255.0Router(config-if)#no shutdownRouter(config-if)#end新增Loopback1、Loopback2并为其配置 IP地址Router#conConfiguring from terminal, memory, or network [terminal]? tRouter(config)#int loopback 1Router(config-if)#ip address 12.12.1.1 255.255.255.0Router(config-if)#no shutdownRouter(config-if)#int loopback 2Router(config-if)#ip address 12.12.2.1 255.255.255.0Router(config-if)#no shutdownRouter(config-if)#exit指向下一跳 路由器Router(config)#ip route 10.10.1.0 255.255.255.0 192.168.3.2Router#show ip interface briefRouter#interface serial 0设置接口物理时钟频率Router#show control serial 0 ——查看Serial 0 接口型号Router#configureConfiguring from terminal, memory, or network [terminal]? tRouter(config)#int s0Router(config-if)#clock rate 64000 ——设置接口物理时钟频率为 64Kbps(DCE)Router(config-if)#no shutdownRouter(config)#end为Serial 0 封装PPP协议Router#configureConfiguring from terminal, memory, or network [terminal]? tRouter(config)#int s0Router(config-if)#enca ppp ——为Serial 0 封装PPP协议Router(config-if)#end测试路由配置信息及互联互通Router#show ip routeRouter#show ip interface briefRouter#show running-configRouter#Ping 192.168.3.1Router#Ping 192.168.3.2Router#Ping 10.10.1.1

接下来,在另一台路由器上进行相应配置,并测试互连互通。实验完成!!!

四、RIP动态路由配置

配置步骤:

启用RIP进程; 配置Network命令; 配置均载负衡(代价相等); 配置RIP发布初始度量值。 (一)配置命令 User Access Verification Password: Router>en Password: Router#con Configuring from terminal, memory, or network [terminal]? t Router(config)#router rip ——开启路由功能 Router(config-router)#version 2 ——升级至版本 2 Router(config-router)#no auto-summary ——在主类边界关闭自动汇总 Router(config-router)#network 192.168.1.0 ——配置 network命令 Router(config-router)#maximum-paths 4 ——配置均衡负载,缺省值为 4 Router(config-router)#default-metric 1 ——配置 RIP发布初始度量值,建议设置为 1 Router#show ip protocols ——验证RIP的配置 Router#show ip route ——显示路由表的信息 Router#clear ip route ——清除 IP路由表的信息 Router#debug ip rip ——在控制台显示 RIP的工作状态 Router#no debug all ——清除控制台显示 RIP的工作状态 (二)实验模型

拓朴图如下,用 RIP配置Route-A和Route-B之间的路由。

无线路由器-网关-dtu

配置F0、F1和S0端口IP地址User Access VerificationPassword:Router>enPassword:Router#conConfiguring from terminal, memory, or network [terminal]? tRouter(config)#int f0Router(config-if)#ip add 192.168.1.1 255.255.255.0Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#int f1Router(config-if)#ip add 192.168.2.1 255.255.255.0Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#int s0Router(config-if)#ip add 10.1.1.2 255.255.255.252Router(config-if)#no shutdownRouter(config-if)#exit开启RIP路由功能, 配置Network命令Router(config)#router ripRouter(config-router)#version 2Router(config-router)#no auto-summaryRouter(config-router)#network 10.1.1.0Router(config-router)#network 172.16.1.0Router(config-router)#network 172.16.2.0Router(config-router)#end查看配置信息,并测试配置正确与否Router#show ip routeRouter#show ip protocolsRouter#debug ip ripRouter#no debug allRouter#ping 192.168.1.1Router#ping 172.16.1.1Router#ping 172.16.2.1

接下来,在另一台路由器上进行相应配置,并测试互连互通。实验完成!!!

五、交换机、路由器配置步骤简要说明 (一)配置说明 首先连接好设备,确保连接正确; 用超级终端进入路由器,如果忘记了密码,请按密码破解方法清除设置,还原默认设置; 查看各接口配置信息, “Show ip interface brief ” ,看以前的配置有没有保存在机器里面,视情进行清除设置; 查看交换机、路由器的配置, “show running -config”; 按自己的需要给交换机和路由器命名,以便于区分, “hostname XXXXXX”; 按照配置需求对交换机、路由器的各接口进行配置,配置之前最好查看一下接口时钟类型: show controllers serial 0 clock rate 64000 no shutdown

记住:对接口配置完退至上一级时一定要保存配置,即 “no shutdown”;

配置完毕后,退至特权模式下,检查配置的正确与否。 (二)故障排除

如果两台路由器或交换机之间不能互连互通,请按照下列步骤进行检查:

检查Serial 接口的时钟频率; 检查同一介质上两个接口的 IP地址是不是在同一网段; 配置完接口后有没有 “no shutdwon”; 接口的封装协议是否相同; 有没有把 IP地址配置错误。 (三)三层交换机的有关说明 管理二层交换机的 IP地址只有一个生效,且为最后一个 “no shutdown”; 创建一个 Vlan,至少一个,为了冗余备份。 六、OSPF动态路由配置实验

配置步骤:

确定Area 0; 激活进程号; 反向掩码; 主干链路区域为 0。 User Access Verification Password: router>en Password: router#con Configuring from terminal, memory, or network [terminal]? t router(config)#int f0 router(config-if)#ip add 192.168.8.1 255.255.255.0 router(config-if)#no shutdown router(config-if)#exit router(config)#int f1 router(config-if)#ip add 192.168.2.1 255.255.255.0 router(config-if)#no shutdown router(config-if)#exit router(config)#int s0 router(config-if)#ip add 192.168.1.2 255.255.255.0 router(config-if)#no shutdown router(config-if)#exit router(config)#int s1 router(config-if)#ip add 192.168.3.2 255.255.255.0 router(config-if)#no shutdown router(config-if)#int loopback 4 router(config-if)#ip add 12.12.1.1 255.255.255.0 router(config-if)#no shutdown router(config-if)#int loopback 5 router(config-if)#ip add 12.12.2.1 255.255.255.0 router(config-if)#no shutdown router(config-if)#int loopback 6 router(config-if)#ip add 12.12.3.1 255.255.255.0 router(config-if)#no shutdown router(config-if)#exit 配置OSPF路由协议 router(config)#router ospf 11 ——激活进程号 router(config-router)#network 192.168.1.0 0.0.0.255 area 0 ——申明自治区域 0 router(config-router)#network 12.12.1.0 0.0.0.255 area 1 ——申明自治区域 1 router(config-router)#network 12.12.2.0 0.0.0.255 area 1 router(config-router)#network 12.12.3.0 0.0.0.255 area 1 router(config-router)#end router#show ip protocols router#show ip interface brief router#show ip ospf neighbor 七、访问控制列表 无线路由器-网关-dtu

Router#conConfiguring from terminal, memory, or network [terminal]? t让用户D不能远程登录 A Router(config)#access-list 103 deny tcp host 192.168.3.139 host 192.168.5.165eq 23Router(config)#access-list 103 permit ip any anyRouter(config)#int Serial 0Router(config-if)#ip access-group 103 out记用户A不能问网络,而用户 B能够访问网络 Router(config)#access-list 12 deny 192.168.5.0 0.0.0.255Router(config)#access-list 12 permit 192.168.6.0 0.0.0.255Router(config)#int serial 0Router(config-if)#ip access-group 12 outRouter(config-if)#no shutdownRouter(config-if)#endRouter#show ip access-list八、封装 PPP协议验证 User Access VerificationPassword:router>enPassword:router#conConfiguring from terminal, memory, or network [terminal]? tRed-Giant(config)#hostname RouterRouter(config)#enable password starRouter(config)#line vty 0 4Router(config-line)#loginRouter(config-line)#password starRouter(config-line)#endRouter#show ip in bRouter#conConfiguring from terminal, memory, or network [terminal]? tRouter(config)#int f0Router(config-if)#ip add 192.168.2.1 255.255.255.0Router(config-if)#no shRouter(config-if)#exitRouter(config)#int f1Router(config-if)#ip add 192.168.3.1 255.255.255.0Router(config-if)#no shuRouter(config)#int s0Router(config-if)#clock rate 64000Router(config-if)#ip add 192.168.1.1 255.255.255.0Router(config-if)#no shuRouter(config-if)#endRouter#conConfiguring from terminal, memory, or network [terminal]? tRouter(config)#router ospf 11Router(config-router)#network 192.168.1.0 0.0.0.255 area 0Router(config-router)#network 192.168.2.0 0.0.0.255 area 1Router(config-router)#network 192.168.3.0 0.0.0.255 area 1Router(config-router)#endRouter#show ip ospf neighborRouter#show ip interface briefRouter#ping 192.168.1.2Router#show ip protocolsRouter#show ip inter s0Router#ping 192.168.1.2Router#conConfiguring from terminal, memory, or network [terminal]? tRouter(config)#int loopback 1Router(config-if)#ip add 11.1.1.1 255.255.255.0Router(config-if)#no shRouter(config-if)#exitRouter(config)#in loopback 2Router(config-if)#ip add 11.1.2.1 255.255.255.0Router(config-if)#endRouter#show ip interface briefRouter#conConfiguring from terminal, memory, or network [terminal]? t将Serial 0 封装PPP Router(config)#int s0Router(config-if)#enca pppRouter(config-if)#exitRouter(config)#hostname AA(config)#username A password star ——此处用户名和密码由服务器端定义,用于客户端验证A(config)#int s0封装类型为 PAP A(config-if)#ppp authentication papA(config-if)#ppp pap sent-username A password star ——发送服务端提供的用户名和密码封装类型为 CHAP A(config-if)#ppp authentication chapA(config-if)#ppp chap hostname AA(config-if)#ppp chap password starA(config-if)#endA#show inter s0A#show run

~无线网络已经成为现代人不可或缺的一部分,而本文所提供的设置方法和技巧,可以让你更好地掌握网络,享受便利。路由器网关智能路由器怎么安装网件(NETGEAR)www.routerlogin.net/com无法访问(说明)TOTOLINK路由器WiFi密码忘记了怎么办?(细节)TOTOLINK路由器默认密码是多少?(技巧)192.168.1.1路由器设置(测试)TOTOLINK路由器192.168.0.1打不开解决办法(实用性)小米移动路由器好吗丰润达路由器怎么样(强力)TOTOLINK路由器WiFi设置教程(研究)小米路由器刷华硕小米千兆路由器网速变慢怎么打开家里的小米路由器华为双千兆路由器远程连接小米路由器的网络华为双wan口路由器小米路由器红米6小米路由器pro区别吗无法进入小米路由器192.168.1.1路由器设置(测试)http://192.168.1.1登录教学(教程)丰润达路由器怎么样(强力)飞鱼星路由器设置图解(窍门)网件r7000p设置详解(创新)g7飞行鱼路由器测评(研究)linksys路由器怎么设置(简介)华硕路由器设置步骤图解(策略)华硕路由器设置+测评(经验)linksys路由器怎么设置登录密码(实用)华硕路由器设置详解(改进)linksys路由器怎么设置(深入)mw313r路由器设置(聚焦)linksys路由器怎么设置(揭露)飞鱼星路由器怎么设置wifi(技巧)192.168.0.1登陆页面设置密码(评价)192.168.0.1路由器设置(探讨)我的ip地址是192.168.0.102.请问我的dns1和dns2是什么.


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3