[Edgecore SONiC] Reset default configuration Follow
How to reset to factory default.
- Generate the default configure through the Platform and the HwSKU information
- Use the script "restore_202006.sh" to reset default
- Use ZTP to generate the default configure automatically
Support models
- Switch model name:
AS7726-32X, AS7326-56X, AS7816-64X, AS5835-54X(T), AS4630-54PE, AS9716-32D, AS8000(Minipack), Wedge100BF-32X
- Edgecore SONiC version:
- Edgecore-SONiC_20201123_130028_ec202006_74
- Edgecore-SONiC_20201229_070315_ec202006_101
- Edgecore-SONiC_20201229_070315_ec202006_bfn_65(Wedge100BF-32X)
Restriction
-
known issue: Wrong alias names in the default configuration with "AS7326-56X".(This issue is fixed in Edgecore-SONiC_20201229_070315_ec202006_101 and above)
admin@sonic:~$ show interfaces status
Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC
----------- --------------- ------- ----- ----- ------- ------ ------ ------- --------------- ----------
Ethernet0 3 25G 9100 none Eth5/3 routed down up N/A N/A
Ethernet1 2 25G 9100 none Eth5/2 routed down up N/A N/A
Ethernet2 4 25G 9100 none Eth5/4 routed down up N/A N/A
Ethernet3 8 25G 9100 none Eth6/4 routed down up N/A N/A
Ethernet4 7 25G 9100 none Eth6/3 routed down up N/A N/A
...
omitted
...
Relation article
Generate the default configure through the Platform and the HwSKU information
Step 1: Check the $Platform and $HwSKU information
Step 2: Set the $Platform and $HwSKU information to environment variable.
Step 3: Generate the default setting same as initial installed.
Step 4: Replace the "default.json" to the correct position.
Step 5. Config reload or power cycle the switch
Use the script "restore_202006.sh" to reset default
Upload and Execute the script restore_202006.sh on the SONiC
The script generates default configuration config_db.json automatically. Reboot the switch or reload configuration to take effect.
Step 1: Set the management IP
Step 2: Upload the Script to the SONiC
Step 3: Change permission of script.
Step 4: Running the script.
Step 5. config reload or power cycle the switch
Use ZTP to generate the default configure automatically
When you disable ZTP function and there is no config_db.json on /etc/sonic, the ZTP function will generate a default config_db.json file automatically.
Step 1: Remove or rename the /etc/sonic/config_db.json file.
Step 2: Check the current ZTP.
admin@sonic:~$ show ztp
ZTP Admin Mode : False
ZTP Service : Inactive
ZTP Status : Not Started
ZTP Service is not running
Step 3: enable ZTP function and then reboot.
Step 4: Check the current SONiC's config folder.
admin@sonic:~$ sudo ls /etc/sonic/ | grep config_db.json
config_db.json.modified
Step 5: Disable ZTP function, and then check the SONiC's config folder.
admin@sonic:~$ sudo config ztp disable
Active ZTP session will be stopped and disabled, continue? [y/N]: y
admin@sonic:~$ sudo ls /etc/sonic/ | grep config_db.json
config_db.json
config_db.json.modified
admin@sonic:~$
Comments
0 comments
Please sign in to leave a comment.