实验描述:某公司分为一个总部和两个分部,属于典型的Hub-and-Spoke模式(中心-分支),总部通过ISP使用帧中继技术与两个分部相连

实验拓扑:

211411966.jpg

ISP内部网络的部署情况我们不得而知,为了这个实验,使用三台路由器来模拟帧中继交换机,下面模拟帧中继交换机的配置不是重点,但是可以更好的理解帧中继交换机是怎样利用DLCI来实现包交换的

FR-1

FR1>enable 

FR1#configure terminal 

FR1(config)#frame-relay switching 

 

 

FR1(config)#int serial 0/0

FR1(config-if)#encapsulation frame-relay

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

FR1(config-if)#clock rate 64000

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

FR1(config-if)#frame-relay route 100interface serial 0/1 101

FR1(config-if)#frame-relay route 200interface serial 0/2 201

FR1(config-if)#no shutdown

 

 

FR1(config-if)#int s0/1

FR1(config-if)#encapsulation frame-relay 

FR1(config-if)#frame-relay intf-typedce

FR1(config-if)#clock rate 64000

FR1(config-if)#frame-relay lmi-typecisco

FR1(config-if)#frame-relay route 101interface serial 0/0 100

FR1(config-if)#no shutdown

 

 

FR1(config-if)#int s0/2

FR1(config-if)#encapsulationframe-relay

FR1(config-if)#frame-relay intf-typedce

FR1(config-if)#clock rate 64000

FR1(config-if)#frame-relay lmi-typecisco

FR1(config-if)#frame-relay route 201interface serial 0/0 200

FR1(config-if)#no shutdown

 

 

 

 

FR-2

FR2>enable 

FR2#configure terminal 

FR2(config)#frame-relay switching

 

 

FR2(config)#interface s0/0

FR2(config-if)#encapsulation frame-relay 

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

FR2(config-if)#clock rate 64000

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

FR2(config-if)#frame-relay route 102 interfaceserial 0/1 101

FR2(config-if)#no shutdown

 

 

FR2(config-if)#interface s0/1

FR2(config-if)#encapsulation frame-relay

FR2(config-if)#frame-relay intf-type dte

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

FR2(config-if)#frame-relay route 101 interface serial0/0 102

FR2(config-if)#no shutdown

 

 

FR-3

FR3>enable 

FR3#configure terminal 

FR3(config)#frame-relay switching

 

 

FR3(config)#interface serial 0/0

FR3(config-if)#encapsulation frame-relay 

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

FR3(config-if)#clock rate 64000

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

FR3(config-if)#frame-relay route 202interface serial 0/2 201

FR3(config-if)#no shutdown

 

 

FR3(config-if)#interface serial 0/2

FR3(config-if)#encapsulationframe-relay

FR3(config-if)#frame-relay intf-typedte

FR3(config-if)#frame-relay lmi-typecisco

FR3(config-if)#frame-relay route 201interface serial 0/0 202

FR3(config-if)#no shutdown

frame-relayswitching

 

 

 

 

接下来才是我们要关心的配置,实现总部到两个分部的连接且两个连接属于不同的网段,那么就要用点到点的子接口

R1

R1>enable 

R1#configure terminal

R1(config)#interface serial 0/0

R1(config-if)#encapsulation frame-relay 

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

R1(config-if)#no shutdown

 

 

R1(config)#interface serial 0/0.1point-to-point 

R1(config-subif)#ip address 192.168.4.1255.255.255.0

R1(config-subif)#frame-relay interface-dlci100

 

 

R1(config-fr-dlci)#interface serial 0/0.2point-to-point 

R1(config-subif)#ip address 192.168.5.1255.255.255.0

R1(config-subif)#frame-relay interface-dlci200

 

配置内网IP和动态路由

R1(config-subif)#int e1/0

R1(config-if)#ip address 192.168.1.1255.255.255.0

R1(config-if)#ip ospf networkpoint-to-point

R1(config-if)#no shutdown

R1(config-if)#exit

R1(config)#router ospf 1

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

R1(config-router)#network 192.168.4.0 0.0.0.255area 0

R1(config-router)#network 192.168.5.0 0.0.0.255area 0

 

 

R2

R2>ena

R2#configureterminal 

R2(config)#interface s0/0

R2(config-if)#encapsulation frame-relay 

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

R2(config-if)#no shutdown

R2(config-if)#exit

 

 

R2(config)#interface serial 0/0.1point-to-point 

R2(config-subif)#ip address 192.168.4.2255.255.255.0

R2(config-subif)#frame-relay interface-dlci102

 

 

R2(config-if)#int e1/0

R2(config-if)#ip address 192.168.2.1255.255.255.0

R2(config-if)#no shutdown 

R2(config-if)#exit

R2(config)#router ospf 1

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

R2(config-router)#network 192.168.4.0 0.0.0.255area 0

 

 

R3

R3>enable 

R3#configure terminal 

R3(config)#interface serial 0/0

R3(config-if)#encapsulation frame-relay 

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

R3(config-if)#no shutdown

R3(config-if)#exit

 

 

R3(config)#interface serial 0/0.1point-to-point 

R3(config-subif)#ip address 192.168.5.2255.255.255.0

R3(config-subif)#frame-relay interface-dlci202

 

 

R3(config-if)#int e1/0

R3(config-if)#ip address 192.168.3.1255.255.255.0

R3(config-if)#no shutdown 

R3(config-if)#exit

R3(config)#router ospf 1

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

R3(config-router)#network 192.168.5.0 0.0.0.255area 0

 

 

 

验证三台连接总部和分部的路由器上的路由信息

211303587.jpg

211315868.jpg

211320694.jpg

路由的学习可以很好的完成

 

 

 

 

接下来不妨看一下ISP的帧中继交换机上的PVC,但这并不是我们要关心的重点,只是学习,了解其工作原理

211325204.jpg

211334507.jpg

211343879.jpg

可以对比拓扑看一下,帧中继交换机对比接收报文所携带的DLIC值和本地的状态表,把数据包的DLCI值更改后发往下一个帧中继交换机

 

 

查看一下总部的PC是否能与分部的PC通信

211404562.jpg