Broadcom Shell

About the Broadcom Shell

The switch's front panel and fabric module line cards contain Broadcom Network Forwarding Engines (NFE). The number of NFEs varies depending upon the specific model of the front panel line card (LC) or the fabric module (FM).

Guidelines and Limitations

You can access and read information from the T2 ASICs without any limitations. However, Cisco does not recommend changing the T2 configuration settings. Use caution when accessing the Broadcom Shell.

Accessing the Broadcom Shell (bcm-shell)

The following sections describe approaches to access the Broadcom Shell (bcm-shell).

Accessing bcm-shell with the CLI API

The bcm-shell commands are passed directly from the Cisco NX-OS CLI to the specific T2 ASIC instance. The T2 ASIC instance can be on the fabric module or on the front panel line card.

The command syntax is as follows:

bcm-shell module module_number [instance_number:command]

Where

module_number

Module number in the chassis.

instance_number

T2 instance number

  • When not specified, the T2 instance number defaults to 0.

  • When a wildcard ('*') is specified, all T2 instances are processed.

command

Broadcom command


Note


Cisco NX-OS command extensions such as ‘pipe include’ or ‘redirect output to file’ can be used to manage command output.



Note


Entering commands with the CLI API are recorded in the system accounting log for auditing purposes. Commands that are entered directly from the bcm-shell are not recorded in the accounting log.


The following is an example when the T2 instance number not entered.:

switch# bcm-shell module 26 "ports"
Executing ports on bcm shell on module 26
ena/ speed/ link auto STP lrn inter max loop
port link duplex scan neg? state pause discrd ops face frame back
hg0 !ena 42G FD HW No Forward None FA XGMII 16360
hg1 !ena 42G FD HW No Forward None FA XGMII 16360
hg2 !ena 42G FD HW No Forward None FA XGMII 16360
hg3 !ena 42G FD HW No Forward None FA XGMII 16360
hg4 !ena 42G FD HW No Forward None FA XGMII 16360
<snip>

The following is an example when accessing the bcm-shell ‘ports’ display on module 26, T2 instance 1, and using the pipe to display only the ports in ‘up’ state:

switch# bcm-shell module 26 "1:ports" | inc up
port link duplex scan neg? state pause discrd ops face frame back
hg9 up 42G FD HW No Forward None FA XGMII 16360
hg10 up 42G FD HW No Forward None FA XGMII 16360
hg11 up 42G FD HW No Forward None FA XGMII 16360

The following example when the T2 instance number specified as a wildcard ('*').:

The first set in the output is the result for T2 instance 0. The second set is the result for instance 1 on the fabric module.

switch# bcm-shell module 26 "*:ports" | inc up

port link duplex scan neg? state pause discrd ops face frame back
hg9 up 42G FD HW No Forward None FA XGMII 16360
hg10 up 42G FD HW No Forward None FA XGMII 16360
hg11 up 42G FD HW No Forward None FA XGMII 16360

port link duplex scan neg? state pause discrd ops face frame back
hg9 up 42G FD HW No Forward None FA XGMII 16360
hg10 up 42G FD HW No Forward None FA XGMII 16360
hg11 up 42G FD HW No Forward None FA XGMII 16360


Note


Alternatively, you can access the bcm-shell on a module (LC or FM) directly from the supervisor. The following is an example of how to access the bcm-shell from the supervisor.

switch# bcm-shell module 3
Entering bcm shell on module 3
Available Unit Numbers: 0 1
bcm-shell.0>

Accessing the Native bcm-shell on the Fabric Module

An eight-slot line card (LC) chassis can host a maximum of six fabric modules (FMs). These slots are numbered 21 through 26.You must specify the FM that you wish to access the bcm-shell on.

The following example shows how to access the bcm-shell on the FM in slot 24, access context help, and exit the bcm-shell.

  • Use the show module command to display the FMs.
    switch# show module
    Mod Ports Module-Type Model Status
    --- ----- ----------------------------------- ------------------ ----------
    3 36 36p 40G Ethernet Module N9k-X9636PQ ok
    4 36 36p 40G Ethernet Module N9k-X9636PQ ok
    21 0 Fabric Module Nexus-C9508-FM ok
    22 0 Fabric Module Nexus-C9508-FM ok
    23 0 Fabric Module Nexus-C9508-FM ok
    24 0 Fabric Module Nexus-C9508-FM ok
    25 0 Fabric Module Nexus-C9508-FM ok
    26 0 Fabric Module Nexus-C9508-FM ok
    27 0 Supervisor Module Nexus-SUP-A active *
    29 0 System Controller Nexus-SC-A active
  • Attach to module 24 to gain access to the command line for the FM in slot 24.
    switch# attach module 24
    Attaching to module 24 ...
    To exit type 'exit', to abort type '$.'
  • Enter the command to gain root access to the fabric module software.
    module-24# test hardware internal bcm-usd bcm-diag-shell
    Available Unit Numbers: 0 1
    bcm-shell.0> 1

    At this point, you are at the Broadcom shell for the fabric module in slot 24, T2 ASIC instance 1. Any commands that you enter are specific to this specific ASIC instance.

  • Enter ‘?’ for the context help and to display the available commands.
    help: "??" or "help" for summary
    Commands common to all modes:
    ?        ??        ASSert     BackGround  BCM
    BCMX     break     BroadSync  CASE        CD
    cint     CONFig    CONSole    CoPy        CPUDB
    CTEcho   CTInstall CTSetup    DATE        DBDump
    DBParse  DeBug     DeBugMod   DELAY       DEVice

    Note


    Uppercase characters indicate command abbreviations.



    Note


    The Cisco CLI feature of using TAB to complete a command entry is not available.


  • Enter an abbreviated command.
    bcm-shell.1> conf ?
    Usage (CONFig): Parameters: show <substring> | refresh |
                                save [filename=<filename>] [pattern=<substring>] |
                                add [<var>=<value>] | delete <var>
          If no parameters are given, displays the current config vars.
          show              display current config vars. 
                            Next parameter (optional) maybe a substring to match
          refresh           reload config vars from non-volatile storage
          save              save config vars to non-volatile storage.
                            it can optionally save current config to any given file
                            providing the optional <pattern> will only save variables matching the pattern
          <var>=<value>     change the value of a config var
          add <var>=<value> create a new config var
          delete <var>      deletes a config var
          clear             deletes all config vars
          =                 prompt for new value for each config var
    NOTE: changes are not retained permanently unless saved
  • Use the exit command to exit the bcm-shell and to detach from the FM.
    bcm-shell.1> exit 
    module-24# exit 
    rlogin: connection closed.

Accessing the bcm-shell on the Line Card

When connecting to the T2 ASIC on the line card (LC), you first attach to the module, enter root mode, run the shell access exec, and select the ASIC instance to which you want to attach. The number of available ASICs depends on the model of the line card to which you are attached.

The following example shows how to access the bcm-shell of ASIC instance 1 on the LC in slot 2 and exit the bcm-shell on an LC that contains three T2 instances.

  • Attach to module 2 to gain access to the command line for the LC in slot 2.
    switch# attach module 2 
    Attaching to module 2 ...
    To exit type 'exit', to abort type '$.'
    Last login: Wed Aug 7 14:13:15 UTC 2013 from sup27 on ttyp0
  • Enter the command to gain root access to the line card software.
    switch-2# test hardware internal bcm-usd bcm-diag-shell 
    Available Unit Numbers: 0 1 2
    bcm-shell.0> 1
    bcm-shell.1>

    At this point, you are at the Broadcom shell for the line card module in slot 2, T2 ASIC instance 1.

  • Use the exit command to exit the bcm-shell and detach from the FM.
    bcm-shell.1> exit
    module-2# exit
    rlogin: connection closed.

Examples of Broadcom Shell Commands

This section contains examples of Broadcom shell commands and output.

Displaying L2 Entries

To compare the L2 entries on an FM and an LC, display the L2 entries on the T2 instance.

  • Attach to a T2 instance on an LC in the chassis and enter the show the l2_mem_entries command.
    switch# bcm-shell module 2 “config show l2_mem_entries”
    l2_mem_entries=163840
  • Attach to a T2 instance on an FM in the chassis and enter the show the l2_mem_entries command.
    switch# bcm-shell module 24 “config show l2_mem_entries”
    l2_mem_entries=32768

In this example, the ASICs have different values that are configured for L2 entries because the operation mode setting of the T2 ASIC is different on the LC and the FM.

Displaying Routing Information from FM and LC ASIC Instances

The following shows how to display the routing information from an FM instance and an LC ASIC instance.


Note


  • FM module ASIC instances maintain the longest prefix match (LPM) entries.

  • LC module ASIC instances maintain host routes.


  • Attach to the bcm-shell of one of the FM ASIC instances and enter the l3 defip show command.
    switch# bcm-shell module 22 “l3 defip show”
    Unit 0, Total Number of DEFIP entries: 16385
    #  VRF  Net addr        Next Hop Mac       INTF  MODID PORT PRIO CLASS HIT VLAN
    0  1    192.168.1.0/24  00:00:00:00:00:00  10000 4     0    0    0     0    n
    0  1    192.168.2.0/24  00:00:00:00:00:00  10000 4     0    0    0     0    n
  • Attach to the bcm-shell of one of the LC ASIC instances and enter the l3 defip show command.
    switch# bcm-shell module 2 “l3 defip show”
    Unit 2, Total Number of DEFIP entries: 8193
    #     VRF       Net addr   Next Hop Mac      INTF  MODID PORT PRIO CLASS HIT VLAN
    2048  Override  0.0.0.0/0  00:00:00:00:00:00 10000 4     0    0    0     0   n

Displaying Spanning Tree Group Entries

The following shows how to display spanning tree group (STG) entries.

switch# bcm-shell module 2 “stg show”
STG 0: contains 7 VLANs (4032-4035,4042,4044,4095)
Forward: xe,hg
STG 1: contains 1 VLAN (4043)
Disable: xe
Forward: hg
STG 4: contains 1 VLAN (1)
Block: xe
Forward: hg
STG 5: contains 1 VLAN (100)
Block: xe
Forward: hg

Display T2 Counters for Interface xe0

The following shows how to display T2 counters for interface xe0 that maps to a front panel port.

switch# bcm-shell module 2 “show counters xe0”
RDBGC1.xe0 : 38,169  +4
R127.xe0   : 37,994  +4
R511.xe0   : 16,562  +2
RPKT.xe0   : 55,046  +6
RMCA.xe0   : 54,731  +6
<snip>

Note


The numbers in the output on the far right denoted with '+', indicate the change in the counter value since the last show command was executed.


Displaying L3 Information

The following shows how to display L3 information from the T2.

switch# bcm-shell module 2 “l3 l3table show”
Unit 0, free L3 table entries: 147448
Entry  VRF  IP address     Mac Address       INTF    MOD PORT CLASS HIT
1      1    10.100.100.2   00:00:00:00:00:00 100006  0   0    0     n
2      1    10.101.101.2   00:00:00:00:00:00 100006  0   0    0     y
3      1    10.101.101.1   00:00:00:00:00:00 149151  0   0    0     y (LOCAL ROUTE)
4      1    10.100.100.1   00:00:00:00:00:00 149151  0   0    0     n (LOCAL ROUTE)
5      1    10.101.101.0   00:00:00:00:00:00 100000  0   0    0     n (LOCAL ROUTE)
6      1    10.100.100.0   00:00:00:00:00:00 100000  0   0    0     n (LOCAL ROUTE)
7      1    10.101.101.255 00:00:00:00:00:00 149150  0   0    0     n
8      1    10.100.100.255 00:00:00:00:00:00 149150  0   0    0     n