摘要:“交换机重启后,配置全没了?”“明明配好了IP,怎么又变回出厂设置?”“花了2小时调策略,断电后一切归零?”
号主:老杨丨11年资深网络工程师,更多网工提升干货,
“交换机重启后,配置全没了?”
“明明配好了IP,怎么又变回出厂设置?”
“花了2小时调策略,断电后一切归零?”
这些让人心碎的场景,几乎每个网工朋友都经历过吧。罪魁祸首往往不是设备故障,而是:
忘记执行 save 命令!
在华为、H3C、思科等设备上,所有配置默认只保存在 运行配置(Running-Config) 中,断电或重启即丢失。
保存配置 是配置流程的“最后一步”,也是最关键的一步。
你做的所有配置,都在 RAM 中
设备重启时,从 Flash 读取配置
如果不手动保存,Flash 中的配置仍是旧的或出厂设置
结果:
重启后,设备“忘记”了你所有的努力。
save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Now saving the current configuration to the slot 0.
Save the configuration successfully.
建议:
配置完成后立即执行 save
养成肌肉记忆。
save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
Validating file. Please wait...
Saved the current configuration to flash:/startup.cfg successfully.
✅ 思科设备:Router# copy running-config startup-config
Building configuration...
[OK]
或简写:
Router# write memory
Building configuration...
[OK]
紧急返工,加班8小时重新配置
被领导通报批评
客户信任度下降
⚠️ 仅仅因为 **忘记敲 save**。
每次配置后,严格执行:
配置:完成所需设置
验证:ping、display 命令测试功能
保存:save 或 write 保存配置
✅ 口诀:配完不保存,等于白干!
# 华为示例:每30分钟自动保存auto save interval 30
⚠️ 注意:不能替代手动保存,仅作备份。
# 重启前务必执行:display startup
MainBoard:
Configuation file for next startup: flash:/vrpcfg.zip
Software for next startup: flash:/software.cc
Patch Package for next startup: null
确认 Configuation file 指向你刚保存的文件
如果仍是 vrpcfg.zip(出厂配置),立即 save!
来源:网络工程师俱乐部一点号