【班级】N10TH 【姓名】苟忠兴

【实验名称】OSPF点到多点网络中的帧中继配置

【实验拓扑图】

OSPF点到多点网络中的帧中继配置_OSPF

【实验原理】

如图所示:将路由器R5配置成帧中继交换机,R6、R7为路由器,均配置OSPF协议从而实现他们之间的联通,然后利用PC1和PC2进行测试。

【实验步骤】

R5

Router>enable

Router#conf t

Router(config)#hostname R5

R5(config)#no ip domain lookup

R5(config)#ip classless

R5(config)#ip subnet-zero

R5(config)#frame-relay switching ----------------------------#设置该路由器工作在转发模式

R5(config)#int s1/1

R5(config-if)#no ip address

R5(config-if)#bandwidth 2048 ----------------------------#设置端口带宽

R5(config-if)#encapsulation frame-relay ----------------------------#端口封装

R5(config-if)#no ip mroute-cache ----------------------------#数据转发时不缓存

R5(config-if)#clock rate 128000 ----------------------------#设置时钟频率

R5(config-if)#frame-relay lmi-type cisco ----------------------------#设置本地管理类型

R5(config-if)#frame-relay intf-type dce ----------------------------#切换该接口为DCE

R5(config-if)#frame-relay route 200 interface s1/2 100----------------------------#添加路由

R5(config-if)#no shut

R5(config-if)#exit

R5(config)#int s1/2

R5(config-if)#no ip address

R5(config-if)#bandwidth 2048

R5(config-if)#encapsulation frame-relay

R5(config-if)#clock rate 128000

R5(config-if)#frame-relay lmi-type cisco

R5(config-if)#frame-relay intf-type dce

R5(config-if)#frame-relay route 100 interface s1/1 200

R5(config-if)#no shut

R5(config-if)#end

R5#

R6

Router>enable

Router#conf t

Router(config)#no ip domain lookup

Router(config)#hostname R6

R6(config)#ip http server

R6(config)#ip classless

R6(config)#ip subnet-zero

R6(config)#int fa2/0

R6(config-if)#ip address 192.168.1.1 255.255.255.0

R6(config-if)#no shut

R6(config-if)#exit

R6(config)#int s1/0

R6(config-if)#encapsulation frame-relay ---------------------------#端口上进行封装

R6(config-if)#ip address 192.168.3.1 255.255.255.0

R6(config-if)#frame-relay interface-dlci 200 ------------------#设置本地电路号

R6(config-fr-dlci)#default

R6(config-if)#frame-relay lmi-type cisco

R6(config-if)#frame-relay map ip 192.168.3.2 200 broadcast ----#建立IP与DLCI的映射关系

R6(config-if)#no shut

R6(config-if)#exit

R6(config)#int lo1

R6(config-if)#ip address 201.0.0.1 255.0.0.0

R6(config-if)#exit

R6(config)#router ospf 100

R6(config-router)#neighbor 192.168.3.2 priority 1 ----------------#指定邻居同时指定优先级

R6(config-router)#network 192.168.3.0 0.0.0.255 area 0

R6(config-router)#network 192.168.1.0 0.0.0.255 area 0

R6(config-router)#network 201.0.0.0 0.255.255.255 area 0

R6(config-router)#exit

R6(config)#int s1/0

R6(config-if)#ip ospf network point-to-multipoint --------------------#OSPF网络类型

R6(config-if)#no shut

R6(config-if)#end

R6#

R7

Router>enable

Router#conf t

Router(config)#no ip domain lookup

Router(config)#hostname R7

R7(config)#ip http server

R7(config)#ip classless

R7(config)#ip subnet-zero

R7(config)#int fa2/0

R7(config-if)#ip address 192.168.2.1 255.255.255.0

R7(config-if)#no shut

R7(config-if)#exit

R7(config)#int s1/4

R7(config-if)#encapsulation frame-relay

R7(config-if)#ip address 192.168.3.2 255.255.255.0

R7(config-if)#frame-relay interface-dlci 100

R7(config-fr-dlci)#default

R7(config-if)#frame-relay lmi-type cisco

R7(config-if)#frame-relay map ip 192.168.3.1 100 broadcast

R7(config-if)#no shut

R7(config-if)#exit

R7(config)#int lo1

R7(config-if)#ip address 202.0.0.1 255.255.255.0

R7(config-if)#no shutdown

R7(config-if)#exit

R7(config)#router ospf 100

R7(config-router)#neighbor 192.168.3.1 priority 0

R7(config-router)#network 202.0.0.0 0.255.255.255 area 0

R7(config-router)#network 192.168.3.0 0.0.0.255 area 0

R7(config-router)#network 192.168.2.0 0.0.0.255 area 0

R7(config-router)#exit

R7(config)#int s1/4

R7(config-if)#ip ospf network point-to-multipoint

R7(config-if)#end

R7#

测试:

R6#show ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

ia - IS-IS inter area, * - candidate default, U - per-user static route

o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

202.0.0.0/32 is subnetted, 1 subnets

O 202.0.0.1 [110/65] via 192.168.3.2, 00:00:14, Serial1/0

C 192.168.1.0/24 is directly connected, FastEthernet2/0

O 192.168.2.0/24 [110/65] via 192.168.3.2, 00:00:14, Serial1/0

192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks

O 192.168.3.2/32 [110/64] via 192.168.3.2, 00:00:14, Serial1/0

C 192.168.3.0/24 is directly connected, Serial1/0

C 201.0.0.0/8 is directly connected, Loopback1

R6#ping 192.168.3.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.3.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 12/15/20 ms

R7#show ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

ia - IS-IS inter area, * - candidate default, U - per-user static route

o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

201.0.0.0/32 is subnetted, 1 subnets

O 201.0.0.1 [110/65] via 192.168.3.1, 00:00:17, Serial1/4

C 202.0.0.0/24 is directly connected, Loopback1

O 192.168.1.0/24 [110/65] via 192.168.3.1, 00:00:17, Serial1/4

C 192.168.2.0/24 is directly connected, FastEthernet2/0

192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks

O 192.168.3.1/32 [110/64] via 192.168.3.1, 00:00:17, Serial1/4

C 192.168.3.0/24 is directly connected, Serial1/4

R7#ping 192.168.3.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/12/20 ms

C:\>ping 192.168.2.2

Pinging 192.168.2.2 with 32 bytes of data:

Reply from 192.168.2.2: bytes=32 time=266ms TTL=126

Reply from 192.168.2.2: bytes=32 time=277ms TTL=126

Reply from 192.168.2.2: bytes=32 time=324ms TTL=126

Reply from 192.168.2.2: bytes=32 time=267ms TTL=126

Ping statistics for 192.168.2.2:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 266ms, Maximum = 324ms, Average = 283ms

OSPF点到多点网络中的帧中继配置_OSPF_02

OSPF点到多点网络中的帧中继配置_休闲_03

 

总结:技术和应用

帧中继技术:1)帧中继技术主要用于传递数据业务,它使用一组规程将数据信息以帧的形式(简称帧中继协议)有效地进行传送。它是广域网通信的一种方式。2)帧中继所使用的是逻辑连接,而不是物理连接,在一个物理连接上可复用多个逻辑连接(即可建立多条逻辑信道),可实现带宽的复用和动态分配。3)帧中继协议是对X.25协议的简化,因此处理效率很高,网络吞吐量高,通信时延低,帧中继用户的接入速率在64kbit/s至2Mbit/s,甚至可达到34Mbit/s。4)帧中继的帧信息长度远比X.25分组长度要长,最大帧长度可达1600字节/帧,适合于封装局域网的数据单元,适合传送突发业务(如压缩视频业务、WWW业务等)。 帧中继测试技术:当前主要的数据通信技术都基于分组交换技术,如分组交换、帧中继(FR)、交换型多兆比特数据业务(SMDS)、异步转移模式ATM)。起先中国不愿意发展“已落后”的帧中继技术,而是大力发展ATM技术,但随着时间的推移,帧中继技术才显示出它强大的生命力。因为,首先帧中继技术的接入技术比较成熟,实现较为简单,适于满足64kbit/s~2Mbit/s速率范围内的数据业务。而ATM的接入技术较为复杂,实现起来比较困难。其次,ATM设备与帧中继设备相比,价格昂贵,普通用户难以接受。所以,帧中继与ATM相辅相成,成为用户接入ATM的最佳机制。

帧中继网络是由许多帧中继交换机通过中继电路连接组成。目前,加拿大北电、新桥,美国朗讯、FORE等公司都能提供各种容量的帧中继交换机。一般来说,FR路由器(或FRAD)是放在离局域网相近的地方,路由器可以通过专线电路接到电信局的交换机。用户只要购买一个带帧中继封装功能的路由器(一般的路由器都支持),再申请一条接到电信局帧中继交换机的DDN专线电路或HDSL专线电路,就具备开通长途帧中继电路的条件

帧中继常见问题:

1. 什么是Frame Relay? Frame relay 是个广域网,它的前身是X.25。可以把位于远方的局域网连起来,提供电话、数据服务。Frame Relay价格便宜,配置简单,被广泛的被所有。 2. 为什么要有 Frame Relay? 互联网在1980年×××始,而电话早在1890就有了。要在相隔几千里的计算机间传送数据,最简单的方法就是把数据经电信网络传送。X.25做到了这件事,但由于早期的线路不稳定,X.25的做许多查错、改错的工作,以至于速度慢,操作复杂。到了1980年代,线路质量稳定,Frame Relay出现了,它不再查错,大为简化了数据传送的工作,提高了速度并提供多种服务。 3. 什么是PVC, DLCI? PVCs (permanent virtual circuit) 是用来传送端点间的数据。在两个端点之间的网络路径上,可以配置多个PVC, 各有不同的流量限制, 对客户而言,好像有几个专线一样。

一个PVC由几个DLCI组成,每个DLCI都是一跟网络连线上的VC (虚拟电路)

DLCI (Data Link Connection Identifiers) 标识的是通往端点处设备的虚电路, 虚电路连接的两台设备可以使用不同的 DLCI 值来引用同一个连接。

DLCI 值通常由帧中继服务提供商(例如电话公司)分配。帧中继 DLCI 仅具有本地意义,也就是说这些值本身在帧中继 WAN 中并不是唯一的。DLCI 在单链路之外没有意义。

4.什么是水平分割? 这是一个防止回路的路由规则:当路由器收到一个路由更新信息 (Update) 时,要把Update洪泛到其它邻居,但是洪泛的接口不能是受到此Update的体育馆接口。 5.帧中继 怎么会出现水平分割情况? 在一个 Non-Broadcast Multiple Access (NBMA) 的网络中 (例,Frame Relay,X.25), 若形成Hub-and-Spoke 拓扑,spoke 所发送的路由更新信息 (Uppdate) 被hub收到后, Hub不能把这个Update 从同一个接口转发到其他spoke, 使得路由器间不能分享路由信息、 6. 如何解决水平分割问题?

可以配置不同的子接口,各有自己的IP, DLCI. 当路由器从一个子接口收到Update, 可将其从另一个子接口转发出去,使得在Hub-and-Spoke中的其他spoke也能收到Update.

扩展阅读: