Runbook: T0/T1 リンクが flap し続ける¶
実行前提
config interface shutdown / startup の連打や config reload は周辺 BGP / ECMP 経路を巻き込む。flap 中の interface のみ admin down にして安定化させ、ピア側の状態を確認すること。事前に show interfaces status > /tmp/if.before と show interfaces transceiver eeprom -d > /tmp/xcvr.before を取得。
症状¶
- syslog に
Port <if> oper status changed from up to downが断続 show interfaces counters errorsのRX_ERR/FCSが増加- BGP peer が頻繁に flap
確認コマンド¶
# flap 頻度 (直近 syslog)
sudo grep "oper status changed" /var/log/syslog | grep Ethernet0 | tail -20
# 光モジュール DOM
show interfaces transceiver eeprom -d Ethernet0
# FEC / RX エラー
show interfaces counters fec-stats
show interfaces counters errors Ethernet0
# ASIC port_state_change の trigger
docker logs syncd 2>&1 | grep -i "port_state_change" | tail -20
想定原因(優先度順)¶
- 光モジュール (SFP/QSFP) の劣化: DOM 値が閾値外
- FEC mismatch: 両端 FEC mode 違い → fec-errors.md
- autoneg / speed mismatch: → asic-link-autoneg-mismatch.md
- ケーブル / patch panel の物理劣化
- 対向側 OS の panic / reboot ループ
切り分け手順¶
flowchart TD
A[link が頻繁に up/down] --> B{flap 頻度測定?}
B -- 高 --> B1[直近 syslog で trigger を特定]
B -- 低 --> C{DOM 値変動?}
C -- 異常 --> C1[光学 / 温度 / 給電を確認]
C -- 正常 --> D{FEC エラー増?}
D -- Yes --> D1[fec-errors runbook へ]
D -- No --> E[対向 LACP / autoneg の状態を確認]
1. flap 頻度の定量化¶
2. DOM 値¶
- RX power が
-15dBm未満 / TX power が異常 → 物理層の問題
3. FEC / counter¶
4. ASIC notification¶
対処方法¶
- 一時 admin down で安定化:
sudo config interface shutdown Ethernet0 - SFP 入れ替え / 清掃
- 両端 FEC mode 統一:
sudo config interface fec Ethernet0 rs - 暫定で
config interface speed Ethernet0 <lower>に落とす
確認¶
対処後の正常化を以下で裏取りする。
- 症状解消: 「症状」節で挙げた事象 (counter / log / state) が回復していること
- 再発監視: 数分〜数十分の間隔で同コマンドを再実行し、値がフラップしていないこと
- 副作用なし: 関連サブシステム (syslog /
show interfaces counters errors/show ip bgp summary等) に新規 error が出ていないこと - 永続化:
sudo config save -y済みでconfig_db.jsonに変更が反映されていること (恒久対処の場合)
短時間で再発する場合は「想定原因」リストの次候補に進む。
関連ページ¶
引用元¶
-
sonic-net/sonic-swss @ 4305596 — portsorch.cpp port_state notification ↩
-
sonic-net/sonic-platform-common @ 4305596 — sfp_base DOM ↩