Chinaunix首页 | 论坛 | 博客
  • 博客访问: 496436
  • 博文数量: 77
  • 博客积分: 4011
  • 博客等级: 上校
  • 技术积分: 800
  • 用 户 组: 普通用户
  • 注册时间: 2004-10-10 09:53
个人简介

天天向上

文章分类

全部博文(77)

文章存档

2010年(1)

2008年(21)

2007年(39)

2006年(10)

2004年(6)

我的朋友

分类: 系统运维

2007-11-08 13:24:59

原创作品,转载请注明出处及保留此信息,可在网络传播以供学习交流之用,不得用于商业目的。
如内容有谬误之处,请一定帮我指出,我的联系方式如下:
by: 小虫子(xiaook) QQ:10516321 e-mail:xiaook@gmail.com  http://goat.cublog.cn
---------------
dynagen/dynamips实验-帧中继交换配置
 
三台路由器R1、R2、R3分别通过串行接口s1/0连接到帧中继交换机FRSwitch的S1/1、S1/2、S1/3接口
R1:s1/0 172.16.1.1/24---FR:s1/1
R2:s1/0 172.16.1.2/24---FR:s1/2
R3:s1/0 172.16.1.3/24---FR:s1/3
R1--FR  LMI:ANSI
R2--FR  LMI:CISCO
R3--FR  LMI:ANSI
R1--R2  DLCI:102---201
R1--R3  DLCI:102---301
R2--R1  DLCI:201---102
R2--R3  DLCI:203---302
R3--R1  DLCI:301---103
R3--R2  DLCI:302---203
 
实验拓朴图:
拓朴的dynagen配置文件:
 
autostart = false
[localhost]
port = 7200
udp = 10000
workingdir =   f:\lab\3640\ 
 
 [[3640]]
 image = f:\lab\c3640-telco-124-13.bin 
 ram = 64
 confreg = 0x2102 
 idlepc = 0x6100bf2c
 exec_area = 64
 mmap = false
 slot1 = NM-4T
#    [[router TermServ]]
# model=3640
# e0/0 = NIO_gen_eth:\Device\NPF_{1D0AB987-6689-4B46-8AF5-27395AD05B0B}
    [[router R1]]
 model=3640
# e0/0 = R3 e0/0
    [[router R2]]
 model=3640
# s1/2 = R3 s1/1
    [[router R3]]
 model=3640

    [[router FS]]
 model=3640
  s1/1 = R1 s1/0
  s1/2 = R2 S1/0
  s1/3 = R3 s1/0
基本术语:
PVC(永久虚电路):用于传输帧的端到端传输逻辑,使用DLCI号来标识其地址。
DLCI(数据链路连接标识):用于标识CPE到帧交换机间PVC的逻辑号码。只具有本地意义
LMI(本地管理接口):定义路由器与帧中继交换机间的信号类型。
NNI(网络到网络接口):用于帧中继交换机间的连接
 
帧中继交换机配置步骤:
1、启用帧中继交换
2、配置接口的LMI和帧中继接口类型
3、配置PVC,使用frame-relay route命令
 
 
帧中继交换机上的配置:
FRSwitch#sh run
Building configuration...
Current configuration : 1231 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname FRSwitch
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
frame-relay switching        #启用帧中继交换
!
!        
!
!
!
interface Serial1/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/1
 no ip address
 encapsulation frame-relay   #定义接口使用帧中继封装
 serial restart-delay 0
 clock rate 56000
 frame-relay lmi-type ansi   #定义LMI信号类型
 frame-relay intf-type dce   #定义帧中继接口类型
 frame-relay route 102 interface Serial1/2 201   #配置PVC
 frame-relay route 103 interface Serial1/3 301
!
interface Serial1/2
 no ip address
 encapsulation frame-relay
 serial restart-delay 0
 clock rate 96000
 frame-relay lmi-type cisco
 frame-relay intf-type dce
 frame-relay route 201 interface Serial1/1 102
 frame-relay route 203 interface Serial1/3 302
!
interface Serial1/3
 no ip address
 encapsulation frame-relay
 serial restart-delay 0
 clock rate 96000
 frame-relay lmi-type ansi
 frame-relay intf-type dce
 frame-relay route 301 interface Serial1/1 103
 frame-relay route 302 interface Serial1/2 203
!
ip http server
!
!
!
!
!
control-plane
!        
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end
 
连接到帧中继的路由器配置:
R1#sh run
Building configuration...
Current configuration : 789 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
!
!
!        
!
!
interface Serial1/0
 ip address 172.16.1.1 255.255.255.0  #配置接口IP地址
 encapsulation frame-relay          #启用帧中继封装
 serial restart-delay 0
 frame-relay map ip 172.16.1.3 103 broadcast  #定义远程IP与本地DLCI的对应关系
 frame-relay map ip 172.16.1.2 102 broadcast
!
interface Serial1/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
ip http server
!
!
!
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
 login
line aux 0
line vty 0 4
 login
!
end
R1#
 
我的排错心得(LMI的keeplive时间是10s,所以配置后可能会等一下才能生效):
1、PVC两端DLCI对应关系错误。
FRSwitch#show frame-relay route
Input Intf      Input Dlci      Output Intf     Output Dlci     Status
Serial1/1       102             Serial1/2       102             inactive
Serial1/1       103             Serial1/3       301             active
Serial1/2       201             Serial1/1       102             active
Serial1/2       203             Serial1/3       302             active
Serial1/3       301             Serial1/1       103             active
Serial1/3       302             Serial1/2       203             active
FRSwitch#
只有一条PVC为非活动状态。一眼看出是对应关系不正确。如上所示我们期望的是102-201
FRSwitch#sh run int s1/1
Building configuration...
Current configuration : 259 bytes
!
interface Serial1/1
 no ip address
 encapsulation frame-relay
 serial restart-delay 0
 clock rate 56000
 frame-relay lmi-type ansi
 frame-relay intf-type dce
 frame-relay route 102 interface Serial1/2 102  #应该将后面的一个102改成201
 frame-relay route 103 interface Serial1/3 301
end
2、路由器接口与帧中继交换相连接口LMI类型不匹配
FRSwitch#sh fr route
Input Intf      Input Dlci      Output Intf     Output Dlci     Status
Serial1/1       102             Serial1/2       201             active
Serial1/1       103             Serial1/3       301             active
Serial1/2       201             Serial1/1       102             inactive
Serial1/2       203             Serial1/3       302             active
Serial1/3       301             Serial1/1       103             inactive
Serial1/3       302             Serial1/2       203             active
FRSwitch#
所有去往s1/1接口的PVC建立不成功。
查看接口状态:
FRSwitch#sh int s1/1 | i 1/1
Serial1/1 is up, line protocol is down
查看接口的LMI类型:
FRSwitch#sh fr lmi int s1/1
LMI Statistics for interface Serial1/1 (Frame Relay DCE) LMI TYPE = ANSI
  Invalid Unnumbered info 0             Invalid Prot Disc 0
  Invalid dummy Call Ref 0              Invalid Msg Type 0
  Invalid Status Message 0              Invalid Lock Shift 0
  Invalid Information ID 0              Invalid Report IE Len 0
  Invalid Report Request 0              Invalid Keep IE Len 0
  Num Status Enq. Rcvd 733              Num Status msgs Sent 710
  Num Update Status Sent 0              Num St Enq. Timeouts 26
FRSwitch#
查找看R1 s1/0接口的lmi状态:
R1(config-if)#do show frame-relay lmi int s1/0
LMI Statistics for interface Serial1/0 (Frame Relay DTE) LMI TYPE = CISCO
  Invalid Unnumbered info 0             Invalid Prot Disc 0
  Invalid dummy Call Ref 0              Invalid Msg Type 0
  Invalid Status Message 0              Invalid Lock Shift 0
  Invalid Information ID 0              Invalid Report IE Len 0
  Invalid Report Request 0              Invalid Keep IE Len 0
  Num Status Enq. Sent 780              Num Status msgs Rcvd 710
  Num Update Status Rcvd 0              Num Status Timeouts 71
  Last Full Status Req 00:00:01         Last Full Status Rcvd 00:08:01
R1(config-if)#
查看并修R1 s1/1接口配置:
R1#show running-config interface serial 1/0
Building configuration...
Current configuration : 233 bytes
!
interface Serial1/0
 ip address 172.16.1.1 255.255.255.0
 encapsulation frame-relay
 serial restart-delay 0
 frame-relay map ip 172.16.1.3 103 broadcast
 frame-relay map ip 172.16.1.2 102 broadcast
 frame-relay lmi-type cisco  #no 掉这个配置
end
R1#
由于我们将帧中继交换接口类型配置为dce所以,与之相连的路由器可以自动设置lmi类型,不用手动配置。
FRSwitch#show running-config interface s1/1 | i intf
 frame-relay intf-type dce   #只有使用frame-relay switching 启用了帧中继交换,才能配置intf-type为dce
FRSwitch#
R1(config-if)#frame-relay intf-type dce
Must enable frame-relay switching to configure DCE/NNI
R1(config-if)#
 
3、帧中继交换端口,未指定lmi类型或intf dce或接口clock rate
FRSwitch#sh fr route
Input Intf      Input Dlci      Output Intf     Output Dlci     Status
Serial1/1       102             Serial1/2       201             inactive
Serial1/1       103             Serial1/3       301             inactive
Serial1/2       201             Serial1/1       102             inactive
Serial1/2       203             Serial1/3       302             active
Serial1/3       301             Serial1/1       103             inactive
Serial1/3       302             Serial1/2       203             active
所有出s1/1接口进出的PVC都不正常。查看接口配置,未配置lmi-type,intf类型
FRSwitch#sh run int s1/1
Building configuration...
Current configuration : 205 bytes
!
interface Serial1/1
 no ip address
 encapsulation frame-relay
 serial restart-delay 0
 clock rate 56000
 frame-relay route 102 interface Serial1/2 201
 frame-relay route 103 interface Serial1/3 301
end
FRSwitch#
 
4、DLCI只具有本地意义的理解:
FRSwitch#show frame-relay route
Input Intf      Input Dlci      Output Intf     Output Dlci     Status
Serial1/1       102             Serial1/2       102             inactive
只要配置正确,这种对应关系也可以成立的,由于DLCI只具有本地意义,所以R1到R2 PVC两端的DLCI号码相同是完全可以的。我们将两端DLCI都配置为102的配置:
FRSwitch#sh run int s1/1
Building configuration...
Current configuration : 259 bytes
!
interface Serial1/1
 no ip address
 encapsulation frame-relay
 serial restart-delay 0
 clock rate 56000
 frame-relay lmi-type ansi
 frame-relay intf-type dce
 frame-relay route 102 interface Serial1/2 102
 frame-relay route 103 interface Serial1/3 301
end
 
FRSwitch#
R2#sh run int s1/0
Building configuration...
Current configuration : 205 bytes
!
interface Serial1/0
 ip address 172.16.1.2 255.255.255.0
 encapsulation frame-relay
 serial restart-delay 0
 frame-relay map ip 172.16.1.3 203 broadcast
 frame-relay map ip 172.16.1.1 102 broadcast
end
R2#
 
FRSwitch#sh fr route
Input Intf      Input Dlci      Output Intf     Output Dlci     Status
Serial1/1       102             Serial1/2       102             active
 
这样就可以了。
 
附件内容是拓朴图,dynagen的net配置文件,及各路由器的配置文件:
文件: FRsw.rar
大小: 22KB
下载: 下载
阅读(2899) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~