Chinaunix首页 | 论坛 | 博客
  • 博客访问: 21816
  • 博文数量: 6
  • 博客积分: 1472
  • 博客等级: 上尉
  • 技术积分: 65
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-12 16:44
个人简介

无欲则刚

文章分类
文章存档

2013年(1)

2007年(3)

2006年(2)

我的朋友
最近访客

分类: 系统运维

2006-12-14 15:08:37

    路由器的基本配置

 

1 网(Ethernet 口:

# conf t

从终端配置路由器。

# int e0

指定E0口。

# ip addr ABCD XXXX

ABCD为以太网地址,XXXX为子网掩码。

# ip addr ABCD XXXX secondary

E0口同时支持两个地址类型。如果第一个

A类地址,则第二个为BC类地址。

# no shutdown

激活E0口。

# exit

2X.25的配置

# conf t

# int S0

指定S0.

# ip addr ABCD XXXX

ABCD为以太网S0IP地址,XXXX为子网掩码.

# encap X25-ABC

封装X.25协议。ABC指定X.25DTCDCE操作,缺省为DTE

# x25 addr ABCD

ABCDS0X.25端口地址,由邮电局提供。

# x25 map ip ABCD XXXX br

映射的X.25地址.ABCD为对方路由器(:S0)

IP地址,XXXX为对方路由器(:S0)X.25端口地址。

# x25 htc X

配置最高双向通道数.X的取值范围1-4095,

要根据邮电局实际提供的数字配置。

# x25 nvc X

配置虚电路数。X不可超过据邮电局实际

提供的数,否则,将影响数据的正常传输。

# exit

---- 3 线

# conf t

# int S2

指定S2口。

# ip addr ABCD XXXX

ABCDS2IP地址,XXXX为子网掩码。

# exit

4

# conf t

# int s0

# ip addr ABCD XXXX

ABCDS0IP地址,XXXX为子网掩码。

# encap frante_relay

封装frante_relay协议。

# no nrzi_encoding

NRZI=NO

# frame_relay lmi_type q933a

LMI使用Q933A标准.LMILocal management Interface)有3种:ANSIT1.617CCITTYQ933ACISCO特有的标准。

# fram-relay intf-typ ABC

ABC为帧中继设备类型,它们分别是DTE设备,DCE交换机或NNI(网络接点接口)支持。

# frame_relay interface_dlci 110 br

配置DLCI(数据链路连接标识符)

# frame-relay map ip ABCD XXXX broadcast

建立帧中继映射。ABCD为对方ip地址,XXXX为本地DLCI号,broadcast允许广播向前转发或更新路由。

# no shutdown

激活本端口.

# exit

---- 5

# conf t

# int s0.1 point-to-point

对应S0的子接口1,点对点方式。

# ip addr ABCD XXXX

ABCD为子口1IP地址,XXXX为子网掩码。

# frame-relay intreface-dlci 100 br

6

(1).配置备份主口

# conf t

# int s0

S0为主口.

# backup int asy 1

A1口为备份口.

# backup delay 0 1

延时1秒.

(2).配置虚拟接口

# conf t

# ip addr ABCD XXXX

ABCD为虚拟接口IP地址,XXXX为子网掩码。

# encap ppp

封装ppp协议.

# dialer in-band

激活随叫随拨功能.

# dialer idle-timeout 7200

# dialer map ip ABCD modem-script call broadcast 6225481 br 映射对应的拨号口.

ABCD为对方拨号口的ip地址,6225481为对应的电话号码。

# dialer_group 1 定义拨号组成员.

(3).配置防火墙

# dialer_list 1 pro ip permit

允许ip协议通过。

(4).配置连接口令

# user name ABCD pass XXXX

ABCD为对方主机名,XXXX为连接口令.

(5).配置拨号字符串

# conf t

# chat-script call ABORT BUSY ABORT ERROR"" atdt 6335481 TIMEOUT 45 "CONNECT"

6335481为对方电话号码。

6).配置拨号连接密码

# conf t

# username ROU1 pass XXXX

ROU1为对方路由器名,XXXX为连接密码。

(7).配置线路

# conf t

# line aux 0

# modem inout

MODEM双向传输。

# modem autoconfigure discovery

# transport input all

# rxspeed 51200

MODEM的收发速率为51200

# exit

7/异步口 (适用于2522

# conf t

# int s2

# ph asyn

配置S2为异步口.

# ph sync

配置S2为同步口.

8

# conf t

# router eigrp 20

使用EIGRP路由协议。常用的路由协议有RIPIGRPIS-IS等。

# passive-interface serial0

S0X.25相连,则输入本条指令。

# passive-interface serial1

S1X.25相连,则输入本条指令。

# network ABCD

ABCD为本机的以太网地址。

# network XXXX

XXXXS0ip地址。

# no auto-summary

# exit

9

# ip router ABCD XXXX YYYY 90

ABCD为对方路由器的以太网地址;XXXX为子网掩码.YYYY为对方对应的广域网端口地址。

# dialer-list 1 protocol ip permail

10

# copy run tftp

在硬盘上建立一个空文件且有读写权限,才能备份成功.

11

# copy tftp run

12

# copy run start

路由器的配置参数较多,可根据实际需要增减,

限于篇幅,本文仅给出了一般的常用配置。

---- 

 ---- 1. Ethernet 使 活, 口, No Shutdown

 ---- 2. 由( Ethernet 址), UNIX 行:router add defaule XXXX 1XXXX E0 址)。 由, 则, 讯。

 ---- 3. Ping Ethernet 口( 通:(1Ethetnet 活(2 上)、 广 口( 通: 由), 广 口( 通: 误)、 Ethernet 口( 通: 误)、 Ethernet 口( 通: 由)。

 ---- 4. 线 (X.25) 关( 由), UNIX 行:router add X.X.X.X Y.Y.Y.Y 1 X.X.X.X Ethernet 址;Y.Y.Y.Y 广 址。

 ---- 5. 使 Tracert 踪, 段。

WAN的配置

 Dial-on-demand routing(DDR)是用公共电话网提供了网络连接.通常的,广域网大多数用专线连接的,路由器连接到类似modemISDN TAs的数据终端DCE设备上,它们支持同步V.25bis协议,你可以用scriptsdialer命令设定拨号串.DDR比较适用于用户对数率要求不高,偶尔有数据传输或只是在特定时候传输数据,比如银行每晚传送报表等等情况下.当一个感兴趣的包到达路由器时,产生一个DDR请求.路由器发送呼叫建立信息给指定的串口的DCE设备.这个呼叫就把本地和远程的设备连接起来.一旦没有数据传输,空闲时间开始计时,超过设置的空闲时间,这一次连接终止.DDR现在都用静态路由来传输数据包,避免路由交换引起的DDR拨号.AppleTalk,Banyan VINES, CLNS, DECnet, IP, IPX, XNS可以通过DDR路由寻址.同步串口,异步串口和ISDN端口可以配置成到一个或多个目的地DDR连接.在配置DDR过程中,我们可以把一个或几个物理接口配置成一个逻辑拨号接口,它可以是同步V.25方式,同步DTR启动拨号或异步chat script方式.在端口配置模式下:

 

 

在一个端口上激活 Dial-on-demand routing dialer in-band

指定一个端口为拨号访问组 dialer-group group-number

指定一个单一电话号码 dialer string dial-string

断线前空闲等待时间 dialer idle-time seconds

定义一个或多个目的电话号码表 dialer map protocol net-hop-address dialer-string

限定传输的access-list表或特定协议 dialer-list dialer-group list access-list-number

dialer-list dialer-group protocol protocol-name {permit|deny|list acce ss-list-number}

其中dialer stringdialer map两条命令任选一,dialer string是在只有一个电话号码时用,dialer map是一个电话号码表.

详细配置说明请参阅下面"DDR Example"的实例.

 

配置拨号备份

 

拨号备份提供了一种保护,使得当广域网上主干线出现故障时,启动一条备份线路,使通信正常运转.

启动备份有两种情况:

主干线断掉

传输流量超过了定义的最大值

需作的定义如下:

在主干线路端口上设置它的备份端口 backup interface interface-name

定义备份负载 backup load {enable-threshold | never} {disable-load |never}

定义主干线updown的响应时间 backup delay {enable-delay | never) {disable-delay | never}

其中: enable-threshold --- 表示主干线超过总传输量的百分比,启动备份线路

disable-load --- 表示传输量减少百分之多少就断开备份线路.

enable-delay --- 表示主干线断开多长时间后,启动备份线路.

disable-delay --- 表示主干线又重新恢复多长时间后,断开备份线路.

帧中继是一种由ANSICCITT标准化的协议,它能为现今突发性业务流量(LAN互连及SNA业务)提供显著的性能价格优势.帧中继是客户端设备(CPE),诸如路由器或前端处理器,和一个向远程CPE发送数据的广域网之间的一种接口协议.它有以下几个特点:低时延,时延是指一个给定待发送帧穿过网络到达远程用户设备所用的时间.当网络时延增大时,性能会下降;尤其对于敏感协议(SNADECnet),所有帧被发送后必须等待应答的协议(Novell IPX),以及利用短交易式的应用.可靠性,在给定时延条件下,吞吐量随着网络的可靠性变化而变化,可靠性好,超时等待重发帧越少,吞吐量就会大大增加.更低的联网开销可预测性在许多网络环境中,SNA CICS,不仅要求时延低,而且需要可预测性.公平性。Cisco's Frame Relay目前支持IP,DECnet,AppleTalk, Xerox Network Service(XNS), Novell IPX, International Organization for Standards (ISO) Connectionless Network Service (CLNS), Banyan VINES, transparent bridging在帧中继中传输.

配置帧中继的工作表:

在一个端口上作帧中继打包

定义动态或静态的地址映射

定义LMI

配置帧中继交换虚电路

帧中继交换

监控帧中继连接

在一个端口上作帧中继打包

某一端口上配置帧中继打包走帧中继协议,global配置模式下:

指定走帧中继的端口并进入端口配置模式 interface serial number

指定帧中继打包方式 encapsulation frame-relay [ietf]

Cisco的帧中继与RFC 1490的打包方式一致,允许不同厂家的产品互相通信.当与其它厂家路由器连接时,请用IETF打包.

定义动态或静态的地址映射

动态地址映射

动态地址映射用帧中继的翻转ARP协议发送请求下一个希望到达的地址(next hopprotocol address)(假设知道DLCI),当有应答翻转ARP协议请求时,保存在address-to-DLCI映射表中,这张表就用来提供下一个希望到达的地址或出去的DLCI地址翻转ARP协议默认是打开的,故动态地址映射不需要做任何配置.

静态地址映射

一个静态地址映射是人为的指定下一个希望到达的地址(next hop protocol address)DLCI的对应关系.当指定了静态地址映射时,翻转ARP协议自动关闭.

建立静态地址映射表需完成:

定义一个端口或子端口的DLCI地址 frame-relay interface-dlci dlci

指定一个next hop protocol addressDLCI之间对应 frame-relay map protocol protocol-address dlci [broadcast] [ietf] [cisco]相应地,关键字protocol支持的协议:

IP---ip

DECnet---decnet

 

AppleTalk---appletalk

XNS---xns

Novell IPX---ipx

VINES---vines

ISO CLNS---clns

如果是一点对一点,可用interface-dlci命令,若是一点对多点则设定 frame-relay map 一系列的dlciip address 对应表.

定义LMII

Cisco IOS Release 11.2版本以上,支持本地管理接口LMI(Local managementInterface)自动识别,即由交换机端口决定LMI的类型.当然,我们也可以明确配置

LMI类型.

建立路由器间keepalive时间 frame-relay keepalive number

定义N391的间隔时间 frame-relay lmi-n391-dte keep-exchanges

配置帧中继交换虚电路

目前,访问帧中继网是56K45M数率,帧中继是在两个节点间建立面向连接的,包交换的虚电路.

在一个物理端口上配置SVCs

在子端口上配置SVCs

在一个帧中继端口上配置SVC操作

 

指定物理端口 interface serial number

如果需要,配置IP地址 ip address ip-address mask

在这个端口上配置帧中继打包 encapsulation frame-relay

在这个端口上激活帧中继SVC frame-relay svc

 

在子端口上配置SVCs

 

在主端口上指定一个子端口 interface serial number.subinterface-number {multipoint | point-to-point}

如果需要,配置IP地址 ip address ip-address mask

参阅下面"Configure subinterface Example"的例子.

 

帧中继交换

 

当一个帧中继网要通过IP网与另一个帧中继网互连,就要用到帧中继交换.IP

看作帧中继包的隧道通过去.

实现帧中继交换,配置如下:

把路由器作为帧中继交换机 frame-relay switching

在路由器上设置静态路由 frame-relay route in-dlci out-interface out-dlci

定义网络功能 frame-relay intf-type {dte| dce| nni}

请参阅"Frame Relay Switching Example"配置实例.

监控帧中继连接

EXEC模式下:

显示帧中继DLCILMI信息 show interface serial number

显示LMI状态 show frame-relay lmi [type number]

显示PVC状态 show frame-relay pvc [type number [dlci]]

显示配置静态路由 show frame-relay route

显示帧中继传输状态 show frame-relay traffic

3DDN

DDN(Digital Data Network)是一种点对点的同步数据通信链路.它支持PPP,SLIP,HDLCSDLC等链路层通信协议.允许IP, Novell IPX, Bridging,CLNS,AppleTalk,DECnet等多种上层协议在上面运行.

 

基本配置

压缩技术

E1端口配置

基本配置

 

进入指定端口 interface serial number

定义该端口IP地址 ip address ip-address mask

指定该端口打包方式 encapsulation {PPP| HDLC }

 

压缩技术

 

通常在串口中传输的数据是不压缩的,它允许数据包头在每次传输时正常交换,但每次将浪费带宽.目前支持的压缩有PPP,Frame Relay, X.25, TCP等等.

 

Cisco的压缩是通过软件完成的,将影响系统性能.故建议路由器CPU占用超过65%,就不要使用压缩.(show process cpu EXEC命令查看当前CPU使用情况)

 

TCP传输头压缩 ip tcp head-compression [passive]

X.25压缩 X25 compress

PPP压缩 ppp compress [predictir|stac]

 

: "passive"表示只有输入包是压缩时,输出包才压缩.

 

E1端口配置

 

Cisco 4500,4700,70007500系列里面均支持E1(2.048Mbps)数率的接口.每一个E1端口可以按时隙分成3064K数据线路和2路信号线路.3064K数据线路每一路均可以当作一条64K的专线.

 

在配置模式下,定义Controller E1 controller e1 slot/port

定义line code linecode {ami |hdb3}

定义字符帧 framing {crc4 |no-crc4}

定义E1 channel-group number timeslots range [speed {48| 56| 64}]

指定串口属于那一个channel-group interface serial slot/port:channel-group

:slot/port----是针对70007500系列的,故区分槽口号和端口号.

linecode----默认是HDB3.

framing----默认是crc4,要与电信局参数匹配.

channel-group----每个E1可以分成30channel-group,channel-group和时间槽对应起来.channel-group0-30,timeslots1-31.

interface serial----在定义完E1 channel-group,我们把group赋予成一个虚拟串口.

具体的请参阅"Channelized E1 Interface Example"实例.

4X.25

 

X.25配置完成如下工作:

设置X.25模式 encapsulation x25 [dte|dce]

设置最大虚电路数 x25 htc max-vc-number

设置X.121地址 x25 address x121-address

建立IP地址与X.121地址对应 x25 map ip ip-address x121-addres [broadcast]

htc----htc是最大的虚电路数,因为许多X.25交换机是从高到低建立虚电路的,max-vc-number不能超过申请的最大值.

请参阅"X.25 Example"的配置实例.

5HDLC:

HDLCCISCO路由器使用的缺省协议,一台新路由器在未指定封装协议时默认使用HDLC封装。

A.有关命令

端口设置:

任务

命令

设置HDLC封装

encapsulation hdlc

设置DCE端线路速度

clockrate speed

复位一个硬件接口

clear interface serial unit

显示接口状态

show interfaces serial [unit] 1

 :1.以下给出一个显示Cisco同步串口状态的例子.

 

Router#show interface serial 0

Serial 0 is up, line protocol is up

Hardware is MCI Serial

Internet address is 150.136.190.203, subnet mask is 255.255.255.0

MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255

Encapsulation HDLC, loopback not set, keepalive set (10 sec)

Last input 0:00:07, output 0:00:00, output hang never

Output queue 0/40, 0 drops; input queue 0/75, 0 drops

Five minute input rate 0 bits/sec, 0 packets/sec

Five minute output rate 0 bits/sec, 0 packets/sec

16263 packets input, 1347238 bytes, 0 no buffer

Received 13983 broadcasts, 0 runts, 0 giants

2 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 2 abort

22146 packets output, 2383680 bytes, 0 underruns

0 output errors, 0 collisions, 2 interface resets, 0 restarts

1 carrier transitions        


B.        举例:

设置如下:

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配置模式

controller {t1 | e1} number

选择帧类型

framing {crc4 | no-crc4}

选择line-code类型

linecode {ami | b8zs | hdb3}

建立逻辑通道组与时隙的映射

channel-group number timeslots range1

显示controllers接口状态

show controllers e1 [slot/port]2

: 1. 当链路为T1,channel-group编号为0-23, Timeslot范围1-24; 当链路为E1, channel-group编号为0-30, Timeslot范围1-31. 

2.使用show controllers e1观察controller状态,以下为帧类型为crc4controllers正常的状态.

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连接364K专线, 帧类型为NO-CRC4,非平衡链路,路由器具体设置如下:

 

shanxi#wri t

Building configuration...

Current configuration:

!

version 11.2

no service udp-small-servers

no service tcp-small-servers

!

hostname shanxi

!

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

6PPP:

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封装的串行线路上提供安全性认证。使用CHAPPAP认证,每个路由器通过名字来识别,可以防止未经授权的访问。

 

CHAPPAPRFC 1334上有详细的说明。

 

A.        有关命令

端口设置

任务

命令

设置PPP封装

encapsulation ppp1

设置认证方法

ppp authentication {chap | chap pap | pap chap | pap} [if-needed] [list-name | default] [callin]

指定口令

username name password secret

设置DCE端线路速度

clockrate speed

注:1、要使用CHAP/PAP必须使用PPP封装。在与非Cisco路由器连接时,一般采用PPP封装,其它厂家路由器一般不支持CiscoHDLC封装协议。 

2.        举例


路由器Router1Router2S0口均封装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

 

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

dialer string 8292

dialer-group 1

pulse-time 1

!

dialer-list 1 protocol ip permit

 

B)辅助口作拨号备份

 

Configuration for RouterA:

 

chat-script MYDIAL "" "atdt 8292" TIMEOUT 60 "CONNECT"

!

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)

 

 

Configuration for RouterA:

 

interface serial 0

encapsulation frame-relay

interface s 0.1 multipoint

ip address 11.10.11.1 255.255.255.0

frame-relay interface-dlci 41

frame-relay interface-dlci 42

 

Configuration for RouterC:

 

interface serial 0

encapsulation frame-relay

interface s 0.1 point-to-point

ip address 11.10.16.2 255.255.255.0

frame-relay interface-dlci 46

 

Configuration for RouterB:

 

interface serial 0

encapsulation frame-relay

interface s 0.1 multipoint

ip address 11.10.11.3 255.255.255.0

frame-relay interface-dlci 43

frame-relay interface-dlci 44

!

interface s 0.2 point-to-point

ip address 11.10.13.1 255.255.255.0

frame-relay interface-dlci 48

 

Frame Relay Switching Example

 

 

Configuration for RouterA:

 

frame-relay switching

!

int s 0

no ip address

frame-relay encapsulation

frame-relay route 167 tun0 43

frame-relay intf-type dce

!

int s 1

ip address 131.108.100.1 255.255.255.0

!

int tu 0

tunnel source serial 1

tunnel destination 131.108.13.2

 

Configuration for RouterB:

 

frame-relay switching

!

int s 0

no ip address

frame-relay encapsulation

frame-relay route 9 tun0 43

frame-relay intf-type dce

!

int s 1

ip address 131.108.13.2 255.255.255.0

!

int tu 0

tunnel source serial 1

tunnel destination 131.108.100.1

 

Channelized E1 Interface Example

 

假设是7500系列路由器,E1接口(MIP)在插槽4上面.一个channel-group可对应多个时间槽,本例中serial4/0:15*64Kbps的数率. 

Configuration for Router:

 

controller E1 0

framing NO-CRC4

channel-group 0 timeslots 1

channel-group 1 timeslots 2,7-9,20 speed 64

!

interface Serial4/0:0

ip address 16.217.30.2 255.255.255.252

encapsulation ppp

!

interface Serial4/0:1

ip address 16.205.30.5 255.255.255.252

 

X.25 Example

 

在配置X.25,为减少路由交换引起的呼叫,通常用静态路由.而当一对多情况下,

不在一个子网中用subinterface配置.

 

Configuration for Router:

 

interface serial 0

ip address 131.108.100.1 255.255.255.0

encapsulation x25

x25 address 041673226839

x25 htc 16

x25 map ip 131.108.100.2 041675222222

int s 0.1

ip address 131.108.101.1 255.255.255.0

x25 map ip 131.108.101.2 041674222222

!

ip route 131.108.100.0 255.255.255.0 131.108.100.2

ip route 131.108.101.0 255.255.255.0 131.108.101.2

路由协议设置

一、协议

   RIP(Routing information Protocol)是应用较早、使用较普遍的内部网关协议(Interior Gateway Protocol,简称IGP),适用于小型同类网络,是典型的距离向量(distance-vector)协议。文档见RFC1058RFC1723

   RIP通过广播UDP报文来交换路由信息,每30秒发送一次路由信息更新。RIP提供跳跃计数(hop count)作为尺度来衡量路由距离,跳跃计数是一个包到达目标所必须经过的路由器的数目。如果到相同目标有二个不等速或不同带宽的路由器,但跳跃计数相同,则RIP认为两个路由是等距离的。RIP最多支持的跳数为15,即在源和目的网间所要经过的最多路由器的数目为15,跳数16表示不可达。

1.        有关命令

任务

命令

指定使用RIP协议

router rip

指定RIP版本

version {1|2}1

指定与该路由器相连的网络

network network

注:1.CiscoRIP版本2支持验证、密钥管理、路由汇总、无类域间路由(CIDR)和变长子网掩码(VLSMs)

2.                             举例


Router1:

 

router rip

version 2

network 192.200.10.0

network 192.20.10.0

相关调试命令:

show ip protocol

show ip route

二、协议

    IGRP (Interior Gateway Routing Protocol)是一种动态距离向量路由协议,它由Cisco公司八十年代中期设计。使用组合用户配置尺度,包括延迟、带宽、可靠性和负载。

    缺省情况下,IGRP90秒发送一次路由更新广播,在3个更新周期内(270),没有从路由中的第一个路由器接收到更新,则宣布路由不可访问。在7个更新周期即630秒后,Cisco IOS 软件从路由表中清除路由。  

1.        有关命令 

任务 %

阅读(1923) | 评论(1) | 转发(0) |
0

上一篇:没有了

下一篇:中国最赚钱的行业

给主人留下些什么吧!~~