锐捷路由器的配置一、路由器基本配置命令/*由远程终端登录路由器*/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密码相同二、路由器密码丢失的处理方法01、关闭路由器,重新登录超级终端,按默认方法设置;02、启动路由器,不停地按Ctrl+Pause Break,直至出现Boot:提示符,输入Setup-Reg;Boot:Setup-Reg03、出现如下提示信息,按“Y”回车确认:Do you wish to change the configuration?y/n[n]:04、出现提示如下信息,按“Y”回车确认:Enable“bypass the system configure [n]:05、出现提示如下信息,按“N”回车确认:Enable“debug mode?”y/n[n]:06、出现提示如下信息,按“N”回车确认:Enable“user break/abort enabled?”y/n[n]:07、出现提示如下信息,按“N”回车确认:Change console speed?y/n[n]:08、出现提示如下信息,按“N”回车确认:Do you wish to change the configuration?y/n[n]:09、出现提示符“Boot:”,输入Reset;Boot:reset10、出现提示如下信息,按“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)。
具体配置如下:/*登录路由器并配置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.0 Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#int s0Router(config-if)#ip address 192.168.3.1 255.255.255.0 Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#Router(config)#int s1Router(config-if)#ip address 192.168.4.1 255.255.255.0 Router(config-if)#no shutdownRouter(config-if)#end/*新增Loopback1、Loopback2并为其配置IP地址*/Router#conConfiguring from terminal, memory, or network [terminal]? t Router(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.2 Router#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接下来,在另一台路由器上进行相应配置,并测试互连互通。