一、实验拓扑:

 

二、网络结构:

R1 S1/2 192.168.1.1/24  lo 0 1.1.1.1/24

R2 S1/2 192.168.1.2/24  lo 0 2.2.2.2/24

R3 S1/2 192.168.1.3/24  lo 0 3.3.3.3/24

三、实验步骤

1、配置好模拟帧中继的路由器

frame-relay switching //将路由器模拟为帧中继交换机。

interface Serial1/0

 no ip address

 encapsulation frame-relay IETF //为接口封装帧中继。

 serial restart-delay 0

 clock rate 64000

 no frame-relay inverse-arp

 frame-relay intf-type dce//声明帧中继接口电缆类型。

 frame-relay route 102 interface Serial1/1 201

 frame-relay route 103 interface Serial1/2 301

//配置帧中继路由,102为进入接口的DLCI号,从S1/2DLCI 201发出去。

!

interface Serial1/1

 no ip address

 encapsulation frame-relay IETF

 serial restart-delay 0

 clock rate 64000

 no frame-relay inverse-arp

 frame-relay intf-type dce

 frame-relay route 201 interface Serial1/0 102

 frame-relay route 203 interface Serial1/2 302

!

interface Serial1/2

 no ip address

 encapsulation frame-relay IETF

 serial restart-delay 0

 clock rate 64000

 frame-relay intf-type dce

 frame-relay route 301 interface Serial1/0 103

 frame-relay route 302 interface Serial1/1 203

!

查看帧中继的DLCI配置路由表:

FR#   sh frame-relay route

Input Intf      Input Dlci      Output Intf     Output Dlci     Status

Serial1/0       102             Serial1/1       201             active

Serial1/0       103             Serial1/2       301             active

Serial1/1       201             Serial1/0       102             active

Serial1/1       203             Serial1/2       302             active

Serial1/2       301             Serial1/0       103             active

Serial1/2       302             Serial1/1       203             active

2、对各个路由器配置对应的DLCI并连通。

R1

interface Loopback0

 ip address 1.1.1.1 255.255.255.0

 ip ospf network point-to-point //Loopback口作为网段来发布。

 

interface Serial1/2

 ip address 192.168.1.1 255.255.255.0

 encapsulation frame-relay IETF

 ip ospf network non-broadcast  //设置接口为non-broadcast类型,其他路由器的帧中继接口也必需设置这些命令。

 serial restart-delay 0

 frame-relay map ip 192.168.1.2 102 //不加broadcast,这样就不能接收广播消息,hello包需要用neighbor命令转为单播

 frame-relay map ip 192.168.1.3 103

 no frame-relay inverse-arp

R2

interface Loopback0

 ip address 2.2.2.2 255.255.255.0

 ip ospf network point-to-point

 

interface Serial1/2

 ip address 192.168.1.2 255.255.255.0

 encapsulation frame-relay IETF

 ip ospf network non-broadcast

 serial restart-delay 0

 frame-relay map ip 192.168.1.1 201

 frame-relay map ip 192.168.1.3 203

 no frame-relay inverse-arp

R3

interface Loopback0

 ip address 3.3.3.3 255.255.255.0

 ip ospf network point-to-point

 

interface Serial1/2

 ip address 192.168.1.3 255.255.255.0

 encapsulation frame-relay IETF

 ip ospf network non-broadcast

 serial restart-delay 0

 frame-relay map ip 192.168.1.1 302

 frame-relay map ip 192.168.1.2 302

 no frame-relay inverse-arp

注意与帧中继相连各个接口配置的IP地址是同一个网段的,其实相当于一个局域网内。注意R1R2R3与帧中继相连的接口都必须基本同样的接口类型、封装类型,不然会pinjg不通。

3、为网络配置ospf协议。

R1(config)#router ospf 1          

R1(config-router)#neighbor 192.168.1.2

R1(config-router)#neighbor 192.168.1.3

由于现在配置的是全互联不支持广播的帧中继网络中,需要通过使用neighbor命令指定路由器的邻居网络宣告入ospf网络。

neighbor命令一般是在早期IOS不支持ip ospf network 命令才使用,不推荐。在FR环境中最好使用frame-relay inverse-arp ip ospf network 命令。