好文档 - 专业文书写作范文服务资料分享网站

路由器的基本配置

天下 分享 时间: 加入收藏 我要投稿 点赞

设置如下: Router1:

interface Serial0

ip address 192.200.10.1 255.255.255.0 clockrate 1000000 Router2:

interface Serial0

ip address 192.200.10.2 255.255.255.0 !

C. 举例使用E1线路实现多个64K专线连接. 相关命令: 任务 命令 controller {t1 | e1} number 进入controller配置模式 framing {crc4 | no-crc4} 选择帧类型 linecode {ami | b8zs | hdb3} 选择line-code类型 channel-group number timeslots range1 建立逻辑通道组与时隙的映射 show controllers e1 [slot/port]2 显示controllers接口状态 注: 1. 当链路为T1时,channel-group编号为0-23, Timeslot范围1-24; 当链路为E1时, channel-group编号为0-30, Timeslot范围1-31.

2.使用show controllers e1观察controller状态,以下为帧类型为crc4时controllers正常的状态. Router# show controllers e1 e1 0/0 is up.

Applique type is Channelized E1 - unbalanced

Framing is CRC4, Line Code is HDB3 No alarms detected. Data in current interval (725 seconds elapsed): 0 Line Code Violations, 0 Path Code Violations

0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins

0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs

Total Data (last 24 hours) 0 Line Code Violations, 0 Path Code Violations, 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins,

0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs

以下例子为E1连接3条64K专线, 帧类型为NO-CRC4,非平衡链路,路由器具体设置如下:

shanxi#wri t

Building configuration... Current configuration: !

version 11.2

no service udp-small-servers no service tcp-small-servers !

hostname shanxi !

11

enable secret 5 $1$XN08$Ttr8nfLoP9.2RgZhcBzkk/ enable password shanxi ! !

ip subnet-zero !

controller E1 0 framing NO-CRC4

channel-group 0 timeslots 1 channel-group 1 timeslots 2 channel-group 2 timeslots 3 !

interface Ethernet0

ip address 133.118.40.1 255.255.0.0 media-type 10BaseT !

interface Ethernet1 no ip address shutdown !

interface Serial0:0

ip address 202.119.96.1 255.255.255.252 no ip mroute-cache !

interface Serial0:1

ip address 202.119.96.5 255.255.255.252 no ip mroute-cache !

interface Serial0:2

ip address 202.119.96.9 255.255.255.252 no ip mroute-cache !

no ip classless

ip route 133.210.40.0 255.255.255.0 Serial0:0 ip route 133.210.41.0 255.255.255.0 Serial0:1 ip route 133.210.42.0 255.255.255.0 Serial0:2 !

line con 0 line aux 0 line vty 0 4

password shanxi login ! end

12

6、配置PPP:

PPP(Point-to-Point Protocol)是SLIP(Serial Line IP protocol)的继承者,它提供了跨过同步和异步电路实现路由器到路由器(router-to-router)和主机到网络(host-to-network)的连接。

CHAP(Challenge Handshake Authentication Protocol)和PAP(Password Authentication Protocol) (PAP)通常被用于在PPP封装的串行线路上提供安全性认证。使用CHAP和PAP认证,每个路由器通过名字来识别,可以防止未经授权的访问。

CHAP和PAP在RFC 1334上有详细的说明。

A. 有关命令 端口设置 任务 命令 encapsulation ppp1 设置PPP封装 ppp authentication {chap | chap pap | pap chap | 设置认证方法 pap} [if-needed] [list-name | default] [callin] username name password secret 指定口令 clockrate speed 设置DCE端线路速度 注:1、要使用CHAP/PAP必须使用PPP封装。在与非Cisco路由器连接时,一般采用PPP封装,其它厂家路由器一般不支持Cisco的HDLC封装协议。 2. 举例

路由器Router1和Router2的S0口均封装PPP协议,采用CHAP做认证,在Router1中应建立一个用户,以对端路由器主机名作为用户名,即用户名应为router2。同时在Router2中应建立一个用户,以对端路由器主机名作为用户名,即用户名应为router1。所建的这两用户的password必须相同。

设置如下: Router1:

hostname router1

username router2 password xxx interface Serial0

ip address 192.200.10.1 255.255.255.0 clockrate 1000000

ppp authentication chap !

Router2:

hostname router2

username router1 password xxx interface Serial0

ip address 192.200.10.2 255.255.255.0 ppp authentication chap

13

7、广域网配置实例

DDR Example

Dial Backup Example

Configure subinterface Example Frame Relay Switching Example Channelized E1 Interface Example X.25 Example DDR Example

例:

Configuration for RouterA:

ip route 131.108.29.0 131.108.126.2 ip route 131.108.1.0 131.108.126.2 dialer-list 1 protocol ip permit dialer-list 1 protocol ipx deny !

interface serial 0

ip address 131.108.126.1 255.255.255.0 dialer in-band dialer-group 1 !

dialer map ip 131.108.126.2 5551234 !

dialer idle-timeout 300

Dial Backup Example

A)同步V.25 bits方式

Configuration for RouterA:

interface Serial0:0 backup delay 0 10

backup interface Serial10

ip address 16.217.30.2 255.255.255.252 !

interface Serial10

ip address 16.30.16.81 255.255.255.0 encapsulation ppp dialer in-band

14

dialer string 8292 dialer-group 1 pulse-time 1 !

dialer-list 1 protocol ip permit

B)辅助口作拨号备份

Configuration for RouterA:

chat-script MYDIAL \!

interface Serial0 backup delay 0 0

backup interface Async1

ip address 16.3.1.1 255.255.255.0

encapsulation ppp !

interface Async1

ip address 16.3.2.1 255.255.255.0 encapsulation ppp keepalive 9

async default routing async dynamic address async dynamic routing async mode dedicated dialer in-band dialer string 8292 dialer-group 1 !

dialer-list 1 protocol ip permit !

line aux 0

script dialer MYDIAL modem InOut

transport output none stopbits 1

flowcontrol hardware speed 9600

Subinterface Example(Frame Relay)

15

路由器的基本配置

设置如下:Router1:interfaceSerial0ipaddress192.200.10.1255.255.255.0clockrate1000000Router2:interfaceSerial0ipaddress192.200.10.2255.255.255.0!
推荐度:
点击下载文档文档为doc格式
78jnl7s0l19lpyv24exf
领取福利

微信扫码领取福利

微信扫码分享