NX-OS User Modes
Cisco NX-OS CLI is divided into command modes, which define the actions available to the user. Command modes are "nested" and must be accessed in sequence. As you navigate from one command mode to another, an increasingly larger set of commands become available. All commands in a higher command mode are accessible from lower command modes. For example, the show commands are available from any configuration command mode. Figure 1-1 shows how command access builds from EXEC mode to global configuration mode.
Figure 1-1 NX-OS Command Access from EXEC Mode to Global Configuration Mode
EXEC Command Mode
When you first log in, Cisco NX-OS Software places you in EXEC mode. As demonstrated in Example 1-3, the commands available in EXEC mode include the show commands that display device status and configuration information, the clear commands, and other commands that perform actions that you do not save in the device configuration.
Example 1-3. Cisco NX-OS EXEC Mode
Congo# show interface ethernet 1/15 Ethernet1/15 is down (SFP not inserted) Hardware: 10000 Ethernet, address: 001b.54c2.bbc1 (bia 001b.54c1.e4da) MTU 1500 bytes, BW 10000000 Kbit, DLY 10 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA auto-duplex, auto-speed Beacon is turned off Auto-Negotiation is turned off Input flow-control is off, output flow-control is off Switchport monitor is off Last link flapped never Last clearing of "show interface" counters never 30 seconds input rate 0 bits/sec, 0 packets/sec 30 seconds output rate 0 bits/sec, 0 packets/sec Load-Interval #2: 5 minute (300 seconds) input rate 0 bps, 0 pps; output rate 0 bps, 0 pps L3 in Switched: ucast: 0 pkts, 0 bytes - mcast: 0 pkts, 0 bytes L3 out Switched: ucast: 0 pkts, 0 bytes - mcast: 0 pkts, 0 bytes ! Output omitted for brevity Congo#
Global Configuration Command Mode
Global configuration mode provides access to the broadest range of commands. The term global indicates characteristics or features that affect the device as a whole. You can enter commands in global configuration mode to configure your device globally or enter more specific configuration modes to configure specific elements such as interfaces or protocols as demonstrated here:
Nx7000# conf t Nx7000(config)# interface ethernet 1/15
Interface Configuration Command Mode
One example of a specific configuration mode that you enter from global configuration mode is interface configuration mode. To configure interfaces on your device, you must specify the interface and enter interface configuration mode.
You must enable many features on a per-interface basis. Interface configuration commands modify the operation of the interfaces on the device, such as Ethernet interfaces or management interfaces (mgmt 0).
Example 1-4 demonstrates moving between the different command modes in NX-OS.
Example 1-4. Interface Ethernet1/5 Is a 10Gigabit Ethernet Interface—Show How the Interface Is Designated at Ethernet and Not Interface Ten1/15.
congo# conf t congo(config)# interface ethernet 1/15 congo(config-if)# exit Congo# show interface ethernet 1/15 Ethernet1/15 is down (SFP not inserted) Hardware: 10000 Ethernet, address: 001b.54c2.bbc1 (bia 001b.54c1.e4da) MTU 1500 bytes, BW 10000000 Kbit, DLY 10 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA auto-duplex, auto-speed Beacon is turned off Auto-Negotiation is turned off Input flow-control is off, output flow-control is off Switchport monitor is off Last link flapped never Last clearing of "show interface" counters never 30 seconds input rate 0 bits/sec, 0 packets/sec 30 seconds output rate 0 bits/sec, 0 packets/sec Load-Interval #2: 5 minute (300 seconds) input rate 0 bps, 0 pps; output rate 0 bps, 0 pps L3 in Switched: ucast: 0 pkts, 0 bytes - mcast: 0 pkts, 0 bytes L3 out Switched: ucast: 0 pkts, 0 bytes - mcast: 0 pkts, 0 bytes Congo#
NX-OS supports different Ethernet interface types such as Gigabit Ethernet and 10-Gigabit Ethernet interfaces. All interfaces are referred to Ethernet; NX-OS does not designate Gigabit or 10-Gigabit Ethernet interfaces. In Example 1-4, interface 1/15 is a 10-Gigabit Ethernet interface.