Cisco Hidden Commands

Some days ago I received an e-mail from my colleague M.Farag about a hidden command on Cisco router’s IOS, this command allows us to achieve the BGP multipath loadsharing on two different ISPs, I didn’t know anything about this commands, so I decided to search about it and know what is it?

What is a hidden command?

The configuration of Cisco hardware is performed from the command line. Unlike other hardware devices that have a GUI (Graphical User Interface) to use for configuration, Cisco makes no attempt at making it easy. Indeed, there are hundreds of commands that a Cisco Engineer must learn in order to configure the device. These commands, moreover, are frequently not intuitive – at least not intuitive enough to make one say that if you learn one, you can learn the others because they are similar.

Most common commands can be discovered with the “?”. But hidden commands cannot be uncovered with that marker, “?”. The Tab key used for autocomplete cannot be used either. Hidden commands are not documented in Cisco PDFs or on websites. Some of the output is used strictly for engineering purposes. Finally, they are not supported by Cisco, which means that the results cannot be guaranteed.

Cisco hidden commands were put in place by engineers who were designing the Internetwork Operating System (IOS). They were interested in testing the IOS to see if it was performing as expected.


let’s start with the most impressive command (according to me), this command which we talked about earlier: bgp bestpath as-path multipath-relax

Cisco documentation describing BGP multipath load sharing states:

For multiple paths to the same destination to be considered as multipaths, the following criteria must be met:

  • All attributes must be the same. The attributes include weight, local preference, autonomous system path (entire attribute and not just length), origin code, Multi Exit Discriminator (MED), and Interior Gateway Protocol (IGP) distance.
  • The next hop router for each multipath must be different.

These restrictions work well when we load share to one ISP over multiple links. Unfortunately requirement of having identical AS paths doesn’t work well for situation when we want to load share to two different ISPs.

Fortunately, Cisco has this undocumented command that allows us to bypass this requirement (AS paths still have to be te same length, but don’t have to be identical)…

For more hidden commands: Elemental Net


CCIE Lounge blog

Wiki Nil

Bright Hub

Enjoy it… 😉

Don’t miss our Articles & Podcasts!

We don’t spam! Read our privacy policy for more info.

Osama Aboelfath is co-founder at Recursive-lookup. Osama is a network engineer and developer with over 10 years of production network engineering, deployment & operation.

13 comments on “Cisco Hidden Commands

  1. naturally like your web-site but you need to take a look at the spelling on quite a few of your posts. Many of them are rife with spelling issues and I to find it very troublesome to tell the truth then again I will surely come back again.

  2. What i do not realize is in fact how you’re now not actually much more smartly-favored than you may be right now. You are so intelligent. You already know therefore significantly relating to this subject, made me in my opinion believe it from a lot of various angles. Its like women and men don’t seem to be interested until it¡¦s something to accomplish with Girl gaga! Your individual stuffs outstanding. At all times maintain it up!

  3. So I am Here new in the field of IT and recently I have worked on Desktop. So I need to get more powerful debths in this field related to Desktop, Server and Network. So here please keep me updating to all related trick and tips related of Each an every.
    I need to be step up-wards for getting and gaining more knowledge from all of u.
    please dont let me away from u all, be in touch

    Regards, to u all.

Leave a Reply