Setting Up a WAN Serial Connection
Setting up Wide Area Network (WAN) serial connection management for your Cisco device is quite straight-forward. For this example, you connect two Cisco routers by using a back-to-back cable or DTC-DTE cable, emulating a service provider connection between the two devices.
Configuring your serial connection
The basic configuration of a serial connection is no different than the other types of connections you enter Interface Configuration mode, set the IP address, and remove the shutdown command. Here is the code on Router1 to setup the required connection.
Router1>enable Password: Router1#config terminal Router1(config)#interface serial 0 Router1(config-if)#ip address 188.8.131.52 255.0.0.0 Router1(config-if)#no shutdown Router1(config-if)#exit Router1(config)#exit
Configuring serial link protocols
With the basic IP configuration out of the way, you are ready to implement the serial link protocol or encapsulation protocol. You can choose from either High-Level Data Link Control (HDLC) or Point to Point Protocol (PPP), which are encapsulation protocols used to format data to send across the wire. When you are sending data over a serial link, your data is encapsulated using a serial link protocol. Both ends of the connections must support and implement the same protocol.
HDLC does not support authentication. Because of this limitation and the compatibility issue, most people tend to implement PPP.
Working with HDLC
HDLC is an ISO standard, but that has not stopped vendors from putting their own spin on the implementation, which means that its implementation is somewhat vendor-specific.
HDLC is the default serial link protocol implemented on Cisco routers, so with no other changes, this is the protocol you are likely to find in use. To ensure that the HDLC protocol to be used, and for you to see the command, run the following command:
Router1>enable Password: Router1#config terminal Router1(config)#interface serial 0 Router1(config-if)#encapsulation hdlc Router1(config-if)#exit Router1(config)#exit
Both ends of the serial link must use the same serial link protocol, so if one of your routers is using HDLC, it must be implemented on the other routers as well.
Working with PPP
PPP is an open standard supported by many vendors, and it tends to be compatible among the vendors. PPP is also link type independent, meaning it can run over many physical serial link types, and supports the following two types of authentication protocol:
PAP (Password Authentication Protocol): An authentication protocol that provides security by a username and a password that are transmitted in plain text when a connection is established between two hosts. This option is not the most secure one because it allows the authentication information to be captured by someone who may be capable of capturing data in-between your routers.
CHAP (Challenge Handshake Authentication Protocol): This protocol does not send the authentication information in plain text. When implementing CHAP, a secret password is configured on both routers, the same secret at both ends. This secret is then encoded by a mathematical function called a hashing algorithm, and the resulting value is called the hash value.
This hash value is sent over the network rather than the secret. A hash value is a unique value that can be duplicated only if a user knows the original secret value.
Router1>enable Password: Router1#config terminal Router1(config)#username Router2 password mypass Router1(config)#interface serial 0 Router1(config-if)#encapsulation ppp Router1(config-if)#ppp authentication chap Router1(config-if)#exit Router1(config)#exit
Make note of the username created in the preceding commands; this username matches the hostname of the router that will be connecting to Router1. The password assigned to this account is the secret that will be used. On Router2, you need to create a Router1 account with a matching password.
Setting the clock rate
To finally get your system up and running, you need to set up the clock speed, which controls the speed at which data is sent over the connection in bits per second (bps). The DCE sets and controls the clock speed. So, in the case of a link from a service provider, the provider sets the clock speed, and when you connect to the external CSU/DSU, your serial port accepts the configuration.
In the case of a back-to-back cable, one of the routers plays the role of the DCE, and that device sets the clock speed for the connection. If you are implementing the same type of layout in a lab, check the cable and identify the DCE side of the cable; then implement the clock speed with a command similar to the following:
Router1>enable Password: Router1#config terminal Router1(config)#interface serial 0 Router1(config-if)#clock rate 64000 Router1(config-if)#exit Router1(config)#exit
In this example, the clock rate is set at 64000 or 64 Kbps.
To find the clock rates that are available on your router, type clock rate ? when in Interface Configuration mode on your serial connection, as shown in this command example:
Router1>enable Password: Router1#config terminal Router1(config)#interface serial 0 Router1(config-if)#clock rate ? 1200 2400 4800 9600 19200 38400 56000 64000 72000 125000 <300-125000> Choose clockrate from list above Router1(config-if)#end