Configuring Serial Interfaces
Problem
You want to configure a serial interface for a WAN connection.
Solution
When you configure a router’s serial interface, you need to specify the encapsulation, the IP address, and whether the interface will be the DCE or DTE:
Router3#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router3(config)#interfaceRouter3(config-if)#Serial1descriptionRouter3(config-if)#WAN Connection to Chicagoip addressRouter3(config-if)#192.168.99.5 255.255.255.252encapsulationRouter3(config-if)#hdlcclock rateRouter3(config-if)#56000no shutdownRouter3(config-if)#exitRouter3(config)#endRouter3#
Discussion
There are a couple of extremely important commands in this sample configuration. The first sets the serial encapsulation protocol. In this case, we have used the High-Level Data Link Control (HDLC) protocol, which is a standard Layer 2 protocol for synchronous serial connections:
Router3(config-if)#encapsulationhdlc
In fact, HDLC is the default encapsulation type for synchronous serial interfaces on Cisco routers, so we could have omitted this command. Because it is the default, this command does not show up in the configuration when we show the configuration:
Router3#show running-config interfaceBuilding configuration... Current configuration : 123 bytes ! interface Serial1 description WAN Connection to Chicago ip address 192.168.99.5 255.255.255.252 clock rate 56000 end Router3#Serial1
If you prefer to use a different encapsulation ...