锐捷路由器的配置(交换机、路由器配置步骤简要说明)

  • 格式:doc
  • 大小:156.50 KB
  • 文档页数:13

锐捷路由器的配置

一、路由器基本配置命令

/*由远程终端登录路由器*/

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密码相同

二、路由器密码丢失的处理方法

01、关闭路由器,重新登录超级终端,按默认方法设置;

02、启动路由器,不停地按Ctrl+Pause Break,直至出现Boot:提示符,输入Setup-Reg;

Boot:Setup-Reg

03、出现如下提示信息,按“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:reset

10、出现提示如下信息,按“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>en

Password:

Router#con

Configuring from terminal, memory, or network [terminal]? t

Router(config-if)#ip address 192.168.1.1 255.255.255.0 Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#int f1

Router(config-if)#ip address 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 address 192.168.3.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#

Router(config)#int s1

Router(config-if)#ip address 192.168.4.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#end

/*新增Loopback1、Loopback2并为其配置IP地址*/

Router#con

Configuring from terminal, memory, or network [terminal]? t

Router(config)#int loopback 1

Router(config-if)#ip address 12.12.1.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#int loopback 2

Router(config-if)#ip address 12.12.2.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#exit

/*指向下一跳 路由器*/

Router(config)#ip route 10.10.1.0 255.255.255.0 192.168.3.2

Router#show ip interface brief

Router#interface serial 0

/*设置接口物理时钟频率*/ Router#show control serial 0——查看Serial 0接口型号

Router#configure

Configuring from terminal, memory, or network [terminal]? t

Router(config)#int s0

Router(config-if)#clock rate 64000——设置接口物理时钟频率为64Kbps(DCE)

Router(config-if)#no shutdown

Router(config)#end

/*为Serial 0封装PPP协议*/

Router#configure

Configuring from terminal, memory, or network [terminal]? t

Router(config)#int s0

Router(config-if)#enca ppp——为Serial 0封装PPP协议

Router(config-if)#end

/*测试路由配置信息及互联互通*/

Router#show ip route

Router#show ip interface brief

Router#show running-config

Router#Ping 192.168.3.1

Router#Ping 192.168.3.2