COMBO

Control combination copper/fiber ports

COMBO

Show or change the copper and fiber settings of combo ports. A combo port has a PHY with both a copper (RJ-45) and a fiber (SFP) interface, and only one of them is active at a time.

The first argument is a port bitmap (see Ports and port bitmaps). The second word chooses what to do, and must be typed exactly as shown:

  • nothing: show both media of every port;

  • copper or c: show the copper settings, or change them if options follow;

  • fiber or f: the same for the fiber side;

  • watch or w: show, or turn on or off, medium-change notifications.

For each medium the display looks like this:

<port>:\t<medium> medium[ (active)]
\tenable=<n> preferred=<n> force_speed=<n> force_duplex=<n> master=<mode>
\tautoneg_enable=<n> autoneg_advert=<abilities>(0x<hex>)
\tMDIX=<mode>

A port without a combo PHY prints <port>:\tERROR(copper): <error> (or ERROR(fiber)) or <port>:\tmedium info unavailable. Trident 3 switches running SONiC usually have no combo PHYs, so expect these lines.

A port name that does not exist on the switch prints COMBO: ERROR: unrecognized port bitmap: <name>, followed by the SAI shell’s Failed to execute the diagnostic command. Error: Operation failed. A Trident 3 switch with 100G and 10G ports names them ce and xe; there are no ge ports.

Showing settings is read-only. Setting options changes PHY settings behind SONiC and can take the link down. watch on and watch off add or remove an SDK callback that prints Unit <n>: <port>: Active medium switched to <medium> on the shell console; they do not change the ASIC.

Hardware-validated

drivshell> COMBO ge0
COMBO: ERROR: unrecognized port bitmap: ge0

Failed to execute the diagnostic command. Error: Operation failed.

Hardware-validated — Show both media of a real port

drivshell> COMBO ce0
Port ce0:
ce0: medium info unavailable

Medium settings

Grammar:

COMBO <pbmp> <copper | c | fiber | f> [Enable=<bool>] [PREFerred=<bool>]
      [Autoneg_Enable=<bool>] [Autoneg_Advert=<abilities>]
      [Force_Speed=<mbps>] [Force_Duplex=<bool>] [MAster=<bool>]
      [MDIX=<mode>]

Show or change the settings of one medium. Autoneg_Advert takes a list of port abilities such as 1000,pause; Force_Speed is in Mb/s; MDIX takes a mode name; the other options are booleans. The command reads the current settings, applies the options given and writes the result back. This changes PHY state behind SONiC.

Unvalidated

drivshell> COMBO ce1 fiber Autoneg_Enable=1 Autoneg_Advert=1000,pause

Medium-change watch

Grammar: COMBO <pbmp> <watch | w> [on | off].

Without on or off, report whether the watch is active and how many medium changes it has counted. on and off start and stop printing each medium change on the shell console.

Unvalidated

drivshell> COMBO ce0-ce3 watch on

Built-in help

Parameters: <ports> [copper|fiber [<option>=<value>]]
            <ports> watch [on|off]
    Display or update operating parameters of copper/fiber combo PHY.
    Note: the 'port' command operates on the currently active medium.
    Example: combo ge1 fiber autoneg_enable=1 autoneg_advert=1000,pause
    Watch subcommand enables/disables media change notifications

Further reading

BCM-SDK命令的使用.pdf, bcm cli 命令, BCM_SDK命令, bcm cmd.