Asynchronous Connections

Modem-Router Connection Guide

Cisco - Modem-Router Connection Guide

Document ID: 17719

Updated: Sep 29, 2005



This document explains how to configure Cisco routers and access servers for external modems connected to asynchronous and AUX ports. It explains how to configure the modem to operate properly when connected. This document addresses connection to a console port, but only with reference to concepts, not actual installation practices.

Note: This document is not a reference for the Microcom or MICA modems used internally on the AS5200, AS5300, AS5800, Cisco 2600, or Cisco 3600 routers. This document is also not a reference for synchronous modems, though there can be a number of similarities. This document is a reference for asynchronous modems only. While much of the information here can apply to synchronous modems, do not rely on it when you configure them.



There are no specific prerequisites for this document.

Components Used

The information in this document is based on the software and hardware versions below.

  • Cisco IOS® Software Releases 9.21 and later

  • A modem that is V.34-capable (or better)

Note: This document does not address platforms that have reached End of Life status, such as ASMs, MSMs, CSMs, STS-10s or 500-CSs.

The information presented in this document was created from devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If you work in a live network, ensure that you understand the potential impact of any command before you use it.


Refer to the Cisco Technical Tips Conventions for more information on document conventions.

Hardware Configuration

The first step to attach a modem to a router is to install the hardware. The main concerns are which cables to use and why or why not to use the console port for a modem.

Cabling Issues

It is important to connect the modem to the router before you configure the modem in order to verify communication between them. If the cabling is incorrect, the rest of the process fails.

As a rule, external modems are built with a female data communications equipment (DCE) DB-25 port for connection to a controlling device such as a PC or a router. This table helps you to select the appropriate cables to make the connection between the router and the modem. The table also includes information on the required cabling and the types of physical ports on Cisco routers to which you can connect a modem.

Router Port Examples of where found Cables Required
DB-25 DTE Male DB-25 AUX on the Cisco 4000, 7000, 7200, and 7500. Straight-through DB-25F -- DB25M RS-232 cable.
DB-25 DCE Female DB-25 console port on the Cisco 4000 and 7000 series. Null-modem DB-25M -- DB25M RS232 cable. A rolled RJ-45--RJ-45 with CAB-25AS-MMOD adapters on both ends will work.
DB-60 Sync/async interfaces. Cisco 1005, 1600s, and 2500s; network modules on the Cisco 2600, 3600, and 4000. Cisco-specific cable, the CAB-232MT(=).
RJ-45 AUX or CON on the Cisco 2500s, 2600, 3600, AS5200, and AS5300. Rolled RJ-45--RJ-45 cable with adapter marked "MODEM" (part number CAB-25AS-MMOD).
68-pin Cisco 2509-2512; network modules on the Cisco 2600 and 3600. Cisco parts CAB-OCTAL-ASYNC(=) (with connectors marked "MODEM") and CAB-OCTAL-MODEM(=).
"Smart Serial" WAN interface card (WIC) on 1720 and 2600s. Cisco part CAB-SS-232MT(=).

Note: Sync/async interfaces require the physical-layer async configuration command in order to operate in asynchronous mode.

Note: The Cisco 1005 requires the IP/ASYNC or the IP/IPX/ASYNC feature set of Cisco IOS Software in order to allow asynchronous mode on its Serial interface.

Console Port Issues

There are several advantages to connecting a modem to the console port of a router instead of the AUX port. However, the disadvantages are significant.

Advantages of connecting a modem on the console port:

  • You can recover passwords remotely. You may still need someone on-site with the router to toggle the power. Aside from that, it is identical to being there with the router.

  • It is a convenient way to attach a second modem to a router without async ports. This is beneficial if you need to access the router for configuration or management and leave the AUX port free for dial-on-demand routing (DDR).

  • Some routers (for example, Cisco 1600s) do not have AUX ports. If you want to connect a modem to the router and leave the serial port(s) free for other connections, the console is the only option.

Disadvantages of connecting a modem on the console port:

  • The console port does not support RS232 modem control (data set ready/Data Carrier Detect (DSR/DCD), data terminal ready (DTR)). Therefore, when the EXEC session terminates (logout), the modem connection does not drop automatically. The user needs to manually disconnect the session.

  • More seriously, if the modem connection does drop, the EXEC session does not automatically reset. This can present a security hole, in that a subsequent call into that modem is able to access the console without entering a password. You can make the hole smaller when you set a tight exec-timeout on the line. However, if security is important, use a modem that can provide a password prompt.

  • Unlike other async lines, the console port does not support hardware (Clear to Send/Ready to Send (CTS/RTS) flow control. Cisco recommends that you use no flow control. If data overruns are encountered, however, you can enable software (XON/XOFF) flow control.

  • The console ports on most systems only support speeds of up to 9600 bps.

  • The console port lacks reverse Telnet capability. If the modem loses its stored initialization string, the only remedy is to physically disconnect the modem from the router and attach it to another device (such as an AUX port or a PC) to reinitialize. If a modem on an AUX port loses its initialization string, you can use reverse Telnet remotely to correct the problem.

  • You cannot use a console port for dial-on-demand routing because it has no corresponding async interface.

Note: The remainder of this document addresses non-console connections.

Line Configuration

It is essential that you configure the TTY line before you configure or initialize the modem itself. The two main reasons are:

  • In order to allow reverse Telnet access to the modem.

  • If you change the line speed after the modem is initialized, the modem no longer communicates with the router until it is again told at what speed to talk to the router.

In general, this line configuration works best:

line "x" TTY #. AUX port is line 1 on the router, last_tty+1 on the access server, line 65 on the Cisco 2600s and 3620, and line 129 on the Cisco 3640.
speed "xxxxx" Set to the highest speed in common between the modem and the port. This value is usually 115200 baud. See the Bitrate Information.
stopbits 1 Improve throughput by reducing async framing overhead (default is stopbits 2).
flowcontrol hardware RTS/CTS flow control.
modem inout Drop connection on loss of DCD (DSR). Cycle DTR for connection close. This command also allows outbound connections to the modem.
transport input all | telnet Allow outbound connections to this line. Needed in order to allow reverse Telnet to the modem.

This configuration assumes that the modem always talks to us at "speed" (which is why you must LOCK SPEED on the modem), that the CD lead of the modem reflects the actual state of the carrier, and that the modem hangs up when the router drops DTR. Avoid substituting autobaud for speed if at all possible since it usually results in lower throughput.

Bitrate Information

Maximum Speed Supporting platforms and interfaces
38400 Most AUX ports
115200 Cisco 1005, 1600, and 2509 through 2512 AUX on Cisco 2600 and 3600 Modules and WICs that support external asynchronous modems (for example, NM-16A, WIC-2A/S)

Note: If you are routing over the AUX port, notice that each character generates a processor interrupt. You can resolve abnormally high CPU utilization when you use a lower AUX port speed.

Modem Configuration

Cisco recommends you use the modem autoconfigure type <modemcap_name> command (introduced in Cisco IOS Software Release 11.1), to configure modems attached to async lines. If you use a version of Cisco IOS Software earlier than 11.1, you can use script startup and script reset to configure the modems via a chat script.

For most applications, configure a modern modem as this list details:

  • Reset to factory defaults (use a hardware flow control template if possible).

  • Use hardware (RTS/CTS) flow control.

  • Use normal modem control (hang up on DTR drop; drop DCD on carrier drop).

  • Enable, but do not require, error control (LAP-M [V.42] and MNP).

  • Enable, but do not require, data compression (V.42bis).

  • Enable all modulations supported by the modem.

  • Lock DTE speed at the highest rate supported by both the modem and the async line.

  • Enable autoanswer if needed. When you are in autoanswer mode, ignore the escape sequence (+++).

Refer to the documentation provided by your vendor or see the page for a list of links to this documentation for details on the command set used by your modem,.

Modemcaps and modem autoconfigure

Cisco IOS Software maintains a set of built-in modemcaps for various internal and external modems. This output shows an example modemcap from Cisco IOS Software Release 11.3(9)T:

router#show modemcap


If you think one of these built-in modemcaps is suitable, you can use the modem autoconfigure type <modem_name> or the modem autoconfigure discovery command:

async-1#terminal monitor
async-1#debug confmodem
Modem Configuration Database debugging is on
async-1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
async-1(config)#line 1
async-1(config-line)#modem autoconfigure discovery

*Mar 3 03:02:19.535: TTY1: detection speed (38400) response ---OK---
*Mar 3 03:02:24.727: TTY1: Modem type is default
*Mar 3 03:02:24.731: TTY1: Modem command: --AT&F&C1&D2SO=1H0--
*Mar 3 03:02:25.259: TTY1: Modem configuration succeeded
*Mar 3 03:02:25.259: TTY1: Detected modem speed 38400
*Mar 3 03:02:25.259: TTY1: Done with modem configuration

Note: The built-in modemcap mica consists of an &F. You can use it with many modems to reset to factory defaults.

Note: Cisco does not warrant the suitability or currentness of the built-in modemcaps for non-Cisco modems.

You can also define your own modemcap and use the modem autoconfigure type command:

async-1#terminal monitor
async-1#debug confmodem
Modem Configuration Database debugging is on
async-1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
async-1(config)#modemcap edit MyTest misc &FSO=1
async-1(config)#line 1
async-1(config-line)#modem autoconfigure type MyTest

*Mar 3 03:06:30.931: TTY1: detection speed (38400) response ---OK---
*Mar 3 03:06:30.963: TTY1: Modem command: --AT&FSO=1--
*Mar 3 03:06:31.483: TTY1: Modem configuration succeeded
*Mar 3 03:06:31.487: TTY1: Detected modem speed 38400
*Mar 3 03:06:31.487: TTY1: Done with modem configuration

Create a Modemcap

Use this global configuration command in order to define your own modemcap:

modemcap edit <modemcap_name> miscellaneous <initialization string>

The modemcap is applied to the line configuration with this command:

modem autoconfigure type <modemcap_name>

Here are some useful manufacturer-specific modem commands.

Note: The initialization string in the modemcap edit command is entered without a preceding AT and without the terminating &W.

Note: The modemcap_name in these commands should not be the same as one of the predefined entries listed by the show modemcap command.

Note: The initialization string should begin with the command to reset to defaults (typically &F or &F1).

Note: For this method to work, the modem must be configured with echo and response codes turned on. Modems usually come from the factory with these values set. However, you might need to manually reverse Telnet to the modem and issue the command to turn on echo and response. The usual command to do this is ATE1Q0. Check your modem documentation.

Create a Chat Script

Use this global configuration command to configure a chat script for the configuration of a modem:

chat-script <script-name> AT OK "initialization string" OK

The chat script can be invoked manually for a single line with this command:

start-chat <script-name><line-number>

The chat script can also be invoked automatically. Add this command to the line configuration:

script startup <script-name>
script reset <script-name>

The chat script is invoked every time the system reloads, the line resets at the termination of a session, or the line is cleared manually.

Use the debug chat command to verify that the chat script functions properly.

Note: For this method to work, you must configure the modem with echo and response codes turned on. Modems usually come from the factory with these values set. But, you might need to manually reverse Telnet to the modem and issue the command to turn on echo and response. The usual command to do this is ATE1Q0. Check your modem documentation.

Reverse Telnetting

Issue this command to establish a reverse Telnet connection:

telnet x.x.x.x 2yyy or [2000+yyy]

The x.x.x.x represents the IP address of any up/up interface on the Cisco router (for example, an Ethernet or Loopback) and yyy is the line number to which you want to connect. If you have already configured the TTY line, you can issue the telnet command from anywhere on the network that can ping the x.x.x.x interface.

The AUX port of any router is the last async line number + 1. You can use the show line or show line aux 0 command to see which line number this is.

If your connection is refused, this usually means that there is already a connection to that port, or there is an EXEC (prompt) that runs on that port. The cause can be that the modem fails to lower CD after a call disconnects. This results in an EXEC that remains after the disconnect. In order to force the line back into an idle state, you can clear the line from the console to try again. If it still fails, make sure that you have set the modem inout and transport input all | telnet commands for that line. Also be sure that the modem is not set to override DTR (for example, as the USR modems can do with DIP switch settings). If you do not have modem control (as in pre-9.21 AUX ports), be sure to set the no exec command on the line before you make a reverse connection. You can also try to configure the modem using an external terminal. As a last resort, disconnect the modem, clear the line, make the Telnet connection, and then attach the modem. This prevents a misconfigured modem from denying line access.

Always issue the initialization commands to the modem starting with AT and issue them at the speed at which you wish the modem to talk to the Cisco router. This ensures that the modem always talks at the expected speed regardless of the speed of any incoming modem connection (if you set the modem to lock on the DTE speed, which is required).


  • If your dialup EXEC connection appears to stop responding, enter ^U (clear line) and ^Q (XON), then press Return a few times.

  • When you are dialed in, if you type quit and the modem does not hang up, then either it is not watching DTR, modem control was not configured properly on the Cisco router, or the cabling is incorrect.

  • If you find yourself in someone else's session (that is, at an enable or a configure prompt) when you dial in, either the modem is not dropping CD on disconnect or you have not configured modem control on the Cisco router.

  • If you issue a +++ on the dialing modem followed by an ATO command and discover that your connection does not respond, the answering modem interpreted the +++ when it was echoed to you. This is a bug in the answering modem and has been observed on many modems. There is possibly a switch to defeat that, but it varies from modem to modem.

  • If you have autoselect turned on in the line configuration, a carriage return is required to get into EXEC.

  • If you elect to do hardware (RTS/CTS) flow control (which Cisco strongly recommends), make sure it is enabled on both the router/access server's line (DTE) and the modem (DCE). If you have one on and the other one off, this causes data loss.

  • If you have an MDCE connector, turn it into an MMOD connector by moving pin 6 to pin 8. This is because most modems use CD and not DSR to indicate the presence of a carrier. If not, some modems can be programmed to provide carrier information via DSR.

Manufacturer-Specific Modem Initialization Commands

Recommended initialization strings are provided here for some common modems, but be aware that Cisco does not warrant that they are suitable or current. When in doubt, refer to the modem vendor's documentation or technical support.

Modem Brand Initialization String Notes
3Com/USRobotics &F1S0=1 &F1 factory hardware flow control defaults In addition to the initialization string, 3Com/USR modems require DIP switches to be properly set. Switches 3 and 8 must be down and all the rest must be up.
AT&T/Paradyne &FS0=1&C1&D3\Q3\N7%C1  
Best Data Smart One &FS0=1&C1&D3  
Diamond/Supra &FS0=1  
Global Village &FS0=1&C1&D3\Q3\J0\N3%C1  
Hayes Optima &FS0=1&Q9&C1&D3

Note: Do not use the built-in hayes_optima modemcap. It sets &Q6, which disables error control.

Microcom &FS0=1&C1&D3\Q3\J0\N6%C1

Note: This information is not intended for use with the internal modems found on the AS5200, Cisco 2600, or Cisco 3600 platforms. This information is intended for Microcom stand-alone modems.

Motorola ModemSurfr &FS0=1&C1&D3\J  
Motorola/Codex &FS0=1&C1&D3*FL3*SC1*SM3*DC1  
Multitech &FS0=1&C4&D3$SB115200

Tip:  For Multitech modems: The DTE speed must be expressly declared with the $SB command. Set it to whatever line speed you have configured. Failure to do so results in speed mismatches.

Related Information

Updated: Sep 29, 2005
Document ID: 17719