Config load Follow
Overview:
This command will read the json format setting and rewrite to configuration database as running configuration.
If the setting in json file is exist in configuration database, it will overwrite them and skip others.
Example:
- "Config load" without specified the setting file.(It will load the default startup
- Config load specified file
Reference model:
- 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)
Example1 : "Config load" without specified the setting file.(It will load the default startup configuration file)
Procedure:
Step 1. Execute "config load"
Example2 : Config load specified file
Procedure:
Step1. Check the running setting for Vlan interfaces.
JSON
admin@sonic:~$ sudo show runningconfiguration all
{
omitted...
"VLAN": {
"Vlan10": {
"members": [
"Ethernet0",
"Ethernet3"
],
"vlanid": "10"
}
},
"VLAN_INTERFACE": {
"Vlan10": {},
"Vlan10|192.168.10.10/24": {}
},
"VLAN_MEMBER": {
"Vlan10|Ethernet0": {
"tagging_mode": "tagged"
},
"Vlan10|Ethernet3": {
"tagging_mode": "untagged"
}
}
}
Step2. Create a json file(vlan_interface.json) to modify following:
- Vlan ip interface : 192.168.10.10/24 to 192.168.20.10/24
- Ethernet0 set to untagged member
- Remove Ethernet3 from Vlan10 member
- Add Ethernet48 to Vlan10 member as tagged.
admin@sonic:~$ cat vlan_interface.json
{
"VLAN": {
"Vlan10": {
"members": [
"Ethernet0",
"Ethernet48"
],
"vlanid": "10"
}
},
"VLAN_INTERFACE": {
"Vlan10|192.168.10.10/24": null,
"Vlan10|192.168.20.10/24": {}
},
"VLAN_MEMBER": {
"Vlan10|Ethernet0": {
"tagging_mode": "untagged"
},
"Vlan10|Ethernet3": null,
"Vlan10|Ethernet48": {
"tagging_mode": "tagged"
}
}
}
Step3. Run "config load" to apply information to running configuration.
Step 4. Check the running configuration
admin@sonic:~$ show runningconfiguration all
{
omitted...
"VLAN": {
"Vlan10": {
"members": [
"Ethernet0",
"Ethernet48"
],
"vlanid": "10"
}
},
"VLAN_INTERFACE": {
"Vlan10": {},
"Vlan10|192.168.20.10/24": {}
},
"VLAN_MEMBER": {
"Vlan10|Ethernet0": {
"tagging_mode": "untagged"
},
"Vlan10|Ethernet48": {
"tagging_mode": "tagged"
}
}
}
Step5. Check startup configuration, it won't be modified.
admin@sonic:~$ sudo cat /etc/sonic/config_db.json
{
omitted...
"VLAN": {
"Vlan10": {
"members": [
"Ethernet0",
"Ethernet3"
],
"vlanid": "10"
}
},
"VLAN_INTERFACE": {
"Vlan10": {},
"Vlan10|192.168.10.10/24": {}
},
"VLAN_MEMBER": {
"Vlan10|Ethernet0": {
"tagging_mode": "tagged"
},
"Vlan10|Ethernet3": {
"tagging_mode": "untagged"
}
}
}
Step6. Save the running configuration to startup configuration and checking.
admin@sonic:~$ sudo config save -y
admin@sonic:~$ sudo cat /etc/sonic/config_db.json
{
omitted...
"VLAN": {
"Vlan10": {
"members": [
"Ethernet0",
"Ethernet48"
],
"vlanid": "10"
}
},
"VLAN_INTERFACE": {
"Vlan10": {},
"Vlan10|192.168.20.10/24": {}
},
"VLAN_MEMBER": {
"Vlan10|Ethernet0": {
"tagging_mode": "untagged"
},
"Vlan10|Ethernet48": {
"tagging_mode": "tagged"
}
}
}
Comments
0 comments
Please sign in to leave a comment.