Home > Networking Solutions > Enterprise/Data Center Networking Solutions > Enterprise SONiC Networking Solutions > Guides > Enterprise SONiC Distribution by Dell Technologies - Lifecycle Management > Config_db.json
The primary databases hosted by the REDIS database include APPL_DB, CONFIG_DB, STATE_DB, ASIC_DB, and COUNTERS_DB. Stock SONiC keeps the configuration in ConfigDB. ConfigDB uses a table-object schema, and config_db.json is a serialization of DB. The following example shows a Device Metadata table. The Device Metadata table has a single object named localhost. For example, the Device Metadata table contains hwsku, platform, and so on.
"DEVICE_METADATA": {
"localhost": {
"hostname": "sonic-leaf1",
"hwsku": "DellEMC-S5232f-C32",
"mac": "3c:2c:30:49:20:00",
"platform": "x86_64-dellemc_s5232f_c3538-r0",
"type": "LeafRouter"
}
}
In the stock SONiC, ConfigDB is implemented as database 4 of local Redis. The config_db.json file contains the startup configurations. It is found in /etc/sonic/. When system boots, configurations are loaded from the config_db.json file into Redis. The config_db.json is in /etc/sonic/. The content in the config_db.json file is start-up config, and content in redisDB is running-config.
The configuration can be modified in the config_db.json file, and the config file can be loaded into the NOS. For example, the following configuration can be added into the config_db.json file for configuring VLAN 1003 on a switch running stock SONiC NOS, adding IP address, and adding interfaces to the VLAN.
"Vlan1003": {
"members": [
"Ethernet48",
"Ethernet0"
],
"vlanid": "1003"
}
},
"VLAN_INTERFACE": {
"Vlan1003|172.10.3.253/24": {}
},
"VLAN_MEMBER": {
"Vlan1003|Ethernet0": {
"tagging_mode": "tagged"
},
"Vlan1003|Ethernet48": {
"tagging_mode": "untagged"
}
}
Viewing the added configuration in the config_db.json file can be done using the Linux shell. See the following figure.
Note: For the configurations added to the config_db.json file to take effect in the redisDB, use the config load or config reload command to force load the JSON file into the database. Alternatively, users can reboot the device.