[ LiB ]Creating LANs Creating Asynchronous, ISDN, PPP, DDR, Dial Backup, AAA, and Security Labs

Creating WANs by Using a Cisco Router as a Frame Relay Switch

You can configure any Cisco router with Cisco IOS Release 11.0 or later and at least two serial interfaces as a Frame Relay switch. Two interfaces are needed because the switch is primarily a data communications equipment (DCE) device and requires two routers to serve as the data terminal equipment (DTE) devices. Because the Frame Relay switch is a DCE-only device, it requires DCE serial cables as well.

The most common way to provide Layer 1 WAN connectivity between routers is to connect a female V.35 DCE cable to a male V.35 DTE cable. In any back-to-back configuration, you need to ensure that one side (DCE) of the link sets clocking. To configure an interface's clock rate, use the clock rate [value] command. Example 2-1 shows how to set the clocking on a serial interface.

Example 2-1. Configuring the Clock Rate on a DCE Interface
fr_switch(config)#interace serial 1
fr_switch(config-if)#clock rate ?
       Speed (bits per second)
  1200
  2400
  4800
  9600
  19200
  38400
  56000
  64000
  72000
  125000
  148000
  250000
  500000
  800000
  1000000
  1300000
  2000000
  4000000

  <300-4000000>    Choose clockrate from list above

These cables can be ordered from Cisco Systemspart number CAB-V35MT for the V.35 male DTE cable and part number CAB-V35FC for the female DCE cable. When the cables are connected in a back-to-back mode, sometimes it can be difficult to tell which one is the DCE cable. The show controller command specifies the cable type and whether the cable is DCE or DTE. Example 2-2 shows the output of show controller, where you can tell what the interface type is. As you can see from the example, the interface serial 0 is a V.35 DTE cable. Use V.35 cables whenever possible because of their flexibility in a lab environment.

Example 2-2. show controller Command
Router#show controller serial 0
HD unit 0, idb = 0xCED94, driver structure at 0xD3B18
buffer size 1524  HD unit 0, V.35 DTE cable
cpb = 0xE2, eda = 0x4140, cda = 0x4000
RX ring with 16 entries at 0xE24000
00 bd_ptr=0x4000 pak=0x0D66F0 ds=0xE2DDB0 status=80 pak_size=0

Configuring a Cisco Router as a Frame Relay Switch

To configure Frame Relay switching, you must perform the following tasks:

Step 1. Enable Frame Relay switching.

You do this with the global configuration command frame-relay switching.

Step 2. Configure the interface LMI and the Frame Relay interface type.

You need to set the encapsulation to Frame Relay with the encapsulation frame-relay command, and you must set the LMI type with the frame-relay lmi-type [ansi | cisco | q993a] command from the interface prompt. To continue configuring the Frame Relay interface, add the frame-relay intf-type dce command. Because the interface is DCE, you also need to use the clock rate bps command. The bps values range from 1200 to 8000000.

Step 3. Configure PVCs with the frame-relay route command.

You do this with the interface command frame-relay route [16-1007] inbound_DLCI interface outbound_serial_interface [16-1007] outbound_DLCI. This command creates a PVC on the interface and maps it to another interface.

Figure 2-3 shows the diagram used in this example. It highlights the network from a hardware and service provider perspective. The Frame Relay switch has two V.35 DCE cables to two routers, R1 and R2. These two routers have V.35 DTE male cables connected to their Serial 0 ports. You configure a PVC with DLCI 110 on Serial 0 mapping to DLCI 120 on Serial 1. Other types of cables, such as X.21 or RS232, can be used as well. Cisco also makes back-to-back cable, which can save you a lot of space when you build a lab at home.

Figure 2-3. Basic Frame Relay Configuration

graphics/02fig03.gif


Example 2-3 demonstrates the use of these commands and the basic configuration of a Frame Relay switch.

Example 2-3. Configuring a Basic Frame Relay Switch
fr_switch#configuration terminal
Enter configuration commands, one per line.  End with CNTL/Z.
fr_switch(config)#frame-relay switching
fr_switch(config)#interface serial 0
fr_switch(config-if)#encapsulation frame-relay
fr_switch(config-if)#frame-relay intf-type dce
fr_switch(config-if)#frame-relay lmi-type ansi
fr_switch(config-if)#clock rate 128000
fr_switch(config-if)#frame-relay route 110 interface s1 120
fr_switch(config-if)#exit
fr_switch(config)#
fr_switch(config)#interface serial 1
fr_switch(config-if)#encapsulation frame-relay
fr_switch(config-if)#frame-relay intf-type dce
fr_switch(config-if)#frame-relay lmi-type ansi
fr_switch(config-if)#clock rate 128000
fr_switch(config-if)#frame-relay route 120 interface s0 110
fr_switch(config-if)#exit

Example 2-4 shows the router's configuration in its entirety.

Example 2-4. Entire Frame Relay Configuration
fr_switch#show running-config

hostname fr_switch
!
frame-relay switching
!
interface Serial0
 no ip address
 encapsulation frame-relay
 clockrate 128000
 frame-relay lmi-type ansi
 frame-relay intf-type dce
 frame-relay route 110 interface Serial1 120
!
!
interface Serial1
 no ip address
 encapsulation frame-relay
 clockrate 128000
 frame-relay lmi-type ansi
 frame-relay intf-type dce
 frame-relay route 120 interface Serial0 110
!
!
no ip classless
!
line con 0
line aux 0
line vty 0 4
 login
!
end

[ LiB ]Creating LANs Creating Asynchronous, ISDN, PPP, DDR, Dial Backup, AAA, and Security Labs