Friday 15 February 2013

My Five Most Annoying IOS Features

That is Cisco IOS by the way - if you think this is anything to do with iphones I suggest you run along because Cisco have been calling it IOS since Apple was just a sapling.
I like Cisco IOS but there are just a few annoying "features" than continually annoy / baffle me. There are probably legitimate reasons for their existence but to me they just seem like little flaws that could be easily ironed out but we have all just learned to live with.

  1. Context sensitive help and autocomplete do not work in configuration mode
    Being lazy by nature I always type as little as I need to which is why autocomplete is great. I can type "sh int" and I get a list of the interfaces on the router. If I am not sure if that is the command I want I can hit tab and it will show me the autocomplete entry for what I have typed so far:

    R1#sh int <Press TAB>
    R1#sh interfaces


    If there are multiple autocomplete entries for what I have typed so far tab does nothing but a question mark will show me what my options are:

    R1#sh in <Press TAB>
    R1#sh in <Press TAB again, slightly harder while frowning>
    R1#sh in?
    interfaces  inventory

    That's all great. Now let's go into configuration mode. We can use the "do" command to enter exec level commands when in configuration mode:

    R1#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    R1(config)#do sh int

    This works, but only because "show interfaces" is the only autocomplete option for "sh int". Forgotten the command? Hard luck:

    R1(config)#do sh in <Press TAB>
    R1(config)#do sh in? <Press ENTER>
    LINE    <cr>
    <Bang head on keyboard - what the hell does LINE mean???>

    So you are stuck in a weird situation where, if you know the full command or the only viable autocomplete option then you can enter it, otherwise you get no help. This seems very obtuse to me - it is like IOS knows what you want but will only help you when it feels like it. Would it really be so hard to fix this?
  2. You must write the full interface name in the extended ping
    Not a huge labour but a bit irksome. When you run an extended ping and specify the source interface in the shortened form IOS gets all sniffy and makes you write the whole thing. It takes me about 4 hours for me to type "gigabitethernet"

    Protocol [ip]:
    Target IP address: 1.2.3.4
    Repeat count [5]:
    Datagram size [100]:
    Timeout in seconds [2]:
    Extended commands [n]: y
    Source address or interface: fa0/0
    Translating "fa0/0
    % Invalid source. Must use IP address or full interface name without spaces (e.g. Serial0/1)Source address or interface: fastethernet0/0
  3. Sometimes you have to add a parameter when it should really be done automatically
    Some commands only take one keyword as a parameter but IOS forces you to put it there even though there are no other options than having it - so why not put it there automatically?

    An example:

    R1(config-if)#ip nbar ?
      protocol-discovery  Enable NBAR protocol discovery

    R1(config-if)#ip nbar
    % Incomplete command.

    R1(config-if)#ip nbar ?
      protocol-discovery  Enable NBAR protocol discovery

    R1(config-if)#ip nbar protocol-discovery ?
      <cr>

    Here we have the command "ip nbar" which only takes the parameter "protocol-discovery". You can't leave it off and it is the only parameter it can take. So why not just fill it in? Like I haven't got enough to do in my busy day...
  4. Going in to configuration mode and not making changes is still logged as you making changes
    I am sure there is a good reason for this one but I can't put my finger on it. If you go in to configuration mode and then just exit out again without making any changes it is logged in the log as you having made a change. Watch this:

    R1#sh clock
    *07:11:35.710 UTC Fri Mar 1 2002
    R1#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    R1(config)#^Z
    R1#
    *Mar  1 07:11:38.986: %SYS-5-CONFIG_I: Configured from console by bob on console
    R1#sh log
    *Mar  1 07:11:38.986: %SYS-5-CONFIG_I: Configured from console by bob on console

    This is written to the log file and also added to the top of the running config. In a multi user environment this can lead to much finger pointing when things go wrong:
    dim-witted non-technical management type: Bob, it says you changed the config yesterday a few hours before that network meltdown we had.
    bob: No, I did not change anything.
    dim-witted non-technical management type: Well it says here that you were the last person to change the config
    bob: No honestly I did not change anything. I just entered configuration mode and then exited it.
    dim-witted non-technical management type: Clear your desk bob
  5. Pipe include sometimes lies
    You can use the pipe command to filter the results of a command to make it easier to read. The pipe include command says only shows the lines including a certain string except sometimes it lies. Consider this:

    R1#sh ip route | inc .1.0
    C    192.168.11.0/24 is directly connected, FastEthernet0/0
    C    192.168.1.0/24 is directly connected, FastEthernet0/0


    The string here is ".1.0" which is in the second line but not in the first. I don't know why this happens - I assume it must be ignoring the trailing . for some reason.