Configuring Serial Interfaces on a Cisco Router
Serial interfaces are used to communicate with other local Cisco Routers or to establish a connection to the WAN through a CSU/DSU device.
required steps
The required steps are almost identical to the configuration of any other interface’s with a few exceptions. When connecting two Cisco routers directly with a DCE/DTE cable, the router which has the DCE end of the cable connected to it has to be configured to dictate the clock rate. It is essential for proper communication.
optional commands
Whenever we configure an interface it is always good practice to add a description. Additionally you could configure authentication on the interface if you changed the encapsulation. If you’d like to find out how configure authentication on serial interfaces, have a look at these tutorials:
Configuring PPP Authentication # Method1
Configuring PPP Authentication # Method2
By default Cisco routers use HDLC as encapsulation method on all synchronous serial interfaces.
before you begin
It’s always good practice to issue a few debug commands related to the configuration before you start configuring so you see the changes immadiatelly. In this case the commands are debug serial interface and debug cdp events.
configuration
First make sure that the two routers are connected properly! Then enable debugging.
R1
R1>enable R1#debug serial interface Serial network interface debugging is on R1#debug cdp events CDP events debugging is on R1#
Check which interfaces are available and find out if the router has the DCE or the DTE end of the cable connected to it.
R1#sh ip interface brief Interface IP-Address OK? Method Status Protocol FastEthernet0/0 10.0.0.5 YES NVRAM up down Serial0/0 unassigned YES NVRAM administratively down down R1#show controllers serial 0/0 Interface Serial0/0 Hardware is PowerQUICC MPC860 DTE V.35 clocks stopped. idb at 0x82B4F5F8, driver data structure at 0x82B56D1C --More-- R1#
You can see from this output the R1 is the DTE so no clock rate configuration is required.
Configuring the interface on R1
R1#conf terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface Serial0/0
R1(config-if)#description LINK TO R2
R1(config-if)#ip address 192.168.1.1 255.255.255.252
R1(config-if)#no shutdown
*Mar 1 11:01:18.570: %LINK-3-UPDOWN: Interface Serial0/0, changed state to down
*Mar 1 11:02:16.569: Serial0/0: attempting to restart
*Mar 1 11:02:46.570: Serial0/0: attempting to restart
Note that even though the interface has been enabled, it’s state stays down until a router on the other end comes up.
Now do the same on R2. Start by enabling debugging.
R2
R2>enable R2#debug serial interface Serial network interface debugging is on R2#debug cdp events CDP events debugging is on R2#
Check interfaces and controllers.
R2#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 unassigned YES unset administratively down down
Serial0/0 unassigned YES unset administratively down down
TokenRing0/0 unassigned YES unset administratively down down
R2#show controllers serial0/0
Interface Serial0/0
Hardware is PowerQUICC MPC860
DCE V.35, no clock
idb at 0x82B2F918, driver data structure at 0x82B3703C
--More--
R2#
R2 is the DCE so we need to add the clock rate command!
Configuring the interface on R2.
R2#conf terminal Enter configuration commands, one per line. End with CNTL/Z. R2(config)#interface serial0/0 R2(config-if)#description LINK TO R1 R2(config-if)#ip address 192.168.1.2 255.255.255.252 R2(config-if)#clock rate ? Speed (bits per second) 1200 2400 4800 9600 14400 19200 28800 32000 38400 56000 57600 64000 72000 115200 125000 128000 148000 192000 250000 256000 384000 500000 512000 768000 800000 1000000 1300000 2000000 4000000 8000000 300-8000000 Choose clockrate from list above R2(config-if)#clock rate 128000 R2(config-if)#no shutdown R2(config-if)# *Mar 1 16:06:07.265: PowerQUICC(0/0): DTR is up. *Mar 1 16:06:07.265: PowerQUICC(0/0): DTR is up. *Mar 1 16:06:09.264: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up *Mar 1 16:06:10.266: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up *Mar 1 16:06:10.442: Serial0/0: HDLC myseq 0, mineseen 0, yourseen 0, line up *Mar 1 16:06:20.442: Serial0/0: HDLC myseq 1, mineseen 1*, yourseen 1, line up *Mar 1 16:06:27.438: CDP-EV: Lookup for ip phone with idb= Serial0/0 ip= 192.168.1.1 mac= 0000.0000.0000 platform= Cisco 2610XM
Almost immediately you enter the no shutdown command, the interface and the protocol status changes to up/up. Because we enabled cdp debugging as well, we can see some info about the new neighbour too. Neat!
verification
You can check everything you configured with one single command!
R2#show interface serial 0/0 Serial0/0 is up, line protocol is up Hardware is PowerQUICC Serial Description: LINK TO R1 Internet address is 192.168.1.2/30 MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation HDLC, loopback not set Keepalive set (10 sec) Last input 00:00:09, output 00:00:10, output hang never Last clearing of "show interface" counters 01:29:26 Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated) Available Bandwidth 1158 kilobits/sec 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 105 packets input, 6960 bytes, 0 no buffer Received 105 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 108 packets output, 7590 bytes, 0 underruns 0 output errors, 0 collisions, 2 interface resets --More--
We can’t say that it’s all good until we pinged the other side.
R2#ping 192.168.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 16/16/16 ms R2#
commands explained
Commands used with a brief explanation.
debug serial interface: Enables debugging on all serial interfaces
debug cdp events: Enables the monitoring of all cdp events
show ip interface brief: Shows a brief information about all interfaces on the router
show controllers serial0/0: Detailed information about the selected serial interface
interface serial0/0: Enters into interface configuration mode
description LINK TO R1: Sets the description on the interface
ip address 192.168.1.2 255.255.255.252: Sets the IP Address
clock rate 128000: Sets the clock rate on the serial interface
no shutdown: Enables the interface
show interface serial 0/0: Shows detailed information about the interface
i just saw your comment this is really important to me
job well done. but is it base on LAN OR WAN connection?
Thanks man