Configuring the Modem

Once the router is configured to see and use the modem in general, you must tell it specifically how to use the modem. This process can be entirely manual or automated to some extent through the modemcap (short for modem capabilities) database. Every Cisco IOS has a built-in database of modems that you can use as is or customize to reflect the specific modems attached to the router.

Manually Configuring the Modem

To manually configure the modem and bypass the modemcap database, you need to reverse Telnet into the modem. Generally, traffic goes "through" the modem into the router, from the outside network to the inside. This type of traffic is referred to as forward traffic. Going the other direction, and actually stopping at the modem for configuration purposes, is considered the reverse, hence, reverse Telnet.

You can access a modem connected to a computer via terminal-emulation software, the most common of which is HyperTerminal. You can get into the modem directly, issue AT commands, and get result codes back. The router, however, doesn't have HyperTerminal or any other graphical terminal-emulation software; it has Telnet. Instead of opening a COM port, which is just a serial port on a computer, you open a TTY port.

The process of reverse Telnet is simple, assuming that you have connected the modem to the router, that it is turned on, and that you are using an asynchronous serial port. You must also put a minimum configuration on a line for reverse Telnet, which includes transport input all and modem inout. The simplest way to determine where to Telnet to is to issue a show line from enable mode. Determine which TTY line you want to connect to and Telnet to the local IP address of the router (127.0.0.1 works just fine) on port 2000+TTY. Once you connect, type the AT commands that will configure this modem. When you are done, escape out of your Telnet session using Ctrl+Shift+6 followed by x:

 transport input (all,none,pad,rlogin,ssh,telnet,udptn,v120) modem (dialin,inout) clear line TTY (replace TTY with the actual line number) 

Here you can see which lines can be configured. Simply look for the line number next to any TTY:

 Router#show line    Tty Typ     Tx/Rx    A   Modem  Roty AccO AccI   Uses   Noise  Overruns *    0 CTY               -    -      -    -    -      0       0     0/0      1 TTY 115200/115200 -  inout    -    -    -      0       0     0/0     65 AUX   9600/9600   -    -      -    -    -      0       0     0/0 *   66 VTY               -    -      -    -    -      8       0     0/0     67 VTY               -    -      -    -    -      3       0     0/0     68 VTY               -    -      -    -    -      1       0     0/0     69 VTY               -    -      -    -    -      0       0     0/0     70 VTY               -    -      -    -    -      0       0     0/0 

Now that you have identified the line number number 1, in this case you are ready to begin the configuration:

 Router#configure terminal Router(config)#line tty 1 Router(config-line)#transport input all Router(config-line)#modem inout 

After configuration, or at any time you want to reset or drop the connection, use the clear line TTY command:

 Router#clear line 1 

Manipulating the Modemcap Database

The entries in the modemcap database will vary from router to router and version to version. You can, however, view the current database at any time by issuing the show modemcap command from an enable prompt:

 Router#show modemcap default codex_3260 usr_courier usr_sportster hayes_optima global_village viva telebit_t3000 microcom_hdms microcom_server nec_v34 nec_v110 nec_piafs cisco_v110 microcom_mimic mica nextport scm 

The display shows all modem types that this router is configured to support. To determine whether a specific modem configuration will work with your attached device, issue the show modemcap type command:

 Router#show modemcap usr_sportster Modemcap values for usr_sportster Factory Defaults (FD):  &F Autoanswer (AA):  S0=1 Carrier detect (CD):  &C1 Drop with DTR (DTR):  &D2 Hardware Flowcontrol (HFL):  &H1&R2 Lock DTE speed (SPD):  &B1 DTE locking speed (DTE):  [not set] Best Error Control (BER):  &M4 Best Compression (BCP):  &K1 No Error Control (NER):  &M0 No Compression (NCP):  &K0 No Echo (NEC):  E0 No Result Codes (NRS):  Q1 Software Flowcontrol (SFL):  [not set] Caller ID (CID):  [not set] On-hook (ONH):  H0 Off-hook (OFH):  H1 Miscellaneous (MSC):  [not set] Template entry (TPL):  usr_courier Modem entry is built-in. 

This output gives you detailed information regarding the configuration settings for that specific modem type. If your modem is not on the list, you can add modem types to the database to meet your individual needs. You can also add modems to the list if the settings for a specific feature are not to your liking. To add a new modem to the database, use the modemcap edit new_modem_id command in global configuration mode. You follow the new_modem_id, which is whatever you choose to call your new entry, with the specific settings that you want to change:

 Router(config)#modemcap edit MyModem autoanswer SO=4 

This command creates a new modem type MyModem and sets the autoanswer field to change the value of S-register 0 to 4 (to answer on the fourth ring).

You can also choose to use an existing entry as a template for your custom modem by typing modecmcap edit new_modem_id template existing_model, where existing_model is one of the modems already on the list:

 Router(config)#modemcap edit MyModem template usr_sportster 

graphics/note_icon.gif

It is important to note that the creation of a new modem in the database is not stored in the IOS itself. It is stored in the startup config and does take up space. If you have a large config file and are running low on space, it might be wise to use an existing modem definition rather than create a custom modem.


graphics/alert_icon.gif

You will be tested on the syntax of the modemcap commands. Specifically, you need to know how to create a new entry and how to use settings from an existing entry in the database through templates.


Automatically Configuring a Known Modem Type

If you know what type of modem you installed, and the modem (or a compatible modem) exists in the modemcap database, you can simply tell the router which modem to use. The benefit of automatic configuration is that the modem will be reset each time it is used, and it will always use the same configuration settings. You use the modem autoconfigure type modem_type command:

 Router(config-line)#modem autoconfigure type MyModem 

If you specify the modem type in line configuration mode, it is initialized with the correct string for that modem and set to the desired state. The modem type specified must be in the modemcap database.

Automatically Configuring an Unknown Modem Type

If you are unsure of the modem type, you can let the router try to detect the modem. To have the router discover the modem, use the modem autoconfigure discovery command:

 Router(config-line)#modem autoconfigure discovery 

By issuing the modem autoconfigure discovery command, you instruct the modem to try each initialization string in the database at progressively slower bit rates until it receives a response from the modem. Once it gets a response, it uses that modem type at the then current speed for the remainder of the connection.

graphics/note_icon.gif

The benefit of modem discovery is that you can attach several different modems to a router and let the router determine the best method to communicate with each. The major drawback to auto-discovery is that the router must go through the entire process every time the modem is to be initialized or for every call. The overhead associated with the discovery process can obviously cause undesired results.


graphics/alert_icon.gif

Be sure that you know the syntax of the autoconfigure commands, specifically for discovery. The key here is that you are in "discovery" mode; you are not trying to "discover" the modem.




CCNP BCRAN Remote Access Exam Cram 2 (Exam Cram 640 - XXX)
CCNP BCRAN Remote Access Exam Cram 2 (Exam Cram 640 - XXX)
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 183

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net