Bandwidth and Clock Rate on Serial Interfaces

Bandwidth and Clock Rate on Serial Interfaces
 


Clock rate is to be used in DCE in serial link to configure the clock speed for the link.

However, bandwith is the value that will be used in computation of metrics depending on bandwitch, for example in EIGRP.

In serial interfaces you need to make sure that  clock rate and bandwith do match (changing clock rate does not automatically changes bandwith) Otherwise it could happen that your routing protocol does not take into account a link or sets the best route through the wrong link, because of bad settings in bandwith parameter.
 


In order to understand clock rate we first need to understand how the cabling works on routers. When connecting two routers together with a serial cable, one of the routers needs to host the DCE (Data Communications Equipment) side of the cable, and the other will host the DTE (Date Terminal Equipment) side. Most serial cables are marked on the connector if it’s the DTE or DCE.

So what’s the difference between the 2 sides? The DCE side of the cable is the side that sets the speed of the link (also known as clocking). Based on this, it’s safe to assume that the cable coming out of your router and going to your service provider is the DTE side, since you service provider sets the speed of the line based on the subscription you have purchased. The DTE side of the cable is where the communications terminate ie: your router terminates the connection from the service provider.

From a configuration point of view the DCE side of the cable is able to use the clock rate command to set the speed of the line. If the command is not used the interface will run at the maximum speed supported by the interface. If you have only subscribed for a 64k line, then the clock rate would have been set on the DCE side of the cable using the command ‘clock rate 64000’ under the interface.

router# conf t
router(config)# interface serial 1/0
router(config-if)# clock rate 64000 (represented in BITS per second)

If you try use the clock rate command on the DTE interface you will receive the following error message “This command applies only to DCE interfaces”

To identify which end of the cable has been plugged into a Cisco router, you can also use the command “show controller”.

Cisco Show Controller Command
The bandwidth command however does not adjust the speed of the line at all, however it should be configured on ALL DTE and DCE interfaces because it is used by;

1/ Routing protocols – to calculate the cost of a path
2/ QOS (Quality of Service) – to identify how much bandwidth is availble to prioritize,

If no bandwidth command has been configured on the interface, Routing protocols and QOS will assume the line is running at the maximum speed supported by the interface which can result in incorrect routing and incorrect prioritization of packets.

The bandwidth command is issued under the interface, as is represented in Kilobits per second

router# conf t
router(config)# interface serial 1/0
router(config-if)# bandwidth 64 (represented in kilobits per second)


When you set the clock rate for a serial interface, you are setting the speed of the interface, in other words, the bandwidth (bandwidth meaning rate of data transfer).  When using this command it's in the form of bits: 64000 bits = 64 kb.

As mentioned in the above post, there is also an interface sub-command available; bandwidth.  This command tells IOS how to perceive the speed of any particular interface in order to manipulate routing metrics; note that the bandwidth command doesn't physically change the speed of an interface like the clock rate command does.

  • EIGRP metric formula=     [(10^7 / least-bandwidth)+cumulative delay)256]

                                                         [(kb  /   kb                     ) + 10's of microseconds)256]

 

    • least-bandwidth is the slowest speed interface of all the outgoing interfaces to reach any particular subnet
    • cumulative delay is the delay added up from all the outgoing interfaces to reach any particular subnet.  The formula is 10's of microseconds, but if you do a show command to look up the delay for any interface, it shows the delay in just microseconds. 
  • OSPF metric formula =    (Ref-BW / Int-BW) = cost

                                                         10^8    /  bandwidth

(The above formula is to calculate cost for any given outgoing interface to reach any particular subnet in a route.  OSPF then adds up all the costs in a route and selects the least cost route to put into it's routing table.)

The OSPF formula can be a little confusing.  10^8 is in bits, but the formula is calculated in megabits.

Example:  100 / 10

You can of course break it down into bits if you want.

Example:  100000000 / 10000000

 For Support