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


13.6.2 コミュニティの確認

〈この項の構成〉

(1) 運用コマンド一覧

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

表13‒26 運用コマンド一覧

コマンド名

説明

show ip route

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

show ip bgp

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

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

特定のコミュニティを持つ経路を表示する場合はshow ip bgpコマンドのcommunityパラメータ指定を使用します。

図13‒35 show ip bgpコマンド(communityパラメータ指定)の実行結果
> show ip bgp community 1000:1002
Date 20XX/10/20 21:07:32 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コマンドのrouteパラメータ指定を使用します。

図13‒36 show ip bgpコマンド(routeパラメータ指定)の実行結果
> show ip bgp route 10.10/16
Date 20XX/10/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を使用して表示します。

図13‒37 show ip bgpコマンドの実行結果
> show ip bgp
Date 20XX/10/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.169.10/24       192.168.2.2     -      100       0      i
*> 192.169.20/24       192.168.2.2     -      100       0      i

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

広告したBGP4経路のCOMMUNITIES属性は運用コマンドshow ip bgpのadvertised-routesパラメータ指定を使用します。

図13‒38 show ip bgpコマンド(advertised-routesパラメータ指定)の実行結果
> show ip bgp advertised-routes 192.169.10/24
Date 20XX/10/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.169.10/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.169.10/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