Sunday, March 9, 2008

Frame Relay Switching over a Tunnel

In 1996 Cisco Systems to Join with StrataCom, a leading supplier of Asynchronous Transfer Mode (ATM) and Frame Relay high-speed wide area network (WAN) switching equipment that integrates and transports a wide variety of information, including voice, data and video.
Cisco MGX Multiservice Switches provide Frame Relay services at the Provider Edge.
In a lab situation, we can configured Cisco IOS on standard routers and access servers to provide frame relay services.

There are several ways to relay frames in IOS:
  1. DCE-DCE (multiple DCE interfaces), basic switching using frame-route command
  2. DCE-DCE (multiple DCE interfaces, on newer IOS such as 12.2T), using connect command
  3. Hybrid, 1 DCE and 1 DTE
  4. Back-to-Back, which requires lmi to be disabled with no keepalive
  5. Tunnel Methods
To learn how to configure Cisco router as a Frame Relay switch, you can read my friend's blog, awa here.

Here I will give some configuration examples of Frame Relay switch using Tunnel methods.
Suppose you need 4 ports Frame Relay Switch for making a Full Mesh Frame Relay topology, but all you had is only 2 Cisco routers with 2 serials and 1 ethernet interfaces.
IOS permits us to send a switched frame relay packets over an IP tunnel. This permits the frame relay encapsulated serial interfaces to be located on different routers.
This diagram below may be looked complex, but its only just a Full Mesh Frame Relay topology.
















There are 2 fundamental tricks use to get this trick to work:
  1. Using tunnel interface as the destination in the frame-route statements
  2. Making the same PVC is referenced by the same DLCI on both side of the tunnels
Configuration of SW1:
interface serial 0
no ip address
encapsulation frame-relay
no fair-queue
clock rate 128000000
frame-relay intf-type dce
frame-route 102 interface Tunnel0 122
frame-route 103 interface Tunnel0 123
frame-route 104 interface Serial3 401

interface tunnel 0
ip unnumbered ethernet 0
tunnel source ethernet 0
tunnel destination 172.16.10.5
Configuration of SW2:
interface serial 1/0
no ip address
encapsulation frame-relay
clock rate 128000000
frame-relay intf-type dce
frame-route 201 interface Tunnel0 122
frame-route 203 interface Serial1/1 302
frame-route 204 interface Tunnel0 422

interface tunnel 0
ip unnumbered FastEthernet 0/0
tunnel source FastEthernet 0/0
tunnel destination 172.16.10.7

Frame Relay Basics

Frame Relay is an OSI Layer 2 Wide Area Network Protocol. It is commonly implemented as a WAN access protocol on the link between the customer and the provider edge. It also can be implemented as core protocol.
Frame Relay permits multiple Permanent Virtual Circuits (PVC) to use the same physical link, providing a kind of Layer 2 VPN between customer locations. These PVCs can be flexibly designed as Full Mesh or Hub and Spoke depending on traffic patterns and budgets.

Frames are relayed using the Data Link Connection Identifier (DLCI). The DLCI uniquely identifies traffic for a given PVC on a given physical channel, it is a 10 bit number that can vary between 0 and 1023. I will use the diagram below to explain the usage of DLCI.

If HQ want to send packets destinate to Branch A, HQ's router need to know which DLCI to use for packet with next hop of 123.3. This mapping of far side Layer 3 address to near side Layer 2 address can be created statically or dynamically using inverse arp.
In mapping table the router determine the traffic with the next hop of 123.2 should go out on the PVC designated by DLCI 102. It encapsulates the packet in the frame and search the DLCI of 102 address in the frame header, and send it out the interface to Switch1. The Switch1 replaces the DLCI of 102 in the frame header with DLCI 112 and sends it on Switch2. Switch2 rewrites the header with DLCI 201 and sends the frame on to the Branch A router. The same process takes places from packets from HQ destinated to Branch B.

In the diagram, you see the Headquarters and Branches connected over Frame Relay. The Frame Relay Service Provider cloud consists of 2 SW1 and SW2 which are Cisco Routers that configured for Frame Relay Switching. Notice that the customer router connected to Frame Relay cloud and shared the same subnet 172.16.123.x.

Frame Relay interfaces in Cisco can be configured as:
  • DTE (Data Terminal Equipment), Serial interfaces at R1, R2, and R3 as routed interfaces
  • DCE (Data Communications Equipment), Serial 1/0 at Switch 1, Serial 0 and Serial 2 at Switch S2
  • NNI (Network-to-Network Interface), Serial 0/0 at Switch 1, Serial 1 at Switch S2

Configuration of DTE interfaces in R1:
interface serial 1/0
ip address 172.16.123.1 255.255.255.0
clock rate 128000
no dce-terminal-timing-enable
Configuration of DCE interfaces in SW1:
interface serial 1/0
no ip address
encapsulation frame-relay
frame-relay intf-type dce
frame-relay route 102 interface serial 0/0 112
frame-relay route 103 interface serial 0/0 113
Configuration of NNI interfaces in SW1:
interface serial 0/0
no ip address
encapsulation frame-relay
no fair-queue
frame-relay intf-type nni
frame-relay route 112 interface serial 0/0 102
frame-relay route 113 interface serial 0/0 103