コンフィグレーションガイド Vol.3


22.4.2 コミュニティの確認

〈この項の構成〉

(1) 運用コマンド一覧

コミュニティの運用コマンド一覧を次の表に示します。

表22‒34 運用コマンド一覧

コマンド名

説明

show ip route

ルーティングテーブルで保持するIPv4経路情報を表示します。

show ip bgp

BGP4プロトコルに関する情報を表示します。

show ipv6 route

ルーティングテーブルで保持するIPv6経路情報を表示します。

show ipv6 bgp

BGP4+プロトコルに関する情報を表示します。

(2) 学習経路のコミュニティ表示

特定のコミュニティを持つ経路は,show ip bgpコマンドまたはshow ipv6 bgpコマンドでcommunityパラメータを指定して表示します。

図22‒29 show ip bgpコマンド(communityパラメータ指定)の実行結果
> show ip bgp community 1000:1002
Date 20XX/03/20 21:00:18 UTC
Local AS: 65531, Local Router ID: 192.168.1.100
Status Codes: d dampened, * valid, > active, S Stale, r RIB failure
Origin Codes: i - IGP, e - EGP, ? - incomplete
   Network             Next Hop        MED    LocalPref Weight Path
*> 10.10/16            172.16.2.2      0      -         0      65532 i
*> 10.20/16            172.16.2.2      0      -         0      65532 i

経路が持つコミュニティは,show ip bgpコマンドまたはshow ipv6 bgpコマンドでrouteパラメータを指定して表示します。

図22‒30 show ip bgpコマンド(routeパラメータ指定)の実行結果
> show ip bgp route 10.10/16
Date 20XX/03/20 21:09:12 UTC
BGP Peer: 172.16.2.2   , Remote AS: 65532
Local AS: 65531, Local Router ID: 192.168.1.100
Status Codes: d dampened, * valid, > active, S Stale, r RIB failure
Route 10.10/16
*> Next Hop 172.16.2.2
     MED: -, LocalPref: 100, Weight: 0, Type: External route
     Origin: IGP, IGP Metric: 0
     Path: 65532
     Communities: 1000:1002

(3) 学習経路フィルタリング結果の表示

COMMUNITIES属性を使用した学習経路フィルタリングの結果は,show ip bgpコマンドまたはshow ipv6 bgpコマンドで表示します。

図22‒31 show ip bgpコマンドの実行結果
> show ip bgp
Date 20XX/03/20 21:10:09 UTC
Local AS: 65531, Local Router ID: 192.168.1.100
Status Codes: d dampened, * valid, > active, S Stale, r RIB failure
Origin Codes: i - IGP, e - EGP, ? - incomplete
   Network             Next Hop        MED    LocalPref Weight Path
*> 10.10/16            172.16.2.2      -      120       0      65532 i
*  10.10/16            10.2.2.2        -       80       0      65533 i
*> 10.20/16            172.16.2.2      -      120       0      65532 i
*  10.20/16            10.2.2.2        -       80       0      65533 i
*> 192.168.20/24       192.168.2.2     -      100       0      i
*> 192.168.30/24       192.168.2.2     -      100       0      i

(4) 広告経路のコミュニティ表示

広告したBGP経路のCOMMUNITIES属性は,show ip bgpコマンドまたはshow ipv6 bgpコマンドでadvertised-routesパラメータを指定して表示します。

図22‒32 show ip bgpコマンド(advertised-routesパラメータ指定)の実行結果
> show ip bgp advertised-routes 192.168.20/24
Date 20XX/03/20 21:10:25 UTC
BGP Peer: 172.16.2.2    , Remote AS: 65532
Local AS: 65531, Local Router ID: 192.168.1.100
Status Codes: d dampened, * valid, > active, S Stale, r RIB failure
Route 192.168.20/24
*> Next Hop 192.168.2.2
     MED: -, LocalPref: -,  Type: Internal route
     Origin: IGP
     Path: 65531
     Next Hop Attribute: 172.16.2.1
     Communities: 1000:1001
 
BGP Peer: 10.2.2.2     , Remote AS: 65533
Local AS: 65531, Local Router ID: 192.168.1.100
Status Codes: d dampened, * valid, > active, S Stale, r RIB failure
Route 192.168.20/24
*> Next Hop 192.168.2.2
     MED: -, LocalPref: -, Type: Internal route
     Origin: IGP
     Path: 65531
     Next Hop Attribute: 10.1.2.1
     Communities: 1000:1001