If you’ve been experimenting with Cisco switches and routers, and searching out their various capabilities, you may have come across an enigmatic feature on the interfaces of these devices. Specifically, you can adjust an interface’s “bandwidth” parameter to a value of your choice, within a particular range.
Now if you’ve tried this strange parameter, you will probably have found that it doesn’t do what you intuitively would think it does.
However, it is a very important parameter and can directly affect the behavior of your network in many ways.
In this article, we’ll take a deeper look at the bandwidth command and parameter on the interfaces of Cisco IOS routers and switches and see how it can be used to fine-tune the behavior of your network.
What is the Bandwidth Command on Cisco Devices
The bandwidth command is an interface configuration command that can be implemented on almost all Cisco devices.
The command changes the bandwidth parameter of the interface, which is in kilobits per second (kb/s) and its default value is always equal to the actual speed of the interface.
For example, take a look at the following output of the show interface command for a GigabitEthernet interface of a Cisco IOSv router:
R1#show interfaces gigabitEthernet 0/1
GigabitEthernet0/1 is up, line protocol is up
Hardware is iGbE, address is 5254.001a.14c7 (bia 5254.001a.14c7)
Internet address is 192.168.12.1/24
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
!
!<– Output Omitted –>
!
R1#
Note the value of the bandwidth parameter indicated by “BW” in bold in the above output. It has a value of 1000000 kb/s or 1 Gb/s, which is the speed of the interface itself.
We can change this value using the following set of commands:
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface gigabitEthernet 0/1
R1(config-if)#bandwidth 500
R1(config-if)#
The above commands set the bandwidth value of the Gi0/1 interface to 500 kb/s. The output below verifies this:
R1#show interfaces gigabitEthernet 0/1
GigabitEthernet0/1 is up, line protocol is up
Hardware is iGbE, address is 5254.001a.14c7 (bia 5254.001a.14c7)
Internet address is 192.168.12.1/24
MTU 1500 bytes, BW 500 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
!
!<– Output Omitted –>
!
R1#
Note: You will see in the output of the show interface command the value of BW in units denoted as Kbit/sec. This refers to “kilobits per second,” however, the correct way to denote this unit, according to the International System of Units or SI, is to use kbit/s or kb/s. For this reason, in this article, I have chosen to use the latter in the text of this article.
Note that the above command DOES NOT actually change the speed of the Gigabit interface but just a label value given to this specific interface as we’ll explain below.
What the Bandwidth Command Actually Does
Now if you’ve experimented with this command, you will quickly find that it doesn’t actually change the bandwidth of the interface itself.
The interface in the above example is still a GigabitEthernet interface capable of up to 1 Gb/s throughput, even though the value of the bandwidth parameter is set to 500 kb/s.
So, the bandwidth parameter doesn’t physically change the actual speed of the interface. Instead, it is used as a “label” or an “informational indicator” that can be leveraged by various other protocols to perform their functions.
In particular, the bandwidth parameter has two primary purposes described in detail below.
Bandwidth Parameter in Routing protocols
The bandwidth parameter can be used to influence the operation of routing protocols. Certain protocols, like OSPF and EIGRP, use the bandwidth value of interfaces in their metric calculations.
For these protocols, the bandwidth command can impact the path selection for routing traffic. For example, OSPF uses a formula based on bandwidth value on interfaces, to calculate the cost of a route.
EIGRP also uses the configured interface bandwidth (along with delay, reliability, and load) in its complex metric calculation.
In the case of OSPF, the cost of traversing a particular interface depends upon the configured bandwidth value.
The OSPF metric is determined using the cumulative cost based on the bandwidth values that are configured on the successive interfaces encountered to reach a particular destination.
Similarly, it is the lowest bandwidth value found on an interface along the path to a particular destination that is used in the EIGRP calculation of the metric.
Taking this into account, it can be clearly understood that by adjusting the bandwidth on an interface, you can make it either more preferable or less preferable than other paths, thus affecting the overall traffic flow on your network.
Bandwidth Parameter and Quality of Service Mechanisms
The bandwidth command can also influence QoS mechanisms on the router. It can be used in calculations for features such as traffic shaping and policing, which can control how much traffic is sent and/or received at a given moment.
Policy maps, Class-Based Weighted Fair Queuing (CBWFQ), and Low Latency Queuing (LLQ) are additional QoS features that make direct usage of the bandwidth value configured on interfaces to achieve their purpose.
Additional Configuration Options
Depending upon the IOS version and the platform being used, you may find that the bandwidth command has some additional configuration options. Take a look at the output of the context-sensitive help below:
R1(config-if)#bandwidth ?
<1-10000000> Bandwidth in kilobits
inherit Specify how bandwidth is inherited
qos-reference Reference bandwidth for QOS test
receive Specify receive-side bandwidth
R1(config-if)#bandwidth
From this output you can see the following:
- Bandwidth can be defined in kb/s within the range of 1 to 10000000, or 1 kb/s to 10 Gb/s.
- The inherit keyword is used when the interface in question is a subinterface, and it specifies how the subinterface inherits its bandwidth from the physical interface to which it belongs.
- The qos-reference keyword is compatible with and related to the shape (percent) and police (percent) commands on platforms that support them. Both commands apply the configured percentage to the value indicated by the qos-reference keyword to achieve shaping or policing.
- The receive keyword can be used to enable asymmetric bandwidth values so that the transmitted (inherit) and the received bandwidth values are different.
For more information on the usage of the bandwidth command and the various keywords, take a look at the following two command references:
Some Important Final Words
The bandwidth interface command on Cisco IOS devices serves an important role, even though it doesn’t actually control the physical transmission speed of an interface.
This command provides a metric that’s primarily used by routing protocols and by QoS mechanisms.
For routing protocols like OSPF and EIGRP, the bandwidth command can significantly influence path selection.
It’s critical to note, however, that the “bandwidth” parameter should be left at its default value to reflect the actual speed of the interface accurately to ensure optimal path calculations.
Only if absolutely necessary, under carefully controlled conditions, and with great caution, should the value be changed in a production network.
In terms of QoS applications, constructs such as Class-Based Weighted Fair Queueing (CBWFQ), Low Latency Queueing (LLQ), and traffic shaping and policing use the bandwidth value to enforce policies, provide minimum bandwidth guarantees, or limit data rates.
It’s crucial to remember that changes in bandwidth settings should be managed cautiously.
Misconfigurations can lead to suboptimal routing decisions or inappropriate QoS treatment. Therefore, network administrators should ensure they fully understand the implications of the bandwidth command and use it judiciously within their network environments.
The bandwidth parameter and command is an integral part of Cisco IOS and allows for the granular control and fine-tuning required in modern networking environments, reflecting the versatility and power of Cisco’s device management.
Always refer to the latest Cisco IOS documentation for the most accurate command syntax and descriptions, as capabilities can vary between different IOS versions and platforms.
Related Posts
- What is a Wildcard Mask – All About Wildcard Masks Used in Networking
- All About the “ip helper-address” Command on Cisco – Configuration and Explanation
- How to Find IP Address From MAC Address on Cisco Devices
- Cisco Command to Test a Copper UTP Ethernet Cable on a Switch
- What is Cisco Meraki ? Some FAQ About Cisco Meraki You Need to Know