| [ LiB ] |
The scenarios presented in this chapter help you gain a better understanding of modem operation and configuration through practical application. You will go over the necessary configuration tasks in their logical progression. The two scenarios provided cover the following topics:
Configuring the serial interface and asynchronous line on the central router
Configuring the central-site modem
Several distinct configuration tasks must be performed to successfully establish a remote connection using asynchronous modems. The first are the initial configuration of the central-site router and the configuration of the serial interface and the corresponding line.
Suppose that a PC in a small office needs to communicate with a central site over a standard telephone line. The PC is running Windows 2000 and is fitted with an external modem. At the central site, the connection to the router is to be made through an external modem directly attached to the router's serial 0 port on the serial sync/async network module in slot 3. This scenario is depicted in Figure 3-2.

Two of the commands you'll need to complete the configuration are ip host and physical-layer. The ip host command is a global configuration command that allows you to define a static name-to-address mapping in the host cache:
Router(config)#ip host {name | tmodem-telephone-number} [tcp-port-number] {address1 [address2...address8]}
The tcp-port-number parameter lets you specify a TCP port number when connecting to the host name using Telnet.
The general syntax of the physical-layer command is as follows:
Router(config-if)#physical-layer {sync | async}
Because the default is synchronous mode, you use the keyword async to set the serial interface to asynchronous mode.
Before configuring the asynchronous connection, you need to perform an initial configuration of the central-site router. You can do this from a terminal attached to its console port (line 0). You begin by entering global configuration mode. You can then configure the router name using the hostname command. It is also useful to disable the IP domain name system with the no ip domain-lookup command. This keeps the system from trying to translate domain names that have typing errors.
Next you need to select the routing protocol. To configure EIGRP routing, you use the router eigrp command. You must include the autonomous system number. This number is used to tag the routing information and to identify the routes to other EIGRP routers. You use the network command to specify the network serviced by the EIGRP routing protocol. Here it's 10.0.0.0.
You can use the enable secret command to enable a password for entering privileged EXEC mode. Here the password is cisco. This secret password provides an additional layer of security on the router. Passwords are case-sensitive strings that can be up to 80 characters long. They cannot begin with a number.
The central-site router is to connect to its local network through the Ethernet 0 port on the module in slot 0. You enter interface e 0/0 to configure this interface. But you can also use interface ethernet 0/0 and int eth 0/0. You set the IP address for the Ethernet interface using the ip address command. You also have to include a subnet mask. You then activate the interface using the no shutdown command.
To begin configuring the console line, you enter line console 0. You are now in line configuration mode. You use the no exec-timeout command to prevent the console from automatically disconnecting after a period of inactivity. The default timeout is 10 minutes.
The initial configuration of the central-site router is now complete. It's shown in Example 3-6.
NOTE
Don't forget to reset the exec-timeout after the configuration is completed. Leaving it open is a potential security risk.
Router#configure terminal Router(config)#hostname R1 R1(config)#no ip domain-lookup R1(config)#router eigrp 100 R1(config-router)#network 10.0.0.0 R1(config)#enable secret cisco R1(config)#interface ethernet 0/0 R1(config-if)#ip address 10.115.0.120 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#line console 0 R1(config-line)#no exec-timeout
When the initial configuration of the central-site router is complete, you can begin configuring the serial interface and asynchronous line.
Let's assume that the external modem is directly attached to the serial 0 port on the serial network module in slot 3 (identified as port serial 3/0). You enter interface serial 3/0 to select the serial 3/0 interface. You are now in interface configuration mode. You must explicitly configure the interface as an asynchronous interface using the physical-layer async command. On the Cisco 3640 router, this adds TTY line 97 (TTY97) to the configuration.
Next you need to configure the line (line 97) with the appropriate physical layer parameters. You enter line 97 to begin the line configuration. This puts you in line configuration mode. To prevent unauthorized connections, you use the login command to enable user login to the interface and to challenge for a password. You set the login password using the password command. Here, it's cisco. To allow incoming and outgoing connections on the line, you enter modem inout. You want to allow any transport protocol to pass to the router through the line. You achieve this by entering the transport input all command.
You use the speed command to set the maximum speed between the router and the modem. Here, it's 115200 (bps). You use the stopbits command to set the number of stopbits per byte of data. This example has one stopbit per byte. You should configure the line to use CTS/RTS signals for hardware flow control.
This completes the configuration of the line. You return to global configuration mode by entering exit. All configuration tasks described in this section are shown in Example 3-7.
R1(config)#interface serial 3/0 R1(config-if)#physical-layer async R1(config-if)#line 97 R1(config-line)#login R1(config-line)#password cisco R1(config-line)#modem inout R1(config-line)#transport input all R1(config-line)#speed 115200 R1(config-line)#stopbits 1 R1(config-line)#flowcontrol hardware R1(config-line)#exit
You need to be able to reverse-Telnet to the attached modem. You can assign it a host name and associate it with the router's Ethernet IP address and with the Telnet TCP port corresponding to the line. You enter ip host modem 2097 10.115.0.120 to define the host name "modem" and associate it with TCP port 2097 and IP address 10.115.0.120. You can now exit configuration mode. You can save your configuration to NVRAM by entering copy running-config startup-config.
Cisco access servers support reverse-Telnet connections. This means that you can connect through an access server to an attached modem to configure that modem.
Suppose that a remote PC fitted with an external modem needs to communicate with a central site over a standard telephone line. At the central site, the connection to the router is to be made through an external modem directly attached to one of the router's serial ports. The external modem has already been assigned the host name "modem." The topology is shown in Figure 3-3.

The first part of this scenario covers the manual method of modem configuration, and the second part presents an alternative to the manual methodthe autoconfiguration technique.
When manually configuring a modem, you follow these steps:
Let's look at how you can configure the central-site modem using reverse Telnet. To connect to the modem on line 97 using reverse Telnet, you enter modem or telnet modem. Here modem is the host name of the modem configured to the router's line 97. Remember that the ip host modem 2097 10.115.0.120 command has already been configured.
The system then prompts you for a login password. You respond by entering the appropriate login password. Here it was previously configured to "cisco." You enter AT (uppercase or lowercase) and press Enter to verify connectivity to the modem. The modem should respond with an OK message.
You can now begin entering AT commands to configure the modem. These commands are specific to your modem manufacturer and are not always the same on different modems. You should therefore contact your modem manufacturer for a complete list of the AT commands relevant to your modem. You can normally obtain a list of these commands from the modem itself by entering AT$.
Let's assume that a USR Sportster modem is being configured. You use the command AT&F0 to configure the modem to load the factory default settings. The Carrier Detect (CD) and Data Terminal Ready (DTR) signals are used between the DTE and DCE to initiate and receive calls. You use the command AT&C1 to set the modem to operate only when the proper carrier signal is present. This conforms to RS-232 standard operation, where the CD signal should accurately reflect the current line state.
To have the modem to hang up on DTR going low, you enter the command AT&D2. You use the command AT&H1 to configure the modem for hardware flow control. The modem should send data to the router only if request to send (RTS) is asserted, so you enter the command AT&R2. The command AT&M4 is used to set error correction. This allows the modem to automatically select between V.42, MNP, and no error correction.
To set a fixed data transfer rate on the serial port between the modem and the router, you enter the command AT&B1. To set the modem to autoselect the best compression algorithm (MNP level 5 or V.42bis), you use the command AT&K1. The command AT&W0 is used to store the new configuration to the modem's NVRAM (pattern 0). You can check the configuration by using the command ATI4.
After manually configuring the central-site modem, you can leave the reverse-Telnet session by pressing Ctrl+Shift+6 and then x. You must then enter disconnect to clear the Telnet session. If you fail to do this, you will not be able to reconnect.
After configuring the central-site modem, you need to configure the PC modem. The AT commands required are specific to your modem manufacturer.
Let's assume that the PC modem is a USR Sportster model. You can use the Hyperterminal communications utility to access the modem. Hyperterminal is a communications software utility that comes with Windows OS. When you have access, you need to verify connectivity to the modem by entering the command AT. The modem should respond with an OK message.
For simplicity, let's say that you want to use all the modem's factory default settings. So you enter the command AT&F to load these settings. You then save the configuration to the modem's NVRAM using the command AT&W. You can compound AT commands to speed up configuration. For example, you can enter the command AT&F&W instead of the separate commands AT&F and AT&W.
After configuring the PC modem, you can connect to the central-site router using the ATDT command and the appropriate phone number. As soon as the modems have successfully synchronized, you should receive the prompt "User access verification" and be asked for the login password. When you have gained access, you should see the console prompt from the central-site router.
To verify connectivity to line 97 (TTY97), you first enter privileged EXEC mode. You do this by entering enable and then entering the appropriate password. Then you enter either show users or show line 97 at the prompt. The show users command shows which users have active connections to the router, the lines that they are connected through, and how long they have been connected. The show line command lists the parameters for a specified line. It also shows some activity information associated with the line.
You can verify the running configuration using the show running-config command. In Example 3-8 you can see that domain name lookup is disabled, the modem is bound to IP address 10.115.0.120, and the serial 3/0 interfacethe modem-connected interfaceis set to asynchronous mode. The output also confirms the configuration settings for line 0 (the console line) and line 97.
R1#show running-config
!
hostname R1
!
enable secret 5 $1$FaD0$Xyti5Rkls3LoyxzS8
!
no ip domain-lookup
ip host modem 2097 10.115.0.120
!
interface Serial 3/0
physical-layer async
no ip address
!
line con 0
exec-timeout 0 0
line 65 70
line 97
password cisco
login
modem InOut
transport input all
stopbits 1
speed 115200
flowcontrol hardware
line aux 0
line vty 0 4
To disconnect the PC modem, you enter quit.
You should follow up the modem autoconfiguration by verifying connectivity.
Let's assume that you are in privileged EXEC mode on the central-site router. You turn on debugging for modem configuration by entering debug confmodem. This allows you to see the processes occurring while the router is configuring the modem.
Next you enter configuration mode using the configure terminal command. You select the configuration for the modem line (line 97) by entering line 97. This puts you in line configuration mode. To set the router to autoconfigure the modem and to find its type using autodiscovery, you enter modem autoconfigure discovery. If you already know that the modem type is usr_sportster, you should avoid autodiscovery by entering this command. Telling the router the modem type reduces unnecessary work for the router's processor.
The debug messages in Example 3-9 show that the modem type has been successfully discovered. The router has automatically loaded AT commands to configure it.
R1#debug confmodem
TTY97:detection speed(115200) response ---OK---
TTY97:Modem type is usr_sportster
TTY97:Modem command: --AT&F&C1&D2&H1&B2&M4&K1&B1S0=1H0--
TTY97:Modem configuration succeeded
TTY97:locking speed(115200) response ---OK---
TTY97:locked DTE speed at 115200
TTY97:Done with modem configuration
To leave configuration mode, you enter exit at successive prompts. You turn off modem configuration debugging by entering the no debug confmodem command. This helps reduce any unnecessary overhead processing for the router.
As soon as the central-site modem has been autoconfigured, you need to verify connectivity. You can do this using a modem at any remote siteit could be attached to a PC or to another router. Let's assume that the PC modem used to dial in represents a telecommuter. The phone number of the central-site modem is 5551005.
To dial into the central-site router, you use Hyperterminal and the ATDT command. Here you enter ATDT 5551005. The router responds by challenging you for a login password. On successful connection, you should see the console prompt from the central-site router. By opening this session with the routers, you verify connectivity. You disconnect from the modem by entering quit.
If the connection fails, from the central-site router you could reverse-Telnet to the modem and check its settings using the command ATI4. You could then check the settings for the line on the router by entering show line 97 at the privileged EXEC prompt. You can also check the status of the router's serial port attaching to the modem by entering show interface serial 3/0.
If the settings used by the autoconfiguration process for your modem are inaccurate, or the router has incorrectly detected the modem, you can edit the current entry to suit your modem, put a new entry into the modemcap database, or use a manual configuration process.
| [ LiB ] |