Size:
3.03 Mb
Download

AppendixA: Serial Command Line Interface (CLI)

Mirror: Mirroring is disabled.

IP: IP mode is disabled and no IP address/mask/gateway is configured. To enable the web interface, an IP address must be configured.

SERIAL COMMAND LINE INTERFACE (CLI)

Through the serial-basedswitch configuration, you have all the configuration options found in the web application and more. The command line offers the option of configuring the devices directly, without having to create a separate VLAN just for the web configuration. The direct serial method allows for the board to be fully configured without using a dedicated Ethernet port for configuration. General CLI usage instructions and command details are described below.

Log In/Log Out Procedures

1To get access to the CLI, log in when prompted. No password is required.

2Logout at any time and at any context level using the exit command.

Help Utility

Access help by pressing the ? key or entering help. The help info depends on the context:

At top level, a list of command groups is displayed.

At group level, a list of the command syntaxes for the current group is displayed.

If the help command is issued for a specific command, the command syntax and a description of the command are shown.

The command hierarchy and the help utility are demonstrated in the following example:

> ? <enter>

Commands at top level: System – System commands Console – Console commands Port – Port commands

MAC - MAC table commands VLAN – VLAN commands

Aggregation – Aggregation/Trunking commands User Group – User Group commands

QoS – QoS commands Mirror – Mirror commands IP – IP commands

Debug - Debug commands

> console <enter> Console> ? <enter>

Commands at Console level: Console Configuration

Console Password [<password>] Console Timeout [<timeout>]

10007175-02

KAT4000 User’s Manual

A-3

 

 

 

AppendixA: Serial Command Line Interface (CLI)

Console Prompt [<prompt string>]

------

Up

Console> password ?

Syntax:

Console Password [<password>]

Description:

Set or display console password. The empty string (“”) disables the password check.

[<password>]: Password string of up to 16 characters. Console>

Command Hierarchy

The CLI is hierarchical with two levels, top level and group level. The group level consists of the following groups:

System

Console

Port

MAC

VLAN

Aggregation

User Group

QoS

Mirror

IP

Debug

Test

Note: The “Test” group is for Emerson internal use only.

At top level, enter a command by giving the full command string, including group, or change context into a group by entering the name of the group.

At group level, enter commands for the particular group chosen without specifying the group name or return to the top level by entering the up command.

The current level and group is indicated by the prompt. At top level, the prompt will be:

>

At group level, the prompt will display the actual group, for example:

System>

A-4

KAT4000 User’s Manual

10007175-02

 

 

 

AppendixA: Serial Command Line Interface (CLI)

Also, at group level use the slash (/) key to refer to a context relative to the top level (e.g., from the system group, enter a /console/configuration command or change context into the console group by entering /console).

Command Usage Instructions

Commands are not case-sensitive.

Use the horizontal arrow-keys .and . to move the cursor within the command you are entering.

Use the backspace key (provided you are using a terminal that sends the BS (8) character when the backspace key is pressed) to delete chars from the command you are entering.

Use the vertical arrow-keys .and . to scroll through a command history buffer of the latest 20 commands issued.

If using a terminal that supports <home> and <end> keys (e.g., HyperTerminal), use these keys to move the cursor to respectively the start of the command line and the end of the command line.

Commands

Table A-1 shows general parameter types used in command syntaxes and descriptions.

Note: The following command types use port IDs versus the port number (i.e., the physical number of the port).

Port numbers (“port #”=”port ID”-1)are used when discussing Ethernet switch ports. For example, VLAN port

ID 1 is the same as Ethernet switch port 0.

Table A-1: General Command Types

Command

 

Type:

Description:

<port>

Port identifier: Any number in the range 1-26.

 

 

<portlist>

Comma and/or dash separated port list. This type can be used for specifying

 

individual ports or a range of ports. The keyword ‘none’ can be used to specify

 

an empty port list. The keyword ‘all’ can be used to specify all ports.

 

Example: 1,3,8-12

 

 

<macaddress>

MAC Address; format: “hh-hh-hh-hh-hh-hh”,“hh:hh:hh:hh:hh:hh” or

 

“hhhhhhhhhhhh”. The hh is a hexadecimal number in the range 0x00 to 0xFF.

 

Example: 00-00-24-F1-02-03

 

 

<vid>

VLAN ID: Decimal number in the range 1-4095.The keyword ‘all’ can be used to

 

specify all VLAN IDs. See note.

 

 

10007175-02

KAT4000 User’s Manual

A-5

 

 

 

AppendixA: Serial Command Line Interface (CLI)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Command

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Type:

 

 

Description: (continued)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<vidlist>

 

 

Comma and/or dash separated VLAN ID list. This type can be used for specifying

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

individual VLAN IDs or a range of VLAN IDs. The keyword ‘none’ can be used to

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

specify an empty VLAN ID list.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Example: 1,2,4-6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<class>

 

 

Internal class of service, 1-8(highest=1).

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<grouplist>

 

 

Comma and/or dash separated user group list. This type can be used for

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

specifying individual user groups or a range of user groups. The range is 1-26.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The <portlist> type is very useful when setting up multiple ports in the same mode. For example, the following commands will divide the ports into two untagged VLANs and enable VLAN awareness:

Example: vlan add 11-8vlan add 29-16vlan pvid1-81 vlan pvid9-162

vlan aware all enable

Command Overview

?

Help Up Exit

System Configuration [all] System Restore Default [keepIP] System Name [<name>]

System Initialize [<serialnum>] System Reboot

Console Configuration

Console Password [<password>] Console Timeout [<timeout>] Console Prompt [<prompt_string>] Port Configuration [<portlist>] Port Mode [<portlist>] [<mode>]

Port Flow Control [<portlist>] [enable|disable] Port State [<portlist>] [enable|disable]

Port MaxFrame [<portlist>] [<framesize>|reset] Port Statistics [<portlist>] [clear]

Port Excessive Collisions Drop [enable|disable] MAC Configuration

MAC Add <macaddress> <portlist>|none [<vid>] MAC Delete <macaddress> [<vid>]

MAC Lookup <macaddress> [<vid>] MAC Table <vidlist>

MAC Flush

MAC Agetime [<agetime>]

MAC Learning [<enable|disable>] VLAN Configuration [<portlist>] VLAN Add <vidlist> [<portlist>] VLAN Delete <vidlist>

VLAN Lookup <vidlist>

A-6

KAT4000 User’s Manual

10007175-02

 

 

 

AppendixA: Serial Command Line Interface (CLI)

VLAN Aware [<portlist>] [enable|disable]

VLAN PVID [<portlist>] [<vid>|none]

VLAN Frame Type [<portlist>] [all|tagged]

Aggr Configuration

Aggr Add <portlist>

Aggr Delete <portlist>

Aggr Lookup <portlist>

Aggr Mode [smac|dmac|xor]

User Group Configuration

User Group Add <grouplist> [<portlist>]

User Group Delete <grouplist>

User Group Lookup <grouplist>

QoS Configuration [<portlist>]

QoS Mode [<portlist>] [tag|port|diffserv]

QoS Default [<portlist>] [<class>]

QoS Tagprio [<portlist>] [<tagpriolist>] [<class>]

QoS DiffServ [<dscpno>] [<class>]

QoS Userprio [<portlist>] [<tagprio>]

QoS Shaper [<portlist>] [disable|<rate>]

QoS Policer [<portlist>] [disable|<rate>]

Mirror Configuration

Mirror Port [<port>]

Mirror Source [<portlist>] [enable|disable]

IP Configuration

IP Setup [<ipaddress> [<ipmask> [<ipgateway>]]] [<vid>]

IP Mode [enable|disable]

IP ARP

IP Ping <ip_addr> <number_of_passes>

Debug Read Register <block> [<subblock>] <address>

Debug Write Register <block> <subblock> <address> <value>

Debug PHY Read <portlist> [<address>]

Debug PHY Write <portlist> <address> <value>

Debug SetRegs [clear | <address>] [<port_no>] [<value>]

Detailed Command Descriptions:

Some of the commands have optional parameters. If the optional parameter is omitted, a default value may be used or the command may display the current setting (i.e., function as a get command).

In Example 1, the omitted parameter is interpreted as the display command:

Example 1: Syntax:

System Name [<name>]

>system name <enter> System Name: SuperSwitch-01

In Example 2, the omitted parameter is interpreted as the default value (VLAN ID 1):

Example 2: Syntax:

MAC Add <macaddress> <portlist> [<vid>]

>mac add 010203ABCDEF 16 <enter>

The following sections list the individual commands by showing the syntax and a description of each command.

10007175-02

KAT4000 User’s Manual

A-7

 

 

 

AppendixA: Serial Command Line Interface (CLI)

System Commands

System Configuration: Syntax:

System Configuration [all]

Description: Show system name, software version, hardware version and management

MAC address. Optionally show the full configuration.

[all]: Show the total switch configuration (Default: System configuration only).

System Restore Default:Syntax:

System Restore Default [keepIP]

Description: Restore factory default configuration.

[keepIP]: Preserve IP configuration (Default: Not preserved).

System Name: Syntax:

System Name [<name>]

Description: Set or show the system name. The empty string (“”) clears the system name.

[<name>]: String of up to 16 characters (Default: Show system name).

System Initialize: Syntax:

System Initialize [<serialnum>]

Description: Set Ethernet address and initialize NVRAM to default configuration.

[<serialnum>]: Second half of the carrier board’s serial number, for example, 1001, if the serial number is711A-1001(Default: Show serial number).

System Reboot: Syntax:

System Reboot

Description: Reboot the switch.

Console Commands

Console Configuration: Syntax:

Console Configuration

Description: Show configured console password and timeout.

Console Password: Syntax:

Console Password [<password>]

Description: Set or show the console password. The empty string (“”) disables the password check.

A-8

KAT4000 User’s Manual

10007175-02

 

 

 

AppendixA: Serial Command Line Interface (CLI)

[<password>]: Password string of up to 16 characters.

Console Timeout: Syntax:

Console Timeout [<timeout>]

Description: Set or show the console inactivity timeout in seconds. The value zero disables timeout.

[<timeout>]: Timeout value in seconds, 0,60-10000.

Console Prompt: Syntax:

Console Prompt [<prompt_string>]

Description: Set or show the console prompt string. The empty string (“”) clears the prompt string.

[<prompt_string>]: Command prompt string of up to 10 characters.

Port Commands

Port Configuration: Syntax:

Port Configuration [<portlist>]

Description: Show the configured and current speed, duplex mode, flow control mode and state for the port.

<portlist>: Port list (Default: All ports).

Port Mode: Syntax:

Port Mode [<portlist>] [<mode>]

Description: Set or show the speed and duplex mode for the port.

<portlist>: Port list (Default: All ports).

<mode>: Port speed and duplex mode (Default: Show configured and current mode). 10hdx: 10 Mbit/s, half duplex.

10fdx: 10 Mbit/s, full duplex. 100hdx: 100 Mbit/s, half duplex. 100fdx: 100 Mbit/s, full duplex. 1000fdx: 1 Gbit/s, full duplex.

auto: Auto negotiation of speed and duplex.

Port Flow Control: Syntax:

Port Flow Control [<portlist>] [enable|disable]

Description: Set or show flow control mode for the port.

<portlist>: Port list (Default: All ports).

10007175-02

KAT4000 User’s Manual

A-9

 

 

 

AppendixA: Serial Command Line Interface (CLI)

[enable|disable]: Enable/disable flow control (Default: Show flow control mode).

Port State: Syntax:

Port State [<portlist>] [enable|disable]

Description: Set or show the state for the port.

<portlist>: Port list (Default: All ports).

[enable|disable]: Enable/disable port state (Default: Show state).

Port MaxFrame: Syntax:

Port MaxFrame [<portlist>] [<framesize>|reset]

Description: Set or show the maximum frame size in bytes (including FCS) for frames received on the port. Tagged frames are allowed to be 4 bytes longer than the maximum frame size. Use the reset option to return to the default setting.

[<portlist>]: Port list (Default: All ports).

[<framesize>|reset]: Maximum frame size or reset to 1518 bytes (Default: Show maximum frame size).

Port Statistics: Syntax:

Port Statistics [<portlist>] [clear]

Description: Show or clear statistics for the port.

<portlist>: Port list (Default: All ports).

[clear]: Clear port statistics (Default: Show statistics).

Port Excessive Collisions Drop:

Syntax:

Port Excessive Collisions Drop [enable|disable]

Description: Enable or disable drop of frames when excessive collisions occur in half duplex mode.

[enable|disable]: Enable/disable frame drop (Default: Show excessive collisions drop mode).

MAC Commands

MAC Configuration: Syntax:

MAC Configuration

Description: Show the permanently stored MAC table and the MAC aging timer.

MAC Add: Syntax:

A-10

KAT4000 User’s Manual

10007175-02

 

 

 

AppendixA: Serial Command Line Interface (CLI)

MAC Add <macaddress> <portlist>|none [<vid>]

Description: Add a static MAC address table entry and VLAN ID on ports.

<macaddress>: MAC address,12-digithex string, optionally separated with dashes or colons (e.g., 010203ABCDEF,01-02-03-AB-CD-EFor 01:02:03:AB:CD:EF).

<portlist>: Port list. Use ”none” to specify no ports.

[<vid>]: VLAN ID,1-4095(Default: 1).

MAC Delete: Syntax:

MAC Delete <macaddress> [<vid>]

Description: Delete MAC address and VLAN ID.

<macaddress>: MAC address,12-digithex string, optionally separated with dashes or colons (e.g., 010203ABCDEF,01-02-03-AB-CD-EFor 01:02:03:AB:CD:EF).

[<vid>]: VLAN ID (Default: 1).

MAC Lookup: Syntax:

MAC Lookup <macaddress> [<vid>]

Description: Lookup MAC address and VLAN ID.

<macaddress>: MAC address,12-digithex string, optionally separated with dashes or colons (e.g., 010203ABCDEF,01-02-03-AB-CD-EFor 01:02:03:AB:CD:EF).

[<vid>]: VLAN ID,1-4095(Default: 1).

MAC Table: Syntax:

MAC Table <vidlist>

Description: Show MAC table for the VLAN IDs specified. Since the list can be very long, only the first 20 entries are shown.

<vidlist>: VLAN ID list.

MAC Flush: Syntax:

MAC Flush

Description: Removes non-staticMAC address table entries.

MAC Age Time: Syntax:

MAC Agetime [<agetime>]

Description: Set or show the MAC age timer in seconds. The value zero disables aging.

[<agetime>]: Age timer in seconds, 0 or10-65535(Default: Show timer).

MAC Learning: Syntax:

10007175-02

KAT4000 User’s Manual

A-11

 

 

 

AppendixA: Serial Command Line Interface (CLI)

MAC Learning [<enable|disable>]

Description: Enable/disable MAC table auto-learning.

[enable|disable]: Enable or disable MAC table learning (default: disable).

VLAN Commands

VLANs use port IDs versus the port number (i.e., the physical number of the port). Port numbers (“port #”=”port ID”-1)are used when discussing Ethernet switch ports. For example, VLAN port ID 1 is the same as Ethernet switch port 0.

VLAN Configuration: Syntax:

VLAN Configuration [<portlist>]

Description: Show the VLAN aware mode, port VLAN ID and accepted frame type for the port and the permanently stored VLAN table.

[<portlist>]: Port list (Default: All ports).

VLAN Add: Syntax:

VLAN Add <vidlist> [<portlist>]

Description: Add VLAN entry and include ports in member set.

<vidlist>: VLAN ID list.

[<portlist>]: Port list (Default: All ports).

VLAN Delete: Syntax:

VLAN Delete <vidlist>

Description: Delete VLAN entry (all ports excluded from member set).

<vidlist>: VLAN ID list.

VLAN Lookup: Syntax:

VLAN Lookup <vidlist>

Description: Lookup VLAN entry and show port list.

<vidlist>: VLAN ID list.

VLAN Aware: Syntax:

VLAN Aware [<portlist>] [enable|disable]

Description: Set or show the VLAN awareness mode for the port. VLAN aware ports will strip the VLAN tag from received frames and insert the tag in transmitted frames (except PVID). VLAN unaware ports will not strip the tag from received frames or insert the tag in transmitted frames.

A-12

KAT4000 User’s Manual

10007175-02