中国IT论坛's Archiver

漆金生 发表于 2009-1-8 15:46

理解FR第二集

一、        前言

上一集中,我们初步理解了FR,那现在就要从纯技术的角度来深度理解了。所以我们将从技术原理、配置实验和协议分析三个方面来学习。


二、        技术原理

FR最主要的两个部分就是LMI和反向ARP,这是建立连接进行数据通信的必要步骤。其中,反向ARP也可以用静态MAP来代替,就看场景需要什么了。

而对于FR的技术方面,重点就是理解LMI和反向ARP。其中,反向ARP最有意思,跟我们以太网中的ARP大有区别。

我们先看一下一般教材中的这个过程图:
[attach]3864[/attach]
[attach]3865[/attach]
从图上看,这个过程是非常简单的,首先当路由器启动并封装成FR后,便会向FR交换机查寻线路状态,并了解这边线路是否有激活,这里面,一来一往两个数据帧就可以了。当确认线路激活之后,反向ARP就会开始工作,来查寻这条VC上的对端都有谁在。两边如果都正常,那么建立好双方的映射关系,也只需要2个数据包就行了,非常简洁。

过程上面都非常清楚了,那么现在的问题,假如是个NBMA网络结构时,也就是说当我FR交换机的一个接口配置了两个DLCI时,那么路由器的状态查寻,会得到哪个DLCI呢?这个问题,就先留待做完实验来解答。


三、        配置实验

3.1、实验拓朴
[attach]3866[/attach]
拓朴比较简单,三个颜色代表三条VC,FR交换机由7200来摸拟,同时抓R1上S1/0的包,以备后面的学习和分析使用。至于为什么搞成一个环?其实就是为了好玩,请不要过度联想^_^。
3.2、配置
3.2.1、配置FR交换机,先确定交换机的交换表:
IN int        DLCI        OUT int        DLCI
S3/0        100        S3/2        300
S3/0        101        S3/1        201
S3/1        201        S3/0        101
S3/1        200        S3/2        301
S3/2        300        S3/0        100
S3/2        301        S3/1        200
跟据上面的交换表,进行如下配置:
Router(config)#host FR_SW   
FR_SW(config)#frame swit                   #启用FR SW
FR_SW(config)#frame switching
FR_SW(config)#int s3/0
FR_SW(config-if)#en frame                  #在接口上启用FR
FR_SW(config-if)#frame intf
FR_SW(config-if)#frame intf-type dce          #配置成DCE端,时钟频率可默认
FR_SW(config-if)#frame route 100 int s3/2 300   #配置交换表
FR_SW(config-if)#frame route 101 int s3/1 201
FR_SW(config-if)#no sh
FR_SW(config-if)#exit

FR_SW(config)#int s3/1
FR_SW(config-if)#en frame
FR_SW(config-if)#frame intf dce
FR_SW(config-if)#frame route 201 int s3/0 101
FR_SW(config-if)#frame route 200 int s3/2 301
FR_SW(config-if)#no sh
FR_SW(config-if)#exit


FR_SW(config)#int s3/2
FR_SW(config-if)#en frame
FR_SW(config-if)#frame intf dce
FR_SW(config-if)#frame route 300 int s3/0 100
FR_SW(config-if)#frame route 301 int s3/1 200
FR_SW(config-if)#no sh
FR_SW(config-if)#exit


FR_SW#sh frame route                              #检查交换表
Input Intf      Input Dlci      Output Intf     Output Dlci     Status
Serial3/0       100             Serial3/2       300             inactive
Serial3/0       101             Serial3/1       201             inactive
Serial3/1       200             Serial3/2       301             inactive
Serial3/1       201             Serial3/0       101             inactive
Serial3/2       300             Serial3/0       100             inactive
Serial3/2       301             Serial3/1       200             inactive
FR_SW#


FR_SW#sh int s3/0                               #检查接口状态
Serial3/0 is up, line protocol is down
  Hardware is M4T
  MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation FRAME-RELAY, crc 16, loopback not set
  Keepalive set (10 sec)
  Restart-Delay is 0 secs
  LMI enq sent  0, LMI stat recvd 0, LMI upd recvd 0
  LMI enq recvd 0, LMI stat sent  0, LMI upd sent  0, DCE LMI down
  LMI DLCI 1023  LMI type is CISCO  frame relay DCE
  FR SVC disabled, LAPF state down
  Broadcast queue 0/64, broadcasts sent/dropped 0/0, interface broadcasts 0
  Last input never, output 00:06:37, output hang never
  Last clearing of "show interface" counters 00:05:40
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: weighted fair


3.2.2、R1配置

Router(config)#host R1
R1(config)#int s1/0
R1(config-if)#ip add 192.168.20.1 255.255.255.0
R1(config-if)#enc
R1(config-if)#encapsulation frame
R1(config-if)#no sh                       #反向ARP默认开启
R1(config-if)#end

R1#sh frame pvc

PVC Statistics for interface Serial1/0 (Frame Relay DTE)

              Active     Inactive      Deleted       Static
  Local          0            2            0            0
  Switched       0            0            0            0
  Unused         0            0            0            0

DLCI = 100, DLCI USAGE = LOCAL, PVC STATUS = INACTIVE, INTERFACE = Serial1/0

  input pkts 0             output pkts 0            in bytes 0         
  out bytes 0              dropped pkts 0           in pkts dropped 0         
  out pkts dropped 0                out bytes dropped 0         
  in FECN pkts 0           in BECN pkts 0           out FECN pkts 0         
  out BECN pkts 0          in DE pkts 0             out DE pkts 0         
  out bcast pkts 0         out bcast bytes 0         
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
  pvc create time 00:01:04, last time pvc status changed 00:01:04
         
DLCI = 101, DLCI USAGE = LOCAL, PVC STATUS = INACTIVE, INTERFACE = Serial1/0

  input pkts 0             output pkts 0            in bytes 0         
  out bytes 0              dropped pkts 0           in pkts dropped 0         
  out pkts dropped 0                out bytes dropped 0         
  in FECN pkts 0           in BECN pkts 0           out FECN pkts 0         
  out BECN pkts 0          in DE pkts 0             out DE pkts 0         
  out bcast pkts 0         out bcast bytes 0         
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
  pvc create time 00:01:06, last time pvc status changed 00:01:06


R1#sh int s1/0
Serial1/0 is up, line protocol is up
  Hardware is M4T
  Internet address is 192.168.20.1/24
  MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation FRAME-RELAY, crc 16, loopback not set
  Keepalive set (10 sec)
  Restart-Delay is 0 secs
  LMI enq sent  15, LMI stat recvd 16, LMI upd recvd 0, DTE LMI up
  LMI enq recvd 0, LMI stat sent  0, LMI upd sent  0
  LMI DLCI 1023  LMI type is CISCO  frame relay DTE
  Broadcast queue 0/64, broadcasts sent/dropped 0/0, interface broadcasts 0
  Last input 00:00:06, output 00:00:06, output hang never
  Last clearing of "show interface" counters 00:02:45


其余二个路由器均按以上配置即可,不多说

那么如果我们把R3的接口配置成多点子接口呢?那是如何配置?如下:

R3(config)#int s1/0
R3(config-if)#encapsulation frame-relay
R3(config-if)#no frame inverse-arp
R3(config-if)#no sh
R3(config-if)#exit
R3(config)#int s1/0.1 multipoint
R3(config-subif)#ip add 192.168.20.3 255.255.255.0
R3(config-subif)#frame int 300
R3(config-subif)#frame int 301           #红色字体部分必须配置,不然可能得不到MAP
R3(config-subif)#frame inverse-arp


四、        协议分析

协议分析我们主要对状态查寻、反向ARP及数据传输三个方面分析。


因时间关系,协议分析部暂时不写了,但把数据包传上来供大家分析和学习,有什么问题再随时交流!!!

漆金生 发表于 2009-1-8 15:48

发现整理这东东真是个痛苦的事情,太花时间了~~~

简简单单结束一下,要进入下一个知识点了~~

数据包在附件中~

王少明 发表于 2009-1-14 21:22

PFPF 老大太强了吧你

漆金生 发表于 2009-1-17 16:05

[quote]原帖由 [i]王少明[/i] 于 2009-1-14 09:22 PM 发表 [url=http://www.jini.com.cn/bbs/redirect.php?goto=findpost&pid=109439&ptid=37606][img]http://www.jini.com.cn/bbs/images/common/back.gif[/img][/url]
PFPF 老大太强了吧你 [/quote]


师兄过奖了~~

多多指较呀~~

七夜之欣 发表于 2009-7-9 16:08

顶起。。。

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.