Previous section   Next section

Recipe 16.6 Configuring an Async Serial Interface

16.6.1 Problem

You want to configure a sync/async interface in asynchronous mode.

16.6.2 Solution

Cisco has a class of serial modules that can support either synchronous or asynchronous communications, as required. You can use the physical-layer async command to change the interface from the default synchronous to asynchronous mode:

Router3#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router3(config)#interface Serial1/7
Router3(config-if)#physical-layer async
Router3(config-if)#encapsulation ppp
Router3(config-if)#exit
Router3(config)#line 40
Router3(config-line)#speed 115200
Router3(config-line)#end
Router3#

16.6.3 Discussion

As soon as you configure the physical-layer async command, the router will wipe out any configuration that you might previously have had on this interface for synchronous communications.

The only real trick in this configuration is that you need to apply many of the important configuration commands to a terminal line, rather than to the interface itself. In this example, the only command we have included in the line section is the speed command—but there could be others. We discuss the line configuration commands for connecting to asynchronous modems in Chapter 13.

The line number in this configuration is not arbitrary. In fact, after you enable the physical-layer async command on the serial interface, you should break out of configuration mode and use the show line command to see which line the router has decided to associate with this serial interface:

Router3#show line
  Tty Typ    Tx/Rx    A Modem Roty AccO AccI  Uses  Noise  Overruns  Int
    0 CTY             -    -     -    -    -     0      0     0/0      -
   40 TTY  9600/9600  -    -     -    -    -     0      0     0/0     Se1/7
   65 AUX  2400/2400  F    -     -    -    -     0      0     0/0      -
*  66 VTY             -    -     -    -    -     5      0     0/0      -
   67 VTY             -    -     -    -    -     0      0     0/0      -
   68 VTY             -    -     -    -    -     0      0     0/0      -
   69 VTY             -    -     -    -    -     0      0     0/0      -
   70 VTY             -    -     -    -    -     0      0     0/0      -
   
Line(s) not in async mode -or- with no hardware support: 
1-39,41-64
   
Router3#

Here you can see that the router has assigned our Serial1/7 interface to line 40. It has also set the interface to the default speed of 9600 baud. We increased this speed in our example:

Router3(config)#line 40
Router3(config-line)#speed 115200

16.6.4 See Also

Recipe 16.2; Chapter 13


  Previous section   Next section
Top