Never Too Old – NXOS Interface Ranges

John Looks Old

Cisco’s NXOS – the friendly face that’s just like that old IOS thing you used to know, but has enough little differences to trip you up constantly. Moving between IOS and NXOS is getting to be a little like moving between IOS and Junos. Is it mac-address-table or mac address-table? Can I quit or must I exit? Can I use show running today?

Mostly the documentation is pretty good when you get stuck, but yesterday a colleague asked me about configuring ranges of interfaces and I confess to getting very confused.

NXOS Interface Ranges

In principal, configuring a range or interfaces is simple. Here’s a snippet from the interface range documentation for NXOS 5.x:

The interface range configuration mode allows you to configure multiple interfaces with the same configuration parameters. After you enter the interface range configuration mode, all command parameters you enter are attributed to all interfaces within that range until you exit out of the interface range configuration mode.

You enter a range of interfaces using dashes (-) and commas (,). Dashes separate contiguous interfaces and commas separate noncontiguous interfaces. When you enter noncontiguous interfaces, you must enter the media type for each interface.

The following example shows how to configure a contiguous interface range:

switch(config)# interface ethernet 2/29-30

The following example shows how to configure a noncontiguous interface range:

switch(config)# interface ethernet 2/29, ethernet 2/33, ethernet 2/35

So far, so good; this works just fine.

Keep Searching

As I kept looking for resources, further down in the same document I found this regarding configuring port profiles:

This example shows how to assign the port profile named adam to Ethernet interfaces 7/3 to 7/5, 10/2, and 11/20 to 11/25:

 switch# configure terminal
 switch(config)# interface ethernet 7/3–5, 10/2, 11/20–25
 switch(config-if)# inherit port-profile adam

This example contradicts the earlier configuration guidance though. If you try it in version 6.0:

nxos6(config)# int e1/1, 1/3
 Invalid interface format at ‘^’ marker.

And in 5.0.2:

nxos5(config)# int e1/1, 1/3
 Invalid command (unexpected token) at ‘^’ marker.

Oops. It’s also interesting (to me) to note that the two examples of entering an interface range to configure it show two different configuration mode prompts. The former:


The latter:


At least allegedly. Since the latter form of configuration does not work, I assume that the rest of the example is similarly made up!

Mixing Media Types

The other thing that wasn’t clear was whether I could mix media types on the same line. For example, could I configure an Ethernet interface and a Port-Channel interface as part of the same interface range? After all, the first guide says:

When you enter noncontiguous interfaces, you must enter the media type for each interface.

That sounds to me like the purpose of entering the media type is to allow mixing!

nxos6(config)# interface port-channel 1, e1/1
 Invalid interface format at '^' marker.

Sadly not.

Never Too Old to Learn

What do I know now? First, that you have to say Ethernet each time you add a new non-contiguous range of ports to the interface command. I also know that the second example in the documentation appears to be total fiction, invented on the spot (rather than tested on a router) by somebody in the documentation department. And now I know that you don’t seem to be able to mix interface types in a single command.

Live and learn.

4 Comments on Never Too Old – NXOS Interface Ranges

  1. As an update, credit where it’s due: after this post was tweeted out, the Cisco DC team as well as Omar Sultan jumped right on it, and before I could take a breath, Omar had raised a case with the documentation team about the issues I outlined above.

    Now *that’s* service! Thank you, folks – a seriously impressive response.

      • Well, I can’t speak for Cisco’s internal documentation processes so I don’t know what’s a reasonable timeframe. Knowing Ron Fuller, I can pretty much guarantee you that PR was about the last thing on his mind. Ron is pretty straightforward and simply wants to help.

        • True. Indeed I don’t believe what I said. I just wanted to be a bit harsher on them because expectation are very high. Cisco still have the best documentation I have ever seen from from a tech company.

Leave a Reply

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.