Building a Frame Relay Switch in The Lab.

As part of Cisco learning studies Frame Relay is used to simulate WAN topologies. While in the real world it is unlikely to be used as many new technologies such as MPLS and Metro Ethernet are taking over the WAN connections world, it is still a useful way of understanding how point to point or point to multipoint WAN connections work.

To create a switch in the lab you just need a Cisco Router with multiple serial interfaces. I recommend getting something like a Cisco 2521 or 2522 depending on whether you wish to create a 4 port or 8 port switch. These can be picked up on eBay at very reasonable prices! For this demo I am using a Cisco 2521 running IOS 11.2 which was saved from the skip. Before we begin we need to wipe any configuration off the router by running “erase startup-config” and then  reload it with the command “reload”. Once the router comes up say no to any startup configuration help.

First step is to enable Frame Relay Switching using the command “frame-relay switching” – this enables the feature on the router, just like you enable routing with “ip routing”.

Next we need to go to each serial interface we want to use and setup its basic settings. Firstly setup the clockrate to a speed of your preference, this speed will also depend on the type of serial interface your router has. Some ports might allow a clockrate of 2000000 others may only allow 115200. Next we also need to set up the encapsulation of the interface to be frame relay. So under each interface setup the following commands. The final command will tell frame relay that the DCE end of the cable will be attached to the router.

clockrate 2000000
encapsulation frame-relay
frame-relay intf-type dce

 Next we need to setup the DLCI routes for each interface. I setup the DLCI numbers as follows: 102 which means interface 1 to interface 2 or 304 which interface 3 to interface 4. Remember that DLCI’s are locally significant and can be different on each side. So between interface 1 and 2 and vice versa I’d create the DLCI’s as 102 and 201.

You maybe fine with 1 set of DLCI’s but on my setup I also did the same but with the number 2 in the middle which gave me 2 paths between each router. The reason I do this is if I ever want to do a lab where a router has 2 redundant point to point links connected to it, I can just use the alternative DLCIs. In fact I never remove the frame relay switch and cables from my lab, if I am doing a lab purely based on point to point networks I will still use the frame relay switch to emulate the point to point links. This way my lab is quick to reuse and never requires re-cabling between scenarios.

To create the routes we use the command “frame-relay route <source DLCI>interface <serial x> <destination DLCI>”, for example “frame-relay route 102 interface Serial1 201″

Here is an example configuration of a 2 interface frame relay switch setup:

frame-relay switching
interface Serial0
clockrate 2000000
encapsulation frame-relay
frame-relay intf-type dce
frame-relay route 102 interface Serial1 201
!
interface Serial1
clockrate 2000000
encapsulation frame-relay
frame-relay intf-type dce
frame-relay route 201 interface Serial0 102

While this looks pretty simple the more interfaces you add the number of frame-relay route commands multiplies so I’ve also included a complete configuration for a 4 port with dual paths for you to use as a template configuration:

version 11.2
no service password-encryption
no service udp-small-servers
no service tcp-small-servers
!
hostname FRS
!
!
partition flash 2 8 8
!
no ip routing
no ip domain-lookup
frame-relay switching
!
interface Serial0
 no ip address
 encapsulation frame-relay
 no ip route-cache
 no ip mroute-cache
 clockrate 2000000
 frame-relay intf-type dce
 frame-relay route 102 interface Serial1 201
 frame-relay route 103 interface Serial2 301
 frame-relay route 104 interface Serial3 401
 frame-relay route 122 interface Serial1 221
 frame-relay route 123 interface Serial2 321
 frame-relay route 124 interface Serial3 421
!
interface Serial1
 no ip address
 encapsulation frame-relay
 no ip route-cache
 no ip mroute-cache
 clockrate 2000000
 frame-relay intf-type dce
 frame-relay route 201 interface Serial0 102
 frame-relay route 203 interface Serial2 302
 frame-relay route 204 interface Serial3 402
 frame-relay route 221 interface Serial0 122
 frame-relay route 223 interface Serial2 322
 frame-relay route 224 interface Serial3 422
!
interface Serial2
 no ip address
 encapsulation frame-relay
 no ip route-cache
 no ip mroute-cache
 clockrate 115200
 frame-relay intf-type dce
 frame-relay route 301 interface Serial0 103
 frame-relay route 302 interface Serial1 203
 frame-relay route 304 interface Serial3 403
 frame-relay route 321 interface Serial0 123
 frame-relay route 322 interface Serial1 223
 frame-relay route 324 interface Serial3 423
!
interface Serial3
 no ip address
 encapsulation frame-relay
 no ip route-cache
 no ip mroute-cache
 clockrate 115200
 frame-relay intf-type dce
 frame-relay route 401 interface Serial0 104
 frame-relay route 402 interface Serial1 204
 frame-relay route 403 interface Serial2 304
 frame-relay route 421 interface Serial0 124
 frame-relay route 422 interface Serial1 224
 frame-relay route 423 interface Serial2 324
!
interface TokenRing0
 no ip address
 no ip route-cache
 shutdown
!
interface BRI0
 no ip address
 no ip route-cache
 shutdown
!
no ip classless
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 exec-timeout 0 0
 logging synchronous
 login
!
end

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.