この例では、このタスクに適用可能な構文だけが使用されています。詳細については、『Cisco IOS IP Routing: BGP Command Reference』を参照してください。
例
次に、この作業を上の図のルータ A で設定した後で、ルータ A の BGP ルーティング テーブルを表示する show ip bgp コマンドの出力例を示します。この自律システムに対してローカルなネットワーク 10.1.1.0 に対するエントリも表示されています。
BGP table version is 12, local router ID is 10.1.1.99
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.1.1.0/24 0.0.0.0 0 32768 i
この例では、このタスクに適用可能な構文だけが使用されています。詳細については、『Cisco IOS IP Routing: BGP Command Reference』を参照してください。
ステップ 9
show ip bgp neighbors [neighbor-address]
例:
Router(config-router-af)# show ip bgp neighbors 192.168.2.2
(任意)ネイバーへの TCP 接続および BGP 接続の情報を表示します。
(注)
この例では、このタスクに適用可能な構文だけが使用されています。詳細については、『Cisco IOS IP Routing: BGP Command Reference』を参照してください。
例
次に、この作業を上の図のルータ A およびルータ B で設定した後で、ルータ A の BGP ルーティング テーブルを表示する show ip bgp コマンドの出力例を示します。これで、自律システム 45000 でネットワーク 172.17.1.0 のエントリを確認できるようになります。
BGP table version is 13, local router ID is 10.1.1.99
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.1.1.0/24 0.0.0.0 0 32768 i
*> 172.17.1.0/24 192.168.1.1 0 0 45000 i
次に、この作業を上の図のルータ A で設定した後で、ルータ A の BGP ネイバー 192.168.1.1 への TCP および BGP 接続に関する情報を表示する show ip bgp neighbors コマンドの出力例を示します。
BGP neighbor is 192.168.1.1, remote AS 45000, external link
BGP version 4, remote router ID 172.17.1.99
BGP state = Established, up for 00:06:55
Last read 00:00:15, last write 00:00:15, hold time is 120, keepalive intervals
Configured hold time is 120,keepalive interval is 70 seconds, Minimum holdtims
Neighbor capabilities:
Route refresh: advertised and received (old & new)
Address family IPv4 Unicast: advertised and received
Message statistics:
InQ depth is 0
OutQ depth is 0
Sent Rcvd
Opens: 1 1
Notifications: 0 0
Updates: 1 2
Keepalives: 13 13
Route Refresh: 0 0
Total: 15 16
Default minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
BGP table version 13, neighbor version 13/0
Output queue size : 0
Index 1, Offset 0, Mask 0x2
1 update-group member
Sent Rcvd
Prefix activity: ---- ----
Prefixes Current: 1 1 (Consumes 52 bytes)
Prefixes Total: 1 1
Implicit Withdraw: 0 0
Explicit Withdraw: 0 0
Used as bestpath: n/a 1
Used as multipath: n/a 0
Outbound Inbound
Local Policy Denied Prefixes: -------- -------
AS_PATH loop: n/a 1
Bestpath from this peer: 1 n/a
Total: 1 1
Number of NLRIs in the update sent: max 0, min 0
Connections established 1; dropped 0
Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Connection is ECN Disabled
Local host: 192.168.1.2, Local port: 179
Foreign host: 192.168.1.1, Foreign port: 37725
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x12F4F2C):
Timer Starts Wakeups Next
Retrans 14 0 0x0
TimeWait 0 0 0x0
AckHold 13 8 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 165379618 snduna: 165379963 sndnxt: 165379963 sndwnd: 16040
irs: 3127821601 rcvnxt: 3127821993 rcvwnd: 15993 delrcvwnd: 391
SRTT: 254 ms, RTTO: 619 ms, RTV: 365 ms, KRTT: 0 ms
minRTT: 12 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: passive open, nagle, gen tcbs
IP Precedence value : 6
Datagrams (max data segment is 1460 bytes):
Rcvd: 20 (out of order: 0), with data: 15, total data bytes: 391
Sent: 22 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 04
この例では、このタスクに適用可能な構文だけが使用されています。詳細については、『Cisco IOS IP Routing: BGP Command Reference』を参照してください。
ステップ 12
show ip bgp summary
例:
Device# show ip bgp summary
(任意)BGP 接続すべての状況を表示します。
例
次の例は、上の図のルータ B で実行された show ip bgp コマンドの出力ですが、ここにはルータ A で 192.168.1.2 にある BGP ネイバーから学習されたネットワーク 10.1.1.0 に対する BGP ルーティング テーブル エントリと、デフォルトの asplain 形式で表した 4
バイト AS 番号 65536 が表示されています。
RouterB# show ip bgp 10.1.1.0
BGP routing table entry for 10.1.1.0/24, version 2
Paths: (1 available, best #1)
Advertised to update-groups:
2
65536
192.168.1.2 from 192.168.1.2 (10.1.1.99)
Origin IGP, metric 0, localpref 100, valid, external, best
次の例は、show ip bgp summary コマンドの出力ですが、ここには、上の図のルータ B でこの作業を設定した後で、ルータ A にある BGP ネイバー 192.168.1.2 の 4 バイト AS 番号が 65536 であることが表示されています。
RouterB# show ip bgp summary
BGP router identifier 172.17.1.99, local AS number 65538
BGP table version is 3, main routing table version 3
2 network entries using 234 bytes of memory
2 path entries using 104 bytes of memory
3/2 BGP path/bestpath attribute entries using 444 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 806 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down Stated
192.168.1.2 4 65536 6 6 3 0 0 00:01:33 1
トラブルシューティングのヒント
BGP ルータ間の基本的なネットワーク接続性を確認するには、ping コマンドを使用します。
4 バイト自律システム番号で使用される出力および正規表現とのマッチング形式のデフォルトを変更
4 バイト自律システム(AS)番号のデフォルト出力形式を asplain 形式から asdot 表記法形式に変更するには、この作業を実行します。4 バイト AS 番号の出力形式の変化を表示するには、show ip bgp summary コマンドを使用します。
手順の概要
enable
show ip bgp summary
configure terminal
router bgp autonomous-system-number
bgp asnotation dot
end
clear ip bgp *
show ip bgp summary
show ip bgp regexp regexp
configure terminal
router bgp autonomous-system-number
no bgp asnotation dot
end
clear ip bgp *
手順の詳細
コマンドまたはアクション
目的
ステップ 1
enable
例:
Device> enable
特権 EXEC モードを有効にします。
パスワードを入力します(要求された場合)。
ステップ 2
show ip bgp summary
例:
Device# show ip bgp summary
すべてのボーダー ゲートウェイ プロトコル(BGP)接続のステータスを表示します。
ステップ 3
configure terminal
例:
Device# configure terminal
グローバル コンフィギュレーション モードを開始します。
ステップ 4
router bgp autonomous-system-number
例:
Device(config)# router bgp 65538
指定したルーティング プロセスのルータ コンフィギュレーション モードを開始します。
この例では、4 バイト AS 番号 65538 は asplain 表記法で定義されています。
ステップ 5
bgp asnotation dot
例:
Device(config-router)# bgp asnotation dot
BGP 4 バイト AS 番号のデフォルト出力形式を asplain(10 進数値)からドット表記法に変更します。
(注)
4 バイト AS 番号は、asplain 形式、または asdot 形式を使用して設定できます。このコマンドの影響を受けるのは、show コマンドの出力、または正規表現のマッチングだけです。
ステップ 6
end
例:
Device(config-router)# end
アドレス ファミリ コンフィギュレーション モードを終了して、特権 EXEC モードに戻ります。
ステップ 7
clear ip bgp *
例:
Device# clear ip bgp *
現在の BGP セッションをすべてクリアし、リセットします。
この例では、4 バイト AS 番号形式の変更がすべての BGP セッションに反映されていることを確認するために、ハード リセットが実行されています。
(注)
この例では、このタスクに適用可能な構文だけが使用されています。詳細については、『Cisco IOS IP Routing: BGP Command Reference』を参照してください。
ステップ 8
show ip bgp summary
例:
Device# show ip bgp summary
BGP 接続すべての状況を表示します。
ステップ 9
show ip bgp regexp regexp
例:
Device# show ip bgp regexp ^1\.0$
AS パスの正規表現と一致するルートを表示します。
この例では、4 バイトの AS パスをマッチングする正規表現は、asdot 形式で設定されています。
ステップ 10
configure terminal
例:
Device# configure terminal
グローバル コンフィギュレーション モードを開始します。
ステップ 11
router bgp autonomous-system-number
例:
Device(config)# router bgp 65538
指定したルーティング プロセスのルータ コンフィギュレーション モードを開始します。
この例では、4 バイト AS 番号 65538 は asplain 表記法で定義されています。
ステップ 12
no bgp asnotation dot
例:
Device(config-router)# no bgp asnotation dot
BGP 4 バイト AS 番号のデフォルト出力形式を asplain(10 進数値)にリセットします。
(注)
4 バイト AS 番号は、asplain 形式、または asdot 形式を使用して設定できます。このコマンドの影響を受けるのは、show コマンドの出力、または正規表現のマッチングだけです。
ステップ 13
end
例:
Device(config-router)# end
ルータ コンフィギュレーション モードを終了して、特権 EXEC モードに戻ります。
ステップ 14
clear ip bgp *
例:
Device# clear ip bgp *
現在の BGP セッションをすべてクリアし、リセットします。
この例では、4 バイト AS 番号形式の変更がすべての BGP セッションに反映されていることを確認するために、ハード リセットが実行されています。
(注)
この例では、このタスクに適用可能な構文だけが使用されています。詳細については、『Cisco IOS IP Routing: BGP Command Reference』を参照してください。
例
次の show ip bgp summary コマンドの出力は、4 バイト AS 番号のデフォルト asplain 形式を示しています。ここで、asplain 形式で表された 4 バイト AS 番号 65536 および 65550 に注意してください。
Router# show ip bgp summary
BGP router identifier 172.17.1.99, local AS number 65538
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down Statd
192.168.1.2 4 65536 7 7 1 0 0 00:03:04 0
192.168.3.2 4 65550 4 4 1 0 0 00:00:15 0
bgp asnotation dot コマンドの設定後(これに、現在の BGP セッションをすべてハード リセットする clear ip bgp * コマンドが続きます)、出力は、次の show ip bgp summary コマンドの出力に示すように、asdot 表記法の形式に変換されます。asdot 形式で表された 4 バイト AS 番号 1.0 および 1.14 に注意してください。これらは AS 番号 65536 と 65550 を asdot 変換したものです。
Router# show ip bgp summary
BGP router identifier 172.17.1.99, local AS number 1.2
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down Statd
192.168.1.2 4 1.0 9 9 1 0 0 00:04:13 0
192.168.3.2 4 1.14 6 6 1 0 0 00:01:24 0
bgp asnotation dot コマンドの設定後(これに、現在の BGP セッションをすべてハード リセットする clear ip bgp * コマンドが続きます)、4 バイトの AS パスで使用される正規表現とのマッチング形式は asdot 表記法の形式に変更されます。4 バイト AS 番号は、asplain 形式または asdot 形式のいずれかを使用して、正規表現で設定できますが、現在のデフォルト形式を使用して設定された
4 バイト AS 番号だけがマッチングされます。下の先頭の例では、show ip bgp regexp コマンドは、asplain 形式で表された 4 バイト AS 番号を使って設定されています。現在のデフォルト形式は asdot 形式なのでマッチングは失敗し、何も出力されません。asdot 形式を使用した 2 番目の例では、マッチングは成功し、4
バイトの AS パスに関する情報が asdot 表記法を使って表示されます。
Router# show ip bgp regexp ^65536$
Router# show ip bgp regexp ^1\.0$
BGP table version is 2, local router ID is 172.17.1.99
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.1.1.0/24 192.168.1.2 0 0 1.0 i
show ip bgp neighbors [neighbor-address] [received-routes | routes | advertised-routes | paths regexp | dampened-routes | received prefix-filter ]
例:
Device# show ip bgp neighbors 192.168.3.2
(任意)ネイバーへの TCP 接続および BGP 接続の情報を表示します。
例
次に、この作業を上の図のルータ B およびルータ E で設定した後で、ルータ B の BGP IPv4 マルチキャスト情報を表示する show ip bgp ipv4 multicast コマンドの出力例を示します。IPv4 マルチキャスト アドレス ファミリで設定された各デバイスに対してローカルなネットワークは、出力テーブルに表示されます。
BGP table version is 3, local router ID is 172.17.1.99
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.2.2.0/24 192.168.3.2 0 0 50000 i
*> 172.17.1.0/24 0.0.0.0 0 32768 i
次は、ネイバー 192.168.3.2 に対する show ip bgp neighbors コマンドからの出力例の一部分ですが、これにはこのネイバーに関する一般的な BGP 情報と、具体的な BGP IPv4 マルチキャスト アドレス ファミリ情報が表示されます。このコマンドは、上の図のルータ B とルータ E でこの作業を設定した後、ルータ
B で入力されたものです。
BGP neighbor is 192.168.3.2, remote AS 50000, external link
Description: finance
BGP version 4, remote router ID 10.2.2.99
BGP state = Established, up for 01:48:27
Last read 00:00:26, last write 00:00:26, hold time is 120, keepalive intervals
Configured hold time is 120,keepalive interval is 70 seconds, Minimum holdtims
Neighbor capabilities:
Route refresh: advertised and received (old & new)
Address family IPv4 Unicast: advertised
Address family IPv4 Multicast: advertised and received
!
For address family: IPv4 Multicast
BGP table version 3, neighbor version 3/0
Output queue size : 0
Index 1, Offset 0, Mask 0x2
1 update-group member
Uses NEXT_HOP attribute for MBGP NLRIs
Sent Rcvd
Prefix activity: ---- ----
Prefixes Current: 1 1 (Consumes 48 bytes)
Prefixes Total: 1 1
Implicit Withdraw: 0 0
Explicit Withdraw: 0 0
Used as bestpath: n/a 1
Used as multipath: n/a 0
Outbound Inbound
Local Policy Denied Prefixes: -------- -------
Bestpath from this peer: 1 n/a
Total: 1 0
Number of NLRIs in the update sent: max 0, min 0
Minimum time between advertisement runs is 25 seconds
Connections established 8; dropped 7
Last reset 01:48:54, due to User reset
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Connection is ECN Disabled
Local host: 192.168.3.1, Local port: 13172
Foreign host: 192.168.3.2, Foreign port: 179
!
非アクティブ ルートのアドバタイズメントを再度有効にするには、このコマンドの no 形式を入力します。
ステップ 6
end
例:
Router(config-router-af)# end
アドレス ファミリ コンフィギュレーション モードを終了して、特権 EXEC モードを開始します。
ステップ 7
show ip bgp rib-failure
例:
Router# show ip bgp rib-failure
(任意)RIB にインストールされていない BGP ルートを表示します。
例
次の例に示す show ip bgp rib-failure コマンドの出力には、RIB にインストールされていないルートが表示されています。この出力からは、表示されたルートがインストールされなかったのは、より都合のよいアドミニストレーティブ ディスタンスのルートがすでに RIB に存在していたからであることがわかります。
Router# show ip bgp rib-failure
Network Next Hop RIB-failure RIB-NH Matches
10.1.15.0/24 10.1.35.5 Higher admin distance n/a
10.1.16.0/24 10.1.15.1 Higher admin distance n/a
次の出力例は、show ip bgp injected-paths コマンドを入力したときに表示される出力に類似しています。
Router# show ip bgp injected-paths
BGP table version is 11, local router ID is 10.0.0.1
Status codes:s suppressed, d damped, h history, * valid, > best, i -
internal
Origin codes:i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 172.16.0.0 10.0.0.2 0 ?
*> 172.17.0.0/16 10.0.0.2 0 ?