Cisco Nexus 7000 Series NX-OS Fundamentals Configuration Guide, Release 4.0
Configuring the Terminal
Downloads: This chapterpdf (PDF - 246.0KB) The complete bookPDF (PDF - 3.29MB) | Feedback

Configuring Terminal Settings and Sessions

Table Of Contents

Configuring Terminal Settings and Sessions

Information About Terminal Settings and Sessions

Terminal Session Settings

Console Port

COM1 Port

Virtual Terminals

Modem Support

Virtualization Support

Licensing Requirements for Terminal Settings and Sessions

Configuring the Terminal Settings

Configuring the Console Port

Configuring the COM1 Port

Configuring Virtual Terminals

Configuring the Inactive Session Timeout

Configuring the Session Limit

Configuring Modem Connections

Enabling a Modem Connection

Downloading the Default Initialization String

Configuring and Downloading a User-Specified Initialization String

Initializing a Modem for a Powered-Up Device

Clearing Terminal Sessions

Displaying Terminal and Session Information

Default Settings

Additional References

Related Documents


Configuring Terminal Settings and Sessions


This chapter describes how to manage the terminal settings and sessions on a Cisco NX-OS device.

This chapter includes the following sections:

Information About Terminal Settings and Sessions

Licensing Requirements for Terminal Settings and Sessions

Configuring the Terminal Settings

Configuring the Console Port

Configuring the COM1 Port

Configuring Virtual Terminals

Configuring Modem Connections

Clearing Terminal Sessions

Displaying Terminal and Session Information

Default Settings

Additional References

Information About Terminal Settings and Sessions

This section includes the following topics:

Terminal Session Settings

Console Port

COM1 Port

Virtual Terminals

Modem Support

Virtualization Support

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.

COM1 Port

A COM1 port is an RS-232 port with a DB-9 interface that enables you to connect to an external serial communication device such as a modem. You can configure the following parameters for the COM1 port:

Data bits—Specifies the number of bits in an 8-bit byte that is used for data.

Hardware flowcontrol—Enables the flow-control hardware.

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 NX-OS 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.

Modem Support

You can connect a modem to the COM1 or console ports on the supervisor module. The following modems were tested on devices running the Cisco NX-OS software:

MultiTech MT2834BA (http://www.multitech.com/PRODUCTS/Families/MultiModemII/)

Hayes Accura V.92 (http://www.hayesmicro.com/Products/accura-prod-v92.htm)


Note Do not connect a modem when the device is booting. Follow the procedure specified in the "Initializing a Modem for a Powered-Up Device" section.


The Cisco NX-OS software has the default initialization string (ATE0Q1&D2&C1S0=1\015) to detect connected modems. The default string is defined as follows:

AT—Attention

E0 (required)—No echo

Q1—Result code on

&D2—Normal data terminal ready (DTR) option

&C1—Enable tracking the state of the data carrier

S0=1—Pick up after one ring

\015 (required)—Carriage return in octal

Virtualization Support

You can configure the COM1 and consoles ports on in the default VDC. You can configure terminal sessions and virtual terminals on both the default and nondefault VDCs. For more information on VDCs, see the Cisco Nexus 7000 Series NX-OS Virtual Device Context Configuration Guide, Release 4.0.

Licensing Requirements for Terminal Settings and Sessions

The following table shows the licensing requirements for this feature:

Product
License Requirement

NX-OS

Terminal setting configuration requires no license. Any feature not included in a license package is bundled with the Cisco NX-OS system images and is provided at no extra charge to you. For a complete explanation of the NX-OS licensing scheme, see the Cisco NX-OS Licensing Guide.


Configuring the Terminal Settings

You can set the following terminal type and display characteristics for your terminal session:

Terminal type

Screen length

Screen width

Inactive session timeout


Note Any changes that you make to these settings exist only for the duration of the session.


SUMMARY STEPS

1. terminal terminal-type type

terminal length lines

terminal width columns

terminal session-timeout minutes

2. show terminal

DETAILED STEPS

 
Command
Purpose

Step 1 

terminal terminal-type type


Example:

switch# terminal terminal-type vt100

Sets the terminal type. The terminal-type string is case sensitive, must be a valid type (for example, vt100 or xterm), and has a maximum of 80 characters. The default type is ansi.

terminal length lines


Example:

switch# terminal length 24

Sets the terminal length for displaying command output before pausing. The range is from 0 to 511 lines. Use 0 to not pause while displaying output. The initial default for the console is 0. The initial default for virtual terminal sessions is 31.

terminal width columns


Example:

switch# terminal width 70

Sets the terminal width for displaying command output. The range is from 24 to 511 columns. The default is 80 characters.

terminal session-timeout minutes


Example:

switch# terminal session-timeout 60

Sets the inactivity timeout for your terminal session. The range is from 0 to 525600 minutes (8760 hours). A value of 0 minutes disables the session timeout. The default is 0.

Step 2 

show terminal


Example:

switch# show terminal

(Optional) Displays the terminal settings.

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.

Ensure that you are in the default VDC.

SUMMARY STEPS

1. configure terminal

2. line console

3. databits bits

exec-timeout minutes

parity {even | none | odd}

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

stopbits {1 | 2}

4. exit

5. show line console

6. copy running-config startup-config

DETAILED STEPS

 
Command
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 5 to 8. The default is 8.

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 0 minutes.

parity {even | none | odd}


Example:

switch(config-console)# parity even

Configures the parity. The default is none.

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


Example:

switch(config-console)# speed 115200

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

stopbits {1 | 2}


Example:

switch(config-console)# stopbits 2


Configures the stop bits. The default is 1.

Step 4 

exit


Example:

switch(config-console)# exit

switch(config)#

Exits console configuration mode.

Step 5 

show line console


Example:

switch(config)# show line console

(Optional) Displays the console settings.

Step 6 

copy running-config startup-config


Example:

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

(Optional) Copies the running configuration to the startup configuration.

Configuring the COM1 Port

You can set the following characteristics for the COM1 port:

Data bits

Flow control on the hardware

Parity

Speed

Stop bits

BEFORE YOU BEGIN

Log in to the console port or COM1 port.

Ensure that you are in the default VDC.

SUMMARY STEPS

1. configure terminal

2. line com1

3. databits bits

flowcontrol hardware

parity {even | none | odd}

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

stopbits {1 | 2}

4. exit

5. show line console

6. copy running-config startup-config

DETAILED STEPS

 
Command
Purpose

Step 1 

configure terminal


Example:

switch# configure terminal

switch(config)#

Enters global configuration mode.

Step 2 

line com1


Example:

switch# line com1

switch(config-com1)#

Enters COM1 configuration mode.

Step 3 

databits bits


Example:

switch(config-com1)# databits 7

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

flowcontrol hardware


Example:

switch(config-com1)# flowcontrol hardware

Enables flow control on the hardware. The default is enabled.

Use the no flowcontrol hardware command to disable flow control on the hardware.

parity {even | none | odd}


Example:

switch(config-com1)# parity even

Configures the parity. The default is none.

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


Example:

switch(config-com1)# speed 115200

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

stopbits {1 | 2}


Example:

switch(config-com1)# stopbits 2

Configures the stop bits. The default is 1.

Step 4 

exit


Example:

switch(config-com1)# exit

switch(config)#

Exits COM1 configuration mode.

Step 5 

show line console


Example:

switch(config)# show line console

(Optional) Displays the console settings.

Step 6 

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 includes the following topics:

Configuring the Inactive Session Timeout

Configuring the Session Limit

Configuring the Inactive Session Timeout

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

SUMMARY STEPS

1. configure terminal

2. line vty

3. exec-session minutes

4. exit

5. show running-config all | begin vty

6. copy running-config startup-config

DETAILED STEPS

 
Command
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-session minutes


Example:

switch(config-line)# exec-session 30

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

Step 4 

exit


Example:

switch(config-line)# exit

switch(config)#

Exits line configuration mode.

Step 5 

show running-config all | begin vty


Example:

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

(Optional) Displays the virtual terminal configuration.

Step 6 

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. show running-config all | begin vty

6. copy running-config startup-config

DETAILED STEPS

 
Command
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 the VDC. 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 

show running-config all | begin vty


Example:

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

(Optional) Displays the virtual terminal configuration.

Step 6 

copy running-config startup-config


Example:

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

(Optional) Copies the running configuration to the startup configuration.

Configuring Modem Connections

You can connect a modem to either the COM1 port or the console port.


Tip We recommend that you use the COM1 port to connect the modem.


This section includes the following topics:

Enabling a Modem Connection

Downloading the Default Initialization String

Configuring and Downloading a User-Specified Initialization String

Initializing a Modem for a Powered-Up Device

Enabling a Modem Connection

You must enable the modem connection on the port before you can use the modem.

BEFORE YOU BEGIN

Log in to the console port.

SUMMARY STEPS

1. configure terminal

2. line com1

line console

3. modem in

4. exit

5. show line

6. copy running-config startup-config

DETAILED STEPS

 
Command
Purpose

Step 1 

configure terminal


Example:

switch# configure terminal

switch(config)#

Enters global configuration mode.

Step 2 

line com1


Example:

switch# line com1

switch(config-com1)#

Enters COM1 configuration mode.

line console


Example:

switch# line console

switch(config-console)#

Enters console configuration mode.

Step 3 

modem in


Example:

switch(config-com1)# modem in

Enables modem input on the COM1 port.

modem in


Example:

switch(config-console)# modem in

Enables modem input on the console port.

Step 4 

exit


Example:

switch(config-com1)# exit

switch(config)#

Exits COM1 configuration mode.

exit


Example:

switch(config-console)# exit

switch(config)#

Exits console configuration mode.

Step 5 

show line


Example:

switch(config)# show line

(Optional) Displays the console and COM1 settings.

Step 6 

copy running-config startup-config


Example:

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

(Optional) Copies the running configuration to the startup configuration.

Downloading the Default Initialization String

The Cisco NX-OS software provides a default initialization string that you can download for connecting with the modem. The default initialization string is ATE0Q1&D2&C1S0=1\015.

BEFORE YOU BEGIN

Log in to the console port.

SUMMARY STEPS

1. configure terminal

2. line com1

line console

3. modem init-string default

4. exit

5. show line

6. copy running-config startup-config

DETAILED STEPS

 
Command
Purpose

Step 1 

configure terminal


Example:

switch# configure terminal

switch(config)#

Enters global configuration mode.

Step 2 

line com1


Example:

switch# line com1

switch(config-com1)#

Enters COM1 configuration mode.

line console


Example:

switch# line console

switch(config-console)#

Enters console configuration mode.

Step 3 

modem init-string default


Example:

switch(config-com1)# modem init-string default

Writes the default initialization string to the modem.

modem init-string default


Example:

switch(config-console)# modem init-string default

Writes the default initialization string to the modem.

Step 4 

exit


Example:

switch(config-com1)# exit

switch(config)#

Exits COM1 configuration mode.

exit


Example:

switch(config-console)# exit

switch(config)#

Exits console configuration mode.

Step 5 

show line


Example:

switch(config)# show line

(Optional) Displays the console and COM1 settings.

Step 6 

copy running-config startup-config


Example:

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

(Optional) Copies the running configuration to the startup configuration.

Configuring and Downloading a User-Specified Initialization String

You can configure and download your own initialization when the default initialization string is not compatible with your modem.

BEFORE YOU BEGIN

Log in to the console port.

SUMMARY STEPS

1. configure terminal

2. line com1

line console

3. modem set-string user-input string

4. modem init-string user-input

5. exit

6. show line

7. copy running-config startup-config

DETAILED STEPS

 
Command
Purpose

Step 1 

configure terminal


Example:

switch# configure terminal

switch(config)#

Enters global configuration mode.

Step 2 

line com1


Example:

switch# line com1

switch(config-com1)#

Enters COM1 configuration mode.

line console


Example:

switch# line console

switch(config-console)#

Enters console configuration mode.

Step 3 

modem set-string user-input string


Example:

switch(config-com1)# modem set-string user-input ATE0Q1&D2&C1S0=3\015

Sets the user-specified initialization string for the COM1 port. The initialization string is alphanumeric and case sensitive, can contain special characters, and has a maximum of 100 characters.

Note You must first set the user-input string before initializing the string.

modem set-string user-input string


Example:

switch(config-console)# modem set-string user-input ATE0Q1&D2&C1S0=3\015

Sets the user-specified initialization string for the console port. The initialization string is alphanumeric and case sensitive, can contain special characters, and has a maximum of 100 characters.

Note You must first set the user-input string before initializing the string.

Step 4 

modem init-string user-input


Example:

switch(config-com1)# modem init-string user-input

Writes the user-specified initialization string to the modem connected to the COM1 port.

modem init-string user-input


Example:

switch(config-console)# modem init-string user-input

Writes the user-specified initialization string to the modem connected to the console port.

Step 5 

exit


Example:

switch(config-com1)# exit

switch(config)#

Exits COM1 configuration mode.

exit


Example:

switch(config-console)# exit

switch(config)#

Exits console configuration mode.

Step 6 

show line


Example:

switch(config)# show line

(Optional) Displays the COM1 and console settings.

Step 7 

copy running-config startup-config


Example:

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

(Optional) Copies the running configuration to the startup configuration.

Initializing a Modem for a Powered-Up Device

If you connect a modem to a powered-up physical device, you must initialize the modem before you can use it.

BEFORE YOU BEGIN

After waiting until the device has completed the boot sequence and the system image is running, connect the modem to either the COM1 port or the console port on the device.

Enable the modem connection on the port (see the "Enabling a Modem Connection" section).

SUMMARY STEPS

1. modem connect line {com1 | console}

DETAILED STEPS

 
Command
Purpose

Step 1 

modem connect line {com1 | console}


Example:

switch# modem connect line com1

Initializes the modem connected to the device.

Clearing Terminal Sessions

You can clear terminal sessions on the device.

SUMMARY STEPS

1. show users

2. clear line name

DETAILED STEPS

 
Command
Purpose

Step 1 

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.


For detailed information about the fields in the output from these commands, see the Cisco Nexus 7000 Series NX-OS Fundamentals Command Reference, Release 4.0.

Default Settings

Table 4-1 lists the default settings for terminal displays and session parameters.

Table 4-1 Default Terminal Display and Session Parameters 

Parameters
Default

Terminal type

ansi

Terminal length

0 lines for console sessions
31 lines for virtual terminal sessions

Terminal width

80 columns

Terminal inactive session timeout

Disabled (0 minutes)

Console session data bits

8

Console inactive session timeout

Disabled (0 minutes)

Console session parity

none

Console session speed

11520 bps

Console session stop bits

1

COM1 session data bits

8

COM1 hardware flow control

Enabled

COM1 session parity

none

COM1 session speed

9600 bps

COM1 session stop bits

1

Virtual terminal inactive session timeout

Disabled (0 minutes)

Virtual terminal sessions limit

32

Modem default initialization string

ATE0Q1&D2&C1S0=1\015


Additional References

For additional information related to implementing Feature-1, see the following sections:

Related Documents

Related Documents

Related Topic
Document Title

Licensing

Cisco Nexus 7000 Series NX-OS Licensing Guide, Release 4.0

Command reference

Cisco Nexus 7000 Series NX-OS Fundamentals Command Reference, Release 4.0