§1 安全守则 Safety Rules — Read First
禁止 / DO NOT: reload · 重启 · 拔线做测试。所有操作均不影响现有流量。
Never reload, reboot, or unplug cables. All operations are non-disruptive to live traffic.
禁止 / DO NOT: 删除现有路由条目。只加新路由,不删旧路由。
Never remove existing routes. Add new routes only — never delete old ones.
禁止 / DO NOT: 在业务高峰期操作。选午休 13:00-14:00 或 21:00 后。
Never work during peak hours. Choose lunch break (13:00-14:00) or after 21:00 local time.
必须 / MUST: 每步做完立即验证。看到预期输出才继续下一步。
Verify after every step. Only proceed when expected output is confirmed.
必须 / MUST: 提前复制当前 running-config 到记事本。出问题 30 秒内能回滚。
Copy current running-config to a text file before starting. 30-second rollback available at all times.
全程无感 / Zero Downtime: 所有配置是 add(新增)。最坏情况:新路由未生效,流量走原路。
All operations are add-only. Worst case: new routes don't activate, traffic flows via original path.
§2 第一步:现状快照 Pre-flight — Document Current State
1 进入 4500-X,跑下面 5 条命令,截图保存 / Run these 5 commands, save all output
# ① 当前路由表 / Current routing table
show ip route 0.0.0.0
# ② 所有接口状态 / All interface status (note ISP interface names & IPs)
show ip interface brief | exclude unassigned
# ③ 确认 ip routing 是否已开启 / Check if ip routing is enabled
show running-config | include ip routing
# ④ 当前 ISP 接口配置 / Current ISP interface config
show running-config interface TenGigabitEthernet1/1/1
show running-config interface TenGigabitEthernet1/1/2
# ⑤ VLAN / switchport 状态 / Interface status
show interfaces status | include Te1/1/1|Te1/1/2
从这 5 条输出中确认 / Confirm from output:
① ip routing 是否已开启 / Is ip routing enabled?(已有输出 → 跳过 §3 第 2 步)
② 两条 ISP 线分别接在哪个口 / Which interfaces connect to Horizon and Nexus?(记录全名 / full interface name, e.g. Te1/1/1)
③ 两个接口的当前 IP 和子网掩码 / IP addresses and netmasks for both interfaces
④ 接口是否已是 L3 / Are ports already L3?(show run 里有 ip address = L3,有 switchport = L2)
⑤ 当前默认路由走哪个网关 / Which gateway is the current default route pointing to?
§3 第二步:配置自动切换 Configuration — Add Only, Never Remove
⚠️ 替换占位符 / Replace Placeholders: 下面命令里的 <...> 请替换为 §2 中记下的实际值 / Replace with actual values from Step §2。
核对清单 / Checklist: Horizon interface & IP & GW / Nexus interface & IP & GW — 共 6 个值 / 6 values total.
2 启用 IP 路由 / Enable IP Routing (skip if already enabled)
如果 §2 第③条已有输出 → 跳过此步 / SKIP.
没有输出才做 / Only run if no output from §2③:
configure terminal
ip routing
end
show running-config | include ip routing # 验证:应有输出 / Verify: should see "ip routing"
3 确认 ISP 接口是 L3 模式 / Confirm ISP Ports are L3 Mode
从 §2 第④条判断 / Check §2④: 如果有 ip address x.x.x.x → 已是 L3 / Already L3 — 跳过 / SKIP.
如果有 switchport → 需要切换 / Must convert. 该链路会中断 2-3 秒 / Link drops ~2-3s. 午休做 / Do during lunch. 一次只做一个口 / One port at a time:
# 先做 Horizon 口 / Horizon first — 做完验证再做 Nexus / verify, then Nexus
configure terminal
interface <Horizon-interface>
no switchport
ip address <Horizon-IP> <netmask>
no shutdown
end
show ip interface brief | include <Horizon-interface> # 验证 / Verify: Protocol = up
# 确认链路恢复后 / Confirm link is back, then do Nexus
configure terminal
interface <Nexus-interface>
no switchport
ip address <Nexus-IP> <netmask>
no shutdown
end
show ip interface brief | include <Nexus-interface> # 验证 / Verify: Protocol = up
回滚 / Rollback: interface <name> → switchport → no ip address → end
4 配置 IP SLA 探测 / Configure IP SLA Probes (zero impact)
configure terminal
! Horizon 探测 / probe — 每 5s ping 8.8.8.8 / every 5s
ip sla 1
icmp-echo 8.8.8.8 source-interface <Horizon-interface>
frequency 5
timeout 1000
ip sla schedule 1 life forever start-time now
! Nexus 探测 / probe — 每 10s ping 8.8.4.4 / every 10s (wireless tolerates jitter)
ip sla 2
icmp-echo 8.8.4.4 source-interface <Nexus-interface>
frequency 10
timeout 2000
ip sla schedule 2 life forever start-time now
end
! 验证 / Verify: both should show "reachable"
show ip sla statistics
5 配置 Track 跟踪对象 / Configure Tracking Objects (zero impact)
configure terminal
track 1 ip sla 1 reachability
delay down 15 up 10
track 2 ip sla 2 reachability
delay down 30 up 20
end
! 验证 / Verify: both tracks should show "Up"
show track brief
6 添加双默认路由 / Add Dual Default Routes (core step)
关键 / Critical: 只加不删 / Add only, never remove. 新路由加完后 distance=1 优先走 Horizon,distance=10 备用走 Nexus。如果旧默认路由也是 distance=1 且网关不同 → 删旧的或改 distance=5,避免冲突。
configure terminal
! 主路由 / Primary — Horizon, distance=1 (preferred), tracked
ip route 0.0.0.0 0.0.0.0 <Horizon-GW> track 1
! 备路由 / Backup — Nexus, distance=10 (only active if primary fails)
ip route 0.0.0.0 0.0.0.0 <Nexus-GW> 10
end
! 验证 / Verify: primary shows "*" (active), backup listed but inactive
show ip route 0.0.0.0
如果旧默认路由 distance 也是 1 且网关不同 / If old default route also has distance=1 with different GW:
用 no ip route 0.0.0.0 0.0.0.0 <old-GW> 删旧的,或把旧的改 distance=5。不要让两条 distance=1 的默认路由同时存在。
Remove old route or change its distance to 5. Never have two distance=1 default routes simultaneously.
§4 第三步:无感验证 Non-disruptive Verification
7 正常状态确认 / Confirm Normal State
# ① 主路由 active / Primary route active — shows via Horizon-GW with *
show ip route 0.0.0.0
# ② SLA 都 reachable / Both SLAs reachable
show ip sla statistics | include reachable|Latest
# ③ Track 都 Up / Both tracks Up
show track brief
# ④ 从仓库一台 PC ping 8.8.8.8 / Ping from any warehouse PC — should work via Horizon
ping 8.8.8.8
8 模拟切换测试(不影响业务) / Simulated Failover Test (non-disruptive)
不是拔线——用 management shutdown 关闭 Horizon 接口。WMS 系统会短暂卡 10-15 秒然后恢复。选午休做。
No cable pulling. Use admin shutdown on Horizon interface. WMS may hitch for 10-15 seconds then recover. Do during lunch break.
# ① 先确认当前路由 / Confirm current route first
show ip route 0.0.0.0 # 应为 / Should be: Horizon
# ② 禁用 Horizon 接口 / Shutdown Horizon (simulating fiber cut)
configure terminal
interface <Horizon-interface>
shutdown
end
# ③ 等 10-15 秒,观察路由切换 / Wait, observe failover
show ip route 0.0.0.0 # 应为 / Should be: Nexus
show track brief # Track 1 = Down
# ④ 从 PC ping 8.8.8.8 / Ping from PC — 应通 / should work via Nexus
ping 8.8.8.8
# ⑤ 恢复 Horizon / Bring Horizon back
configure terminal
interface <Horizon-interface>
no shutdown
end
# ⑥ 等 10 秒,确认自动切回 / Wait, confirm auto-revert
show ip route 0.0.0.0 # 应为 / Should be: Horizon (recovered)
show track brief # Track 1 = Up
切换中断时间 / Switch interruption: 10-15 秒 / Seconds. WMS 系统会有短暂重连 / brief reconnect. 如果 30 秒后还没切过去 / If not switched after 30s → 执行回滚 / Rollback (§5).