dis cu看不到。dis cu看不到),但配置仍在设备中,需先恢复线卡识别,再查询:# 查看线卡状态(重点看“Status”列,是否为“Fault”“Down”)
display device slot <槽位号> # 如slot 10
# 查看线卡详细故障日志,排除硬件问题
display logbuffer | include "slot <槽位号> fault"
# 重置线卡(需谨慎,会中断该线卡业务)
reset slot <槽位号>
# 等待2-3分钟后,再次查看线卡状态,确认是否变为“Normal”
display device slot <槽位号>
dis cu即可看到端口配置。# 方法1:查看启动配置文件中的线卡端口段落(推荐)
display startup-configuration | include "interface <线卡端口类型>"
# 示例:查看10槽位千兆电口配置(端口命名格式为GigabitEthernet <槽位号>/<子卡号>/<端口号>)
display startup-configuration | include "interface GigabitEthernet 10/"
# 方法2:直接查看完整启动配置,搜索线卡相关配置
display startup-configuration # 按Ctrl+F搜索“slot <槽位号>”或端口号
# 查看同步后的运行配置(线卡恢复后)
display current-configuration | include "interface <线卡端口类型> <槽位号>/"
# 导出配置到文件,避免再次丢失
save configuration to flash:/slot_config_backup.cfg
# 第一步:查看配置历史记录,找到自动保存前的版本
display configuration history # 显示版本号、保存时间、操作人
# 示例:找到“2024-05-20 09:00”(自动保存前)的版本号为10
# 第二步:回滚到该版本并查看线卡配置
rollback configuration to version 10 # 回滚到指定版本
display current-configuration | include "interface <线卡端口类型> <槽位号>/"
# 查看flash中是否有备份配置
display flash | include ".cfg" # 找到备份文件(如backup_20240519.cfg)
# 查看备份文件中的线卡配置
display saved-configuration from flash:/backup_20240519.cfg | include "interface <线卡端口类型> <槽位号>/"
display startup-configuration | include "interface GigabitEthernet <槽位号>/"
# 查看最近30天内该线卡端口的配置命令
display logbuffer reverse | include "interface <线卡端口号>" # 如interface GigabitEthernet 10/0/1
# 配置每天0点自动备份,仅当所有线卡正常时执行
schedule job backup_config
job at 00:00 daily
command 1 display device | include "Fault" > flash:/device_status.txt
command 2 if [ $(cat flash:/device_status.txt | wc -l) -eq 0 ]; then save configuration to flash:/daily_backup_$(date +%Y%m%d).cfg; fi
dis cu显示的配置不完整,此时执行save会覆盖启动配置,导致故障线卡配置丢失。建议故障时先查询启动配置,确认无误后再保存。# 导出所有线卡端口配置到文件
display current-configuration interface | include "interface GigabitEthernet|interface 10GE" > flash:/linecard_config_list.txt
display startup-configuration、rollback、display configuration history等命令,基本能找回所有线卡配置,无需依赖故障线卡的实时状态。
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
只是能看到默认的配置