Configuring Terminal Settings and Sessions

This chapter contains the following sections:

About Terminal Settings and Sessions

This section includes information about terminal settings and sessions.

Terminal Session Settings

The Cisco NX-OS software features allow you to manage the following characteristics of terminals:

Terminal type
Name used by Telnet when communicating with remote hosts
Length
Number of lines of command output displayed before pausing
Width
Number of characters displayed before wrapping the line
Inactive session timeout
Number of minutes that a session remains inactive before the device terminates it

Console Port

The console port is an asynchronous serial port that allows you to connect to the device for initial configuration through a standard RS-232 port with an RJ-45 connector. Any device connected to this port must be capable of asynchronous transmission. You can configure the following parameters for the console port:

Data bits
Specifies the number of bits in an 8-bit byte that is used for data.
Inactive session timeout
Specifies the number of minutes a session can be inactive before it is terminated.
Parity
Specifies the odd or even parity for error detection.
Speed
Specifies the transmission speed for the connection.
Stop bits
Specifies the stop bits for an asynchronous line.

Configure your terminal emulator with 9600 baud, 8 data bits, 1 stop bit, and no parity.

Virtual Terminals

You can use virtual terminal lines to connect to your device. Secure Shell (SSH) and Telnet create virtual terminal sessions. You can configure an inactive session timeout and a maximum sessions limit for virtual terminals.

Default Settings for File System Parameters

This table lists the default settings for the file system parameters.

Table 1. Default File System Settings

Parameters

Default

Default filesystem

bootflash:

Configuring the Console Port

You can set the following characteristics for the console port:

  • Data bits

  • Inactive session timeout

  • Parity

  • Speed

  • Stop bits

Before you begin

Log in to the console port.

SUMMARY STEPS

  1. configure terminal
  2. line console
  3. databits bits
  4. exec-timeout minutes
  5. parity {even | none | odd}
  6. speed {300 | 1200 | 2400 | 4800 | 9600 | 38400 | 57600 | 115200}
  7. stopbits {1 | 2}
  8. exit
  9. (Optional) show line console
  10. (Optional) copy running-config startup-config

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

line console

Example:

switch# line console
switch(config-console)#

Enters console configuration mode.

Step 3

databits bits

Example:

switch(config-console)# databits 7

Configures the number of data bits per byte. The range is from 5 to 8. The default is 8.

Step 4

exec-timeout minutes

Example:

switch(config-console)# exec-timeout 30

Configures the timeout for an inactive session. The range is from 0 to 525600 minutes (8760 hours). A value of 0 minutes disables the session timeout. The default is 30 minutes.

Step 5

parity {even | none | odd}

Example:

switch(config-console)# parity even

Configures the parity. The default is none .

Step 6

speed {300 | 1200 | 2400 | 4800 | 9600 | 38400 | 57600 | 115200}

Example:

switch(config-console)# speed 115200

Configures the transmit and receive speed. The default is 9600 .

Step 7

stopbits {1 | 2}

Example:

switch(config-console)# stopbits 2

Configures the stop bits. The default is 1 .

Step 8

exit

Example:

switch(config-console)# exit
switch(config)#

Exits console configuration mode.

Step 9

(Optional) show line console

Example:

switch(config)# show line console
(Optional)

Displays the console settings.

Step 10

(Optional) copy running-config startup-config

Example:

switch(config)# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Configuring Virtual Terminals

This section describes how to configure virtual terminals on Cisco NX-OS devices.

Configuring the Inactive Session Timeout

You can configure a timeout for inactive virtual terminal sessions on the device.

SUMMARY STEPS

  1. configure terminal
  2. line vty
  3. exec-timeout minutes
  4. exit
  5. (Optional) show running-config all | begin vty
  6. (Optional) copy running-config startup-config

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

line vty

Example:

switch# line vty
switch(config-line)#

Enters line configuration mode.

Step 3

exec-timeout minutes

Example:

switch(config-line)# exec-timeout 30

Configures the inactive session timeout. The range is from 0 to 525600 minutes (8760 hours). A value of 0 minutes disables the timeout. The default value is 30.

Step 4

exit

Example:

switch(config-line)# exit
switch(config)#

Exits line configuration mode.

Step 5

(Optional) show running-config all | begin vty

Example:

switch(config)# show running-config all | begin vty
(Optional)

Displays the virtual terminal configuration.

Step 6

(Optional) copy running-config startup-config

Example:

switch(config)# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Configuring the Session Limit

You can limit the number of virtual terminal sessions on your device.

SUMMARY STEPS

  1. configure terminal
  2. line vty
  3. session-limit sessions
  4. exit
  5. (Optional) show running-config all | begin vty
  6. (Optional) copy running-config startup-config

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

line vty

Example:

switch# line vty
switch(config-line)#

Enters line configuration mode.

Step 3

session-limit sessions

Example:

switch(config-line)# session-limit 10

Configures the maximum number of virtual sessions for your device. The range is from 1 to 64. The default is 32.

Step 4

exit

Example:

switch(config-line)# exit
switch(config)#

Exits line configuration mode.

Step 5

(Optional) show running-config all | begin vty

Example:

switch(config)# show running-config all | begin vty
(Optional)

Displays the virtual terminal configuration.

Step 6

(Optional) copy running-config startup-config

Example:

switch(config)# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Clearing Terminal Sessions

You can clear terminal sessions on your device.

SUMMARY STEPS

  1. (Optional) show users
  2. clear line name

DETAILED STEPS

  Command or Action Purpose

Step 1

(Optional) show users

Example:

switch# show users
(Optional)

Displays the user sessions on the device.

Step 2

clear line name

Example:

switch# clear line pts/0

Clears a terminal session on a specific line. The line name is case sensitive.

Displaying Terminal and Session Information

To display terminal and session information, perform one of the following tasks:

Command

Purpose

show terminal

Displays terminal settings.

show line

Displays the COM1 and console ports settings.

show users

Displays virtual terminal sessions.

show running-config [all]

Displays the user account configuration in the running configuration. The all keyword displays the default values for the user accounts.