QUICK START GUIDE FOR THE
BCM Diagnostic Shell
07/25/2004
7F, No.25, Puding Road · Hsin-Chu City · Taiwan 300 · Phone: 886-3-5011000 · FAX: 886-3-5011099
Quick Start Guide
07/25/04
Revision History
BCM Command Line Interpreter
REVISION
1.0
DATE
07/25/04
CHANGE DESCRIPTION
Initial release
Broadcom Corporation Taiwan
7F, No.25, Puding Road
Hsin-Chu City, Taiwan 300
©Copyright 2004 by Broadcom Corporation Taiwan
All rights reserved
Broadcom Corporation Taiwan
Quick Start Guide
07/25/04
BCM Command Line Interpreter
TABLE OF CONTENTS
4
3.4.1
3.4.2
3.4.3
3.4.4
3.4.5
1 OVERVIEW ........................................................................................................................... 6
PREPARE GETTING YOUR FEET WET ............................................................................ 6
2
3
LOW-LEVEL COMMANDS................................................................................................. 9
Register Access Commands.................................................................................. 10
3.1
Memory Access commands .................................................................................. 17
3.2
3.3
Accessing PHY Registers ..................................................................................... 24
Miscellaneous ....................................................................................................... 25
3.4
Interrupts ....................................................................................................... 25
Counters ........................................................................................................ 26
System Memory............................................................................................ 27
PCI Bus ......................................................................................................... 27
I2C Bus .......................................................................................................... 27
PORTS AND LINKS............................................................................................................ 27
4.1
PortStat.................................................................................................................. 28
PORT .................................................................................................................... 29
4.2
4.3
LINKscan.............................................................................................................. 29
5 HIGH-LEVEL COMMANDS .............................................................................................. 30
VLAN Management.............................................................................................. 30
Concluding Remarks of VLAN management............................................... 32
L2 Commands....................................................................................................... 32
L3 Commands....................................................................................................... 34
The ABC of L3 Switching ............................................................................ 34
L3 Example................................................................................................... 35
Port Mirroring ....................................................................................................... 37
Filtering................................................................................................................. 37
Spanning Tree Group Management ...................................................................... 38
6 ADVANCED FEATURES................................................................................................... 38
Sending and Receiving Packets ............................................................................ 38
6.1
In the case when no packet generator handy, the commands introduced in this section helps.
............................................................................................................................................... 38
Packet Transmission ..................................................................................... 38
5.4
5.5
5.6
5.1
5.2
5.3
5.1.1
5.3.1
5.3.2
6.1.1
Broadcom Corporation Taiwan
Quick Start Guide
07/25/04
BCM Command Line Interpreter
6.1.2
Packet Receiving........................................................................................... 39
Debugging............................................................................................................. 39
Configuration Management .................................................................................. 40
BCM Shell Variables ............................................................................................ 41
Diagnostic Tests.................................................................................................... 42
6.2
6.3
6.4
6.5
Broadcom Corporation Taiwan
Quick Start Guide
07/25/04
BCM Command Line Interpreter
Broadcom Corporation Taiwan
Quick Start Guide
07/25/04
1 OVERVIEW
BCM Command Line Interpreter
The BCM Diagnostic Shell is a general command line interpreter (CLI) that provides precise
control of reference platforms in which Broadcom switch chips are embedded. The shell supports
all Broadcom switch chips in a singe image and provides direct access to all registers, memories
and most high-level API features. Also, since both interactive and non-interactive mode is
supported by the shell, it can be embedded into a customer’s design to provide additional
diagnostics. The purpose of this quick start guide is to provide supplementary information in
addition to those adequate explanations accompany each CLI command. Note that the content
presented herein is based on Broadcom SDK 4.2.3.
The rest of this guide is organized as follows. In Section 2, we introduce typical interactive
behavior of the BCM shell. In Section3, Some low-level commands that provide direct access to
the registers, memories, etc. are introduced. Commands relate to ports and links are given in
Section 4. High-level commands deal with VLAN, spanning tree, etc., are given in Section 5.
Finally in Section 6, some advanced features of BCM shell are presented.
2 PREPARE GETTING YOUR FEET WET
In this section, typical interactive shell behavior is introduced. One can access the built-in help
by typing ‘HELP’, or ‘?’ after the shell prompt ‘BCM.0>’. The keyword ‘HELP’ and symbol ‘?’
are interchangeable in the BCM shell. For example, to access the built-in help for a specific
command, one can type one of the following commands: ‘HELP ’, ‘?
’, ‘ HELP’ or ‘ ?’ after the shell prompt ‘BCM.0>’. Note
that all CLI command names and parameter names are case-insensitive. Thus, ‘HELP
’ and ‘help ’ are exactly the same.
The capitals appear on each command stand for the abbreviation for the command. For instance,
commands ‘Listreg’ and ‘PortStat’ can be abbreviated as ‘L’ and ‘PS’, respectively. (Note
that the case does not matter.) In the shell, one can use “” or \ to enter special symbol, and ; to
put several commands on the same command line. Also, CTRL-C stops the execution of a
current command and CTRL-\ reboots the system (VxWorks only).
Broadcom Corporation Taiwan
BCM Command Line Interpreter
Quick Start Guide
07/25/04
A typical system may consist of one or more Broadcom switch chips. The first chip in the system
is named as unit 0; analogously, the second chip in the system is named as the Unit 1. Initially,
the shell prompt is ‘BCM.0>’ which represent that the chip under consideration currently is the
Unit 0. One can type ‘1:’ after the shell prompt to change the current working chip from the
Unit 0 to 1. The shell prompt after issuing command ‘1:’ will change to ‘BCM.1>’ to reflect the
transition. For example, one can type ‘1:ps’ after ‘BCM.0>’ to check the port status on the Unit
1. (Note that ps is a abbreviated form of command PortStat.) For another example, when
issue command ‘1:rc’ after ‘BCM.0>’, Unit 1 in the system will then be re-initialized (whereas
command ‘*:rc’ will cause all units in the system being re-initialized).
Other frequent-used commands are:
• VER: Display current software version.
• SHOW unit: Display chips in the system.
• SHOW params: Display current chip configuration from driver’s viewpoints.
• SHOW features: Display current chip’s feature from driver’s viewpoints.
Figure 1 demonstrates all the contents mentioned in this section for readers’ convenience.
Broadcom Corporation Taiwan
Quick Start Guide
07/25/04
BCM Command Line Interpreter
Figure 1. Example of general CLI commands
Broadcom Corporation Taiwan