View Categories

First Use

7 min read

1.1 First Login to the Device #

1.1.1 Connections

cx-n-chapter1-figure-1
Figure 1-1 CX5 series switch serial port schematic
ParametersDefault value
Transmission speed115200bit/s
Flow control methodNo flow control
Calibration methodNo calibration
Stop bits1
Data bits8

1.1.2.1 Windows system

cx-n-chapter1-figure-3
Figure 1‑2 New session
cx-n-chapter1-figure-4
Figure 1‑3 Configuration of serial communication parameters
cx-n-chapter1-figure-5
Figure 1‑4 Accessing the serial login screen
cx-n-chapter1-figure-6
Figure 1‑5 Successful login to the switch

1.1.2.2 Linux system

cx-n-chapter1-figure-7
Figure 1‑6 minicom initial menu
cx-n-chapter1-figure-8
Figure 1‑7 Serial port configuration interface
cx-n-chapter1-figure-9
Figure 1‑8 minicom initial menu
cx-n-chapter1-figure-10
Figure 1‑9 Serial port login screen
cx-n-chapter1-figure-11
Figure 1‑10 Successful login to the switch

1.1.3 Configure Operation Mode

OperationCommandsDescription
Enter global configuration viewconfigure terminal-
Configuration operation modecli-mode {bash|cli}Requires user confirmation for execution; Available for admin and root users only
Return to the enable configuration viewexit-
Enter the Bash platformsystem bashAvailable for admin and root users only
Return to the CLI platformexitThis command is run in the bash operator platform

1.1.4 Configure the Management Port IP

OperationCommandsDescription
Enter global configuration viewconfigure terminal-
Enter the management port configuration viewinterface mgmt 0-
Configure the management port IP addressip address A.B.C.D/M gw A.B.C.D
ipv6 address A::B/M gw A::B
IPv4 address with subnet mask /32 is not allowed to be configured. Addresses with subnet mask /31 is allowed. In other subnet masks, addresses with the host portion all-zeros or all-ones are not allowed. IPv6 address with subnet mask /127 or /128 is not allowed to be configured. In other subnet masks, addresses with the host portion all-zeros are not allowed, but all-ones are allowed.
Exit the management port configuration viewexit-
Save configurationwrite-

1.1.5 Configure the Device Name

OperationCommandsDescription
Configure the device namehostname hostnameThis change will take effect when the user logs out and logs in again.
Save configurationwrite-

1.1.6 Example of First Login Device Configure

cx-n-chapter1-figure-12
Figure 1‑11 Network schematic diagram of the first login device

1.2 Familiarity with Using the Command Line #

1.2.1 Common views

Model nameMode entry methodSystem PromptWithdrawal MethodsFunction description
Privileged user modeExecute the sonic-cli command in the system terminalSwitch#exitPerforms system-related configuration; display device configuration and status information
Global configuration modeExecute the configure terminal command in privileged user modeSwitch(config)#exit or endConfigure the global parameters required for the operation of the device
Interface configuration modeExecute the interface family of commands in global modeSwitch(config-if-XXX)#
Switch(config-lo-XXX)#
Switch(config-vlanif-XXX)#
Switch(config-lagif-XXX)#
exit or endPerform interface-related configuration
Access list configuration modeExecute the access-list series of commands in global modeSwitch(config-l3-acl-{name})#
Switch(config-l3v6-acl-{name})#
Switch(config-mirror-acl-{name})#
Switch(config-flow_control-acl-{name})#
exit or endConfigure ACL access lists
VLAN configuration modeExecute vlan vlan-id in global modeSwitch(config-vlan-id)#exit or endPerform VLAN-related configuration

1.2.2 Commonly Used Keywords

Key wordsDescription
noCancel or turn off a setting.
show thisShow current view configuration.
configure terminalEnter global mode.
reloadReload the configuration.
rebootReboot the switch.
writeSave current configuration.
shutdownDisable/shutdown ports.
endRevert to privileged user mode.
exitReturn to top or log out.

1.2.3 Edit Command Line

1.2.4 Command Line Operation Tips

1.2.5 Help on Using the Command Line

1.2.6 View History of Commands

OperationCommandsDescription
Show history commandsshow history-
Access the last history command[Upper cursor key]-
Access the next history command[Lower cursor key]-

1.3 Configuration File Management #

1.3.1 Definition

1.3.2 Format of the Configuration File

1.3.3 View Profile

1.3.4 View Current Configuration

OperationCommandsDescription
View current configurationshow running-config-

1.3.5 Configuration Save

OperationCommandsDescription
Save configurationwrite-
View saved configurationshow startup-config-

1.3.6 Configuration Reload

OperationCommandsDescription
Configuration reloadingreload-

Leave a Reply

Your email address will not be published. Required fields are marked *

© 2025 Asteraix. All rights reserved.