1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

BGPネイバーがEstablishedにならない時の切り分け|Idle・Active・OpenSent別のチェックポイント

1
Posted at

BGPネイバーがEstablishedにならない時の切り分け

ネットワークエンジニアの現場で「BGPがEstablishedに上がらない」問題は定番のトラブル。show ip bgp summaryで状態がIdleかActiveかOpenSentかでアプローチが違うので、その辺をまとめました。

BGP状態遷移の6段階

Idle → Connect → Active → OpenSent → OpenConfirm → Established

詰まる場所はだいたい3つに集中:

  • Active連発(55%):TCP 179が届いてない / MD5不一致
  • OpenSentで切断(25%):AS番号やパラメータ不一致
  • Idleから動かない(15%):設定そのもの

状態別の切り分け

Idleで止まっている

設定が動いていない可能性が高い。

R1# show running-config | section router bgp
router bgp 65001
 neighbor 10.0.12.2 remote-as 65002
 neighbor 10.0.12.2 shutdown   ← これが残ってると永遠にIdle

R1(config-router)# no neighbor 10.0.12.2 shutdown

検証時に止めて本番で外し忘れる、というパターンが多いです。

Activeで止まっている

TCP 179がブロックされてる疑い。

R1# telnet 10.0.12.2 179 /source-interface GigabitEthernet0/0
% Connection refused by remote host  ← 相手にBGP設定がない
% Connection timed out               ← FW/ACLでブロック

Connection refusedとtimed outは意味が全然違うので注意。前者は宛先まで到達してるけどBGPが待ち受けてない。後者は途中で落とされてる。

MD5認証の片側設定漏れもActive連発の原因。両側のpasswordを目視確認。

OpenSent / OpenConfirmで切れる

TCPは張れてるのでBGPパラメータが合ってない。debug ip bgpで見るのが早い。

R1# debug ip bgp 10.0.12.2
BGP: 10.0.12.2 received NOTIFICATION 2/2 (peer in wrong AS)

NotificationコードはRFC 4271のSection 4.5に対応表あり。

確認コマンド3点セット

コマンド 見るべきところ
show ip bgp summary State/PfxRcd, Up/Down
show ip bgp neighbors Last reset reason
show tcp brief 179のESTAB有無

Last reset reasonがPeer closed the sessionなら相手側で何か起きてる。BGPトラブルは「両側を見る」が原則です。

iBGPの落とし穴

iBGPはループバック同士で張ることが多いので:

neighbor 1.1.1.1 update-source Loopback0   # これがないとIdle/Active行き
neighbor 1.1.1.1 next-hop-self              # eBGP経路を流すなら必須

詳しくはブログで

この記事の完全版(FSM全状態の詳細・コマンド一覧表・FAQなど)はブログで公開しています。

👉 BGPネイバーがEstablishedにならない原因と切り分け手順|Idle・Active・OpenSent状態別の対処法【Cisco実機検証】

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?