次に、基本 BGP 情報をリセットおよび表示する例を示します。
clear ip bgp * コマンドは BGP ネイバー セッションをすべてクリアし、リセットします。Cisco IOS Release 12.2(25)S 以降の構文では clear ip bgp all です。特定のネイバーをクリアするには neighbor-address 引数、自律システムにあるすべてのピアをクリアするには autonomous-system-number 引数を使用します。引数が指定されていない場合、このコマンドは BGP ネイバー セッションをすべてクリアし、リセットします。
(注) |
また、clear ip bgp * コマンドは内部 BGP 構造をすべてクリアするため、トラブルシューティング ツールとして便利です。
|
Router# clear ip bgp *
show ip bgp コマンドは、BGP ルーティング テーブルのすべてのエントリを表示するために使用します。次に、10.1.1.0 ネットワークの BGP ルーティング テーブル情報を表示する例を示します。
Router# show ip bgp 10.1.1.0 255.255.255.0
BGP routing table entry for 10.1.1.0/24, version 2
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Advertised to update-groups:
1
40000
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 neighbors コマンドは、TCP および BGP 接続に関する情報をネイバーに表示するために使用します。次の例は、上の図(「IPv4 VRF アドレス ファミリ用に BGP ピアを設定」の項)のルータ B から、ルータ E にある BGP ネイバー 192.168.3.2
にアドバタイズされるルートを示しています。
Router# show ip bgp neighbors 192.168.3.2 advertised-routes
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.1.1.0/24 192.168.1.2 0 0 40000 i
*> 172.17.1.0/24 0.0.0.0 0 32768 i
Total number of prefixes 2
show ip bgp paths コマンドは、データベース内のすべての BGP パスを表示するために使用します。次に、上の図(「BGP ピアのカスタマイズ」の項)のルータ B に対する BGP パス情報を表示する例を示します。
Router# show ip bgp paths
Address Hash Refcount Metric Path
0x2FB5DB0 0 5 0 i
0x2FB5C90 1 4 0 i
0x2FB5C00 1361 2 0 50000 i
0x2FB5D20 2625 2 0 40000 i
show ip bgp summary コマンドは、すべての BGP 接続のステータスを表示するために使用します。次に、上の図(「BGP ピアのカスタマイズ」の項)のルータ B に対する BGP ルーティング テーブル情報を表示する例を示します。
Router# show ip bgp summary
BGP router identifier 172.17.1.99, local AS number 45000
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
4/2 BGP path/bestpath attribute entries using 496 bytes of memory
2 BGP AS-PATH entries using 48 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 882 total bytes of memory
BGP activity 14/10 prefixes, 16/12 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
192.168.1.2 4 40000 667 672 3 0 0 00:03:49 1
192.168.3.2 4 50000 468 467 0 0 0 00:03:49 (NoNeg)