NXOS:Show Default and Configured Settings on an Interface

Cisco has been making some improvements to the Cisco NXOS CLI. Here is one that I especially like on making the default configuration of an Ethernet interface visible with this simple (and kind of obvious) command show interface commands.

You are likely to be familiar with this show run command.

show run interface Ethernet 4/1

N7K2-POD2(config-if)# sh run inter ether 4/1
!Command: show running-config interface Ethernet4/1
!Time: Thu Jul 5 14:17:52 2012
version 6.0(1)
interface Ethernet4/1
switchport mode fabricpath
no shutdown
N7K2-POD2(config-if)#

But check this one out:

show run interface Ethernet 4/1 all

N7K2-POD2(config-if)# conf t
N7K2-POD2(config)# sh run inter ether 4/1 all
!Command: show running-config interface Ethernet4/1 all
!Time: Thu Jul 5 14:18:06 2012
version 6.0(1)
interface Ethernet4/1
no description
cdp enable
switchport
switchport mode fabricpath
no switchport monitor
no switchport dot1q ethertype
spanning-tree port-priority 128
spanning-tree cost auto
spanning-tree link-type auto
no spanning-tree bpduguard
no spanning-tree bpdufilter
speed auto
duplex auto
flowcontrol receive off
flowcontrol send off
no link debounce
no beacon
mtu 1500
delay 1
snmp trap link-status
logging event port link-status default
logging event port trunk-status default
bandwidth 10000000
no bandwidth inherit
mdix auto
storm-control broadcast level 100.00
storm-control multicast level 100.00
storm-control unicast level 100.00
load-interval counter 1 30
load-interval counter 2 300
no load-interval counter 3
medium p2p
no shutdown
N7K2-POD2(config)#

Straight away I can see all the defaults that are set on the interface. In the past I would have spent hours researching each of the defaults for a given interface when I was having problems. Soemtimes the interaction between the defaults and configuration can be a problem.

Nice stuff.

  • http://twitter.com/networkjanitor Kurt Bales

    Not to mention that doing a diff of before and after an OS upgrade will possibly point out some gotchas!

  • Paul Bundschuh

    If only they would put in the “default interface” command like in IOS…I use that a lot to “reset” interfaces.

  • arw

    IOS does the same thing using “show run all”. True, you can’t look at just a switchport config as easily, but this does work:

    #sh run all | sec interface GigabitEthernet0/2
    interface GigabitEthernet0/2
    no ip address
    ip redirects
    ip unreachables
    ip proxy-arp
    ip mtu 1500
    ip mfib forwarding input
    ip mfib forwarding output
    ip mfib cef input
    ip mfib cef output
    ip pim dr-priority 1
    ip pim query-interval 30
    ip cef accounting non-recursive internal
    ip load-sharing per-destination
    ip route-cache cef
    ip route-cache
    ip split-horizon
    ip igmp last-member-query-interval 1000
    ip igmp last-member-query-count 2
    ip igmp query-max-response-time 10
    ip igmp version 2
    ip igmp query-interval 60
    ip igmp tcn query count 2
    ip igmp tcn query interval 10
    load-interval 300
    shutdown
    duplex auto
    speed auto
    ipv6 nd reachable-time 0
    ipv6 nd ns-interval 0
    ipv6 nd dad attempts 1
    ipv6 nd prefix framed-ipv6-prefix
    ipv6 nd nud igp
    ipv6 nd ra lifetime 1800
    ipv6 nd ra interval 200
    ipv6 redirects
    ipv6 unreachables
    ipv6 mfib forwarding input
    ipv6 mfib forwarding output
    ipv6 mfib cef input
    ipv6 mfib cef output
    dot1q tunneling ethertype 0×8100
    snmp trap link-status
    arp arpa
    arp timeout 14400
    ethernet oam max-rate 10
    ethernet oam min-rate 1
    ethernet oam remote-loopback timeout 2
    ethernet oam timeout 5
    hold-queue 75 in
    hold-queue 0 out
    no bgp-policy accounting input
    no bgp-policy accounting output
    no bgp-policy accounting input source
    no bgp-policy accounting output source
    no bgp-policy source ip-prec-map
    no bgp-policy source ip-qos-map
    no bgp-policy destination ip-prec-map
    no bgp-policy destination ip-qos-map
    #

  • Michalis Bersimis

    in IOS also there is the command “Show run all” which shows every single command that the configuration can take!!

  • Iamjeffvader

    ALU Timos has a similar function with ‘info’ which gives you what you have configured under a particular context, ‘info detail’ gives you all defaults as well. So if you are at config>router>interface and info detail you see the interface defaults. At config > router you see the defaults for all igps, mpls, interfaces etc.