Skip to content

Commit

Permalink
Update command reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Junchao-Mellanox committed May 7, 2021
1 parent 87d9861 commit 7c5273a
Showing 1 changed file with 127 additions and 0 deletions.
127 changes: 127 additions & 0 deletions doc/Command-Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -3063,6 +3063,7 @@ Subsequent pages explain each of these commands in detail.
-?, -h, --help Show this message and exit.

Commands:
autoneg Show interface autoneg information
breakout Show Breakout Mode information by interfaces
counters Show interface counters
description Show interface status, protocol and...
Expand All @@ -3073,6 +3074,30 @@ Subsequent pages explain each of these commands in detail.
transceiver Show SFP Transceiver information
```
**show interfaces autoneg**
This show command displays the port auto negotiation status for all interfaces i.e. interface name, auto negotiation mode, speed, advertised speeds, interface type, advertised interface types, operational status, admin status. For a single interface, provide the interface name with the sub-command.
- Usage:
```
show interfaces autoneg status
show interfaces autoneg status <interface_name>
```
- Example:
```
admin@sonic:~$ show interfaces autoneg status
Interface Auto-Neg Mode Speed Adv Speeds Type Adv Types Oper Admin
----------- --------------- ------- ------------ ------ ----------- ------ -------
Ethernet0 enabled 25G 10G,25G CR CR,CR4 up up
Ethernet4 disabled 100G all CR4 all up up

admin@sonic:~$ show interfaces autoneg status Ethernet8
Interface Auto-Neg Mode Speed Adv Speeds Type Adv Types Oper Admin
----------- --------------- ------- ------------ ------ ----------- ------ -------
Ethernet8 disabled 100G N/A CR4 N/A up up
```
**show interfaces breakout**
This show command displays the port capability for all interfaces i.e. index, lanes, default_brkout_mode, breakout_modes(i.e. all the available breakout modes) and brkout_mode (i.e. current breakout mode). To display current breakout mode, "current-mode" subcommand can be used.For a single interface, provide the interface name with the sub-command.
Expand Down Expand Up @@ -3379,6 +3404,10 @@ This sub-section explains the following list of configuration on the interfaces.
4) speed - to set the interface speed
5) startup - to bring up the administratively shutdown interface
6) breakout - to set interface breakout mode
7) autoneg - to set interface auto negotiation mode
8) advertised-speeds - to set interface advertised speeds
9) advertised-types - to set interface advertised types
10) type - to set interface type
From 201904 release onwards, the “config interface” command syntax is changed and the format is as follows:
Expand Down Expand Up @@ -3713,6 +3742,104 @@ kindly use, double tab i.e. <tab><tab> to see the available breakout option cust
Go Back To [Beginning of the document](#) or [Beginning of this section](#interfaces)
**config interface autoneg <interface_name> (Versions >= 202106)**
This command is used to set port auto negotiation mode.
- Usage:
```
sudo config interface autoneg --help
Usage: config interface autoneg [OPTIONS] <interface_name> <mode>

Set interface auto negotiation mode

Options:
-v, --verbose Enable verbose output
-h, -?, --help Show this message and exit.
```
- Example:
```
admin@sonic:~$ sudo config interface autoneg Ethernet0 enabled

admin@sonic:~$ sudo config interface autoneg Ethernet0 disabled
```
Go Back To [Beginning of the document](#) or [Beginning of this section](#interfaces)
**config interface advertised-speeds <interface_name> (Versions >= 202106)**
This command is used to set port advertised speed.
- Usage:
```
sudo config interface advertised-speeds --help
Usage: config interface advertised-speeds [OPTIONS] <interface_name> <speed_list>

Set interface advertised speeds

Options:
-v, --verbose Enable verbose output
-h, -?, --help Show this message and exit.
```
- Example:
```
admin@sonic:~$ sudo config interface advertised-speeds Ethernet0 all

admin@sonic:~$ sudo config interface advertised-speeds Ethernet0 50000,100000
```
Go Back To [Beginning of the document](#) or [Beginning of this section](#interfaces)
**config interface advertised-types <interface_name> (Versions >= 202106)**
This command is used to set port advertised interface types.
- Usage:
```
sudo config interface advertised-types --help
Usage: config interface advertised-types [OPTIONS] <interface_name> <interface_type_list>

Set interface advertised types

Options:
-v, --verbose Enable verbose output
-h, -?, --help Show this message and exit.
```
- Example:
```
admin@sonic:~$ sudo config interface advertised-types Ethernet0 all

admin@sonic:~$ sudo config interface advertised-types Ethernet0 CR,CR4
```
Go Back To [Beginning of the document](#) or [Beginning of this section](#interfaces)
**config interface type <interface_name> (Versions >= 202106)**
This command is used to set port interface type.
- Usage:
```
sudo config interface type --help
Usage: config interface type [OPTIONS] <interface_name> <interface_type_value>

Set interface type

Options:
-v, --verbose Enable verbose output
-h, -?, --help Show this message and exit.
```
- Example:
```
admin@sonic:~$ sudo config interface type Ethernet0 CR4
```
Go Back To [Beginning of the document](#) or [Beginning of this section](#interfaces)
**config interface cable_length (Versions >= 202006)**
This command is used to configure the length of the cable connected to a port. The cable_length is in unit of meters and must be suffixed with "m".
Expand Down

0 comments on commit 7c5273a

Please sign in to comment.