Quick tip: display interface bandwidth

To display bandwidths of all interfaces configured on the router use show interface | include protocol|BW command.

Here is a sample printout:

Rtr#show interface | include protocol|BW
FastEthernet0/0 is administratively down, line protocol is down
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
Serial1/0 is up, line protocol is up
MTU 1500 bytes, BW 2000 Kbit, DLY 20000 usec,
Serial1/1 is up, line protocol is up
MTU 1500 bytes, BW 2000 Kbit, DLY 20000 usec,
Serial1/2 is up, line protocol is up
MTU 1500 bytes, BW 2000 Kbit, DLY 20000 usec,
Serial1/3 is administratively down, line protocol is down
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
Loopback0 is up, line protocol is up
MTU 1514 bytes, BW 8000000 Kbit, DLY 5000 usec,

You could define an alias to create a new IOS command generating this printout (for example, alias exec bw show interface | include protocol|BW). You could also write a simple Tcl script that would accept an interface name and display the bandwidth of that interface.

7 comments:

  1. Good one. I have a suggestion on a similar note, you can also quickly view input/output (great for tracking down where that spanning tree loop is coming from) using: "show interface | inc line|bits"
  2. I created an alias called sid which shows up/down and down down interfaces. I am not sure about the 11 spaces but you can up arrow and rerun the command modifying the space count until you get a match. Useful command to quickly identify down links on enterprise systems.

    sh int desc | inc up <-- 13 spaces --> down|down <-- 11 spaces(?)---> down

    dakotaglory.com
  3. To match multiple spaces, use ' +' (without quotation marks) or (to make things more explicit) [ ]+
  4. Nice! Thank you.
  5. Do you know of a list of system variables that are accessible for CLI use? For example, to "show log | include $DATE" in order to show only today's entries. I did a search on your site for variables and for cli variables. Maybe IOS variables?
  6. Nothing similar available in IOS, its CLI is not sh-like. Use tclsh if you need more scripting capabilities.
  7. Long shot I know but I had to ask...Thanks again.
Add comment
Sidebar