BGP ルータは、ルータ間のピア接続を確立するときのみ、ルーティング情報の交換ができます。BGP ピアの確立は、デバイス間の TCP 接続の作成から開始します。TCP 接続が確立すると、BGP デバイスは、BGP オープン メッセージを交換することによって BGP セッションの作成を試行します。BGP オープン メッセージでは、BGP のバージョン、AS 番号、保留時間、および BGP ID の交換が行われます。
BGP ピアを確立するプロセスでは、複数の要因により、BGP ネイバーシップが正しく確立されないことがあります。このドキュメントでは、この問題の考えられる原因について説明します。
誤入力のため、ネイバー ステートメント内の IP アドレスか、または自律システム番号が誤っている。設定の確認が必要。
ユニキャストが次のいずれかが原因で実行できなくなっている。
冗長度の高いネットワークにおける非同期転送モード(ATM)またはフレーム リレー環境で、Virtual Circuit(VC)のマッピングが誤っている。
ユニキャストまたは TCP パケットがアクセス リストによってブロックされている。
ネットワーク アドレス変換(NAT)がルータ上で実行されており、ユニキャスト パケットの変換が行われている。
レイヤ 2 がダウンしている。
ebgp-multihop コマンドの設定漏れは、よくある誤りです。この状態だと、ピアが表示されません。この問題は、2 番目の例で説明します。
このドキュメントに特有の要件はありません。
このドキュメントの内容は、特定のソフトウェアやハードウェアのバージョンに限定されるものではありません。
このマニュアルの情報は、特定のラボ環境に置かれたデバイスに基づいて作成されました。このドキュメントで使用するすべてのデバイスは、初期(デフォルト)設定の状態から起動しています。実稼動中のネットワークで作業をしている場合、実際にコマンドを使用する前に、その潜在的な影響について理解しておく必要があります。
次のネットワーク図は、最初の 3 つの原因の例として使用します。
ドキュメント表記の詳細は、『シスコ テクニカル ティップスの表記法』を参照してください。
ルータR1-AGSのshow ip bgp summaryコマンドは、セッションがアクティブであることを示します。
R1-AGS(9)# show ip bgp summary BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.10.10.2 4 400 0 0 0 0 0 never Active
設定を次に示します。
R1-AGS | R6-2500 |
---|---|
interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface Serial1 ip address 10.10.10.1 255.255.255.0 ! router bgp 400 neighbor 10.10.10.2 remote-as 400 neighbor 10.10.10.2 update-source Loopback0 ! ip route 1.1.1.1 255.255.255.255 10.10.10.2 |
interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface Serial0 ip address 10.10.10.2 255.255.255.0 ! router bgp 400 neighbor 10.10.10.1 remote-as 400 neighbor 10.10.10.1 update-source Loopback0 ! ip route 2.2.2.2 255.255.255.255 10.10.10.1 |
debug ip bgp コマンドと debug ip tcp transactions コマンドは、TCP 接続が失敗していることを示しています。
ルータ R1-AGS のデバッグ:
BGP: 10.10.10.2 open active, local address 2.2.2.2 TCB00135978 created TCB00135978 setting property 0 16ABEA TCB00135978 bound to 2.2.2.2.11039 TCP: sending SYN, seq 3797113156, ack 0 TCP0: Connection to 10.10.10.2:179, advertising MSS 1460 TCP0: state was CLOSED -> SYNSENT [11039 -> 10.10.10.2(179)] TCP0: state was SYNSENT -> CLOSED [11039 -> 10.10.10.2(179)] TCP0: bad seg from 10.10.10.2 -- closing connection: seq 0 ack 3797113157 rcvnxt 0 rcvwnd 0 TCP0: connection closed - remote sent RST TCB00135978 destroyed BGP: 10.10.10.2 open failed: Connection refused by remote host TCP: sending RST, seq 0, ack 1965664223 TCP: sent RST to 1.1.1.1:11016 from 10.10.10.1:179
ルータ R6-2500 のデバッグ:
TCP: sending RST, seq 0, ack 3797113157 TCP: sent RST to 2.2.2.2:11039 from 10.10.10.2:179 BGP: 10.10.10.1 open active, local address 1.1.1.1 TCB001E030C created TCB001E030C setting property TCP_WINDOW_SIZE (0) 194F7A TCB001E030C setting property TCP_TOS (11) 194F79 TCB001E030C bound to 1.1.1.1.11016 TCP: sending SYN, seq 1965664222, ack 0 TCP0: Connection to 10.10.10.1:179, advertising MSS 1460 TCP0: state was CLOSED -> SYNSENT [11016 -> 10.10.10.1(179)] TCP0: state was SYNSENT -> CLOSED [11016 -> 10.10.10.1(179)] TCP0: bad seg from 10.10.10.1 -- closing connection: seq 0 ack 1965664223 rcvnxt 0 rcvwnd 0 TCP0: connection closed - remote sent RST TCB 0x1E030C destroyed BGP: 10.10.10.1 open failed: Connection refused by remote host
この状況に対処するには、ネイバー ステートメントのループバック アドレスを修正するか、update-source コマンドを設定から削除します。
この例では、アドレスの修正を行います。
R1-AGS | R6-2500 |
---|---|
router bgp 400 neighbor 1.1.1.1 remote-as 400 neighbor 1.1.1.1 update-source Loopback0 ! ip route 1.1.1.1 255.255.255.255 10.10.10.2 |
router bgp 400 neighbor 2.2.2.2 remote-as 400 neighbor 2.2.2.2 update-source Loopback0 ! ip route 2.2.2.2 255.255.255.255 10.10.10.1 |
show ip bgp summaryコマンドを実行すると、ルータR1-AGSが確立状態であることがわかります。
R1-AGS(9)# show ip bgp summary BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 1.1.1.1 4 400 3 3 1 0 0 00:00:26 0
注:ルータのリロード後にBGPセッションが確立されない場合は、BGPでneighbor soft-reconfiguration文を設定してソフトリセットを行います。
ルータR1-AGSのshow ip bgp summaryコマンドは、セッションが現在アクティブであることを示します。
R1-AGS(9)# show ip bgp summary BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 1.1.1.1 4 400 0 0 0 0 0 never Active
設定を次に示します。
R1-AGS | R6-2500 |
---|---|
interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface Serial1 ip address 10.10.10.1 255.255.255.0 ! router bgp 300 neighbor 1.1.1.1 remote-as 400 neighbor 1.1.1.1 ebgp-multihop 2 neighbor 1.1.1.1 update-source Loopback0 |
interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface Serial0 ip address 10.10.10.2 255.255.255.0 ! router bgp 400 neighbor 2.2.2.2 remote-as 300 neighbor 2.2.2.2 ebgp-multihop 2 neighbor 2.2.2.2 update-source Loopback0 |
debug コマンドを実行すると、ネイバーへのルートが存在していないことがわかります。
ルータ R1-AGS のデバッグ:
BGP: 1.1.1.1 open active, delay 9568ms BGP: 1.1.1.1 multihop open delayed 19872ms (no route) BGP: 1.1.1.1 multihop open delayed 12784ms (no route)
ルータ R6-2500 のデバッグ:
BGP: 2.2.2.2 open active, delay 6531ms BGP: 2.2.2.2 multihop open delayed 14112ms (no route) BGP: 2.2.2.2 multihop open delayed 15408ms (no route)
この状況に対処するには、BGP ネイバー ステートメントにネクスト ホップへのルートを追加します。状況に応じて、スタティック ルートまたはダイナミック ルートのどちらかを使用できます。より詳細な制御が可能な内部 BGP(iBGP)環境では、ルーティング プロトコルを使用してルートを動的に伝達することができます。外部 BGP(eBGP)環境の場合は、ネクスト ホップに到達するスタティック ルートを設定することを推奨します。
neighbor ebgp-multihop コマンドは、eBGP ピアでのピアリング先の IP アドレスが直接接続されていない場合にのみ使用します。
この例では、スタティック ルートを使用しています。
R1-AGS | R6-2500 |
---|---|
router bgp 300 neighbor 1.1.1.1 remote-as 400 neighbor 1.1.1.1 ebgp-multihop 2 neighbor 1.1.1.1 update-source Loopback0 ! ip route 1.1.1.1 255.255.255.255 10.10.10.2 |
router bgp 400 neighbor 2.2.2.2 remote-as 300 neighbor 2.2.2.2 ebgp-multihop 2 neighbor 2.2.2.2 update-source Loopback0 ! ip route 2.2.2.2 255.255.255.255 10.10.10.1 |
show ip bgp summaryコマンドは、ルータR1-AGSがestablished状態であることを示しています。
R1-AGS(9)# show ip bgp summary BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 1.1.1.1 4 400 3 3 1 0 0 00:00:26 0
注:デフォルトルートは、BGPセッション(iBGP/eBGP)の確立には使用されません。デバッグには同じ(ルートなし)出力が表示されますが、BGPネイバーにpingを実行することはできます。ここでの解決策も、BGP ネイバーにルートを追加することです。
ルータR1-AGSのshow ip bgp summaryコマンドは、セッションがアクティブであることを示します。
R1-AGS(9)# show ip bgp summary BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 1.1.1.1 4 400 0 0 0 0 0 never Active
設定を次に示します。
R1-AGS | R6-2500 |
---|---|
interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface Serial1 ip address 10.10.10.1 255.255.255.0 ! router bgp 400 neighbor 1.1.1.1 remote-as 400 ! ip route 1.1.1.1 255.255.255.255 10.10.10.2 |
interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface Serial0 ip address 10.10.10.2 255.255.255.0 ! router bgp 400 neighbor 2.2.2.2 remote-as 400 ! ip route 2.2.2.2 255.255.255.255 10.10.10.1 |
debug コマンドを実行すると、TCP 接続が失敗していることがわかります。
ルータ R1-AGS のデバッグ:
TCP: sending RST, seq 0, ack 2248020754 TCP: sent RST to 10.10.10.2:11018 from 2.2.2.2:179 BGP: 1.1.1.1 open active, local address 10.10.10.1 TCB0016B06C created TCB0016B06C setting property 0 16ADEA TCB0016B06C bound to 10.10.10.1.11042 TCP: sending SYN, seq 4099938541, ack 0 TCP0: Connection to 1.1.1.1:179, advertising MSS 536 TCP0: state was CLOSED -> SYNSENT [11042 -> 1.1.1.1(179)] TCP0: state was SYNSENT -> CLOSED [11042 -> 1.1.1.1(179)] TCP0: bad seg from 1.1.1.1 -- closing connection: seq 0 ack 4099938542 rcvnxt 0 rcvwnd 0 TCP0: connection closed - remote sent RST TCB0016B06C destroyed BGP: 1.1.1.1 open failed: Connection refused by remote host
ルータ R6-2500 のデバッグ:
BGP: 2.2.2.2 open active, local address 10.10.10.2 TCB00194800 created TCB00194800 setting property TCP_WINDOW_SIZE (0) E6572 TCB00194800 setting property TCP_TOS (11) E6571 TCB00194800 bound to 10.10.10.2.11018 TCP: sending SYN, seq 2248020753, ack 0 TCP0: Connection to 2.2.2.2:179, advertising MSS 556 TCP0: state was CLOSED -> SYNSENT [11018 -> 2.2.2.2(179)] TCP0: state was SYNSENT -> CLOSED [11018 -> 2.2.2.2(179)] TCP0: bad seg from 2.2.2.2 -- closing connection: seq 0 ack 2248020754 rcvnxt 0 rcvwnd 0 TCP0: connection closed - remote sent RST TCB 0x194800 destroyed BGP: 2.2.2.2 open failed: Connection refused by remote host TCP: sending RST, seq 0, ack 4099938542 TCP: sent RST to 10.10.10.1:11042 from 1.1.1.1:179
この問題を解決するには、両方のルータで update-source コマンドを設定するか、あるいは両方のルータで update-source コマンドを削除し、ネイバー ステートメントを変更します。次に、両方の解決策の例を示します。
ここでは、両方のルータで update-source コマンドの設定を行います。
R1-AGS | R6-2500 |
---|---|
interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface Serial1 ip address 10.10.10.1 255.255.255.0 ! router bgp 400 neighbor 1.1.1.1 remote-as 400 neighbor 1.1.1.1 update-source Loopback0 ! ip route 1.1.1.1 255.255.255.255 10.10.10.2 |
interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface Serial0 ip address 10.10.10.2 255.255.255.0 ! router bgp 400 neighbor 2.2.2.2 remote-as 400 neighbor 2.2.2.2 update-source Loopback0 ! ip route 2.2.2.2 255.255.255.255 10.10.10.1 |
show ip bgp summaryコマンドは、ルータR1-AGSがestablished状態であることを示しています。
R1-AGS(9)# show ip bgp summary BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 2.2.2.2 4 400 3 3 1 0 0 00:00:26 0
update-source コマンドの使用が必要なのは、ループバック アドレスに別のユーザがピアリングする場合のみです。これは、iBGP ピアでも eBGP ピアでも同様です。
ここでは、両方のルータ上で update-source コマンドを削除し、ネイバー ステートメントの変更を行います。
R1-AGS | R6-2500 |
---|---|
interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface Serial1 ip address 10.10.10.1 255.255.255.0 ! router bgp 400 neighbor 10.10.10.2 remote-as 400 |
interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface Serial0 ip address 10.10.10.2 255.255.255.0 ! router bgp 400 neighbor 10.10.10.1 remote-as 400 |
show ip bgp summaryコマンドは、ルータR1-AGSがestablished状態であることを示しています。
R1-AGS(9)# show ip bgp summary BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.10.10.2 4 400 3 3 1 0 0 00:00:26 0