構成定義ガイド

[目次][用語][索引][前へ][次へ]


8.6.5 BGP4プロトコル(インポート・フィルタ)

<この項の構成>
(1) 特定ネットワークの経路の受付,および拒否

(1) 特定ネットワークの経路の受付,および拒否

(a) 設定内容

ピア172.17.1.1から宛先ネットワークがプライベートアドレス(10.0.0.0/8,172.16.0.0/12,192.168.0.0/16)の経路を除く,ASPATH 65000の経路を受け付け,その他の経路を拒否します。また,受け付けた経路のLOCALPREF属性値を200に設定します。

(b) 構成定義情報例

● attribute-listによる設定

[コマンドによる設定]
 1    (config)# atribute-list attribute-filter ASPATH-65000
      [atribute-list attribute-filter ASPATH-65000]
 2    (config)# aspath "65000"
      [atribute-list attribute-filter ASPATH-65000]
 3    (config)# exit
 4    (config)# attribute-list set-attribute SETPREF-200
      [attribute-list set-attribute SETPREF-200]
 5    (config)# localpref 200
      [attribute-list set-attribute SETPREF-200]
 6    (config)# exit
 7    (config)# import proto bgp peer 172.17.1.1 attribute-filter
                ASPATH-65000 set-attribute SETPREF-200
      [import proto bgp peer 172.17.1.1 attribute-filter ASPATH-65000
       set-attribute SETPREF-200]
 8    (config)# all
      [import proto bgp peer 172.17.1.1 attribute-filter ASPATH-65000
       set-attribute SETPREF-200]
 9    (config)# 10.0.0.0/8 restrict
      [import proto bgp peer 172.17.1.1 attribute-filter ASPATH-65000
       set-attribute SETPREF-200]
10    (config)# 172.16.0.0/12 restrict
      [import proto bgp peer 172.17.1.1 attribute-filter ASPATH-65000
       set-attribute SETPREF-200]
11    (config)# 192.168.0.0/16 restrict
      [import proto bgp peer 172.17.1.1 attribute-filter ASPATH-65000
       set-attribute SETPREF-200]
12    (config)# exit
13    (config)# import proto bgp peer 172.17.1.1 restrict

表8-123 構成定義情報解説

解説番号 解説
1〜12 ピア172.17.1.1から宛先ネットワークがプライベートアドレス(10.0.0.0/8,172.16.0.0/12,192.168.0.0/16)の経路を除く,ASPATH 65000の経路を受け付けます。また,LOCAPREF属性値を200に設定します。
13 解説番号1〜12以外の経路を拒否します。

[構成定義情報の表示]
attribute-list set-attribute SETPREF-200
  localpref 200
!
atribute-list attribute-filter ASPATH-65000
  aspath "65000"
!
import proto bgp peer 172.17.1.1 attribute-filter ASPATH-65000 set-attribute SETPREF-200
  all
  10.0.0.0/8 restrict
  172.16.0.0/12 restrict
  192.168.0.0/16 restrict
!
import proto bgp peer 172.17.1.1 restrict

● route-filterによる設定

[コマンドによる設定]
 1    (config)# route-filter name AS65000-IN
      [route-filter name AS65000-IN]
 2    (config)# seq 100 match network 10.0.0.0/8
      [route-filter name AS65000-IN]
 3    (config)# seq 100 match network 172.16.0.0/12
      [route-filter name AS65000-IN]
 4    (config)# seq 100 match network 192.168.0.0/16
      [route-filter name AS65000-IN]
 5    (config)# seq 100 drop
      [route-filter name AS65000-IN]
 6    (config)# seq 200 match aspath "65000"
      [route-filter name AS65000-IN]
 7    (config)# seq 200 set localpref 200
      [route-filter name AS65000-IN]
 8    (config)# seq 300 drop
      [route-filter name AS65000-IN]
 9    (config)# exit
10    (config)# import proto bgp peer 172.17.1.1 route-filter AS65000-IN

表8-124 構成定義情報解説

解説番号 解説
1〜10 ピア172.17.1.1から宛先ネットワークがプライベートアドレス(10.0.0.0/8,172.16.0.0/12,192.168.0.0/16)の経路を除く,ASPATH 65000の経路を受け付けます。また,LOCAPREF属性値を200に設定します。また,その他の経路を拒否します。

[構成定義情報の表示]
route-filter name AS65000-IN
  seq 100 match network 10.0.0.0/8
  seq 100 match network 172.16.0.0/12
  seq 100 match network 192.168.0.0/16
  seq 100 drop
  seq 200 match aspath "65000"
  seq 200 set localpref 200
  seq 300 drop
!
import proto bgp peer 172.17.1.1 route-filter AS65000-IN

● route-filter,attribute-list,およびnetwork-filterによる設定

[コマンドによる設定]
 1    (config)# attribute-list attribute-filter ASPATH-65000
      [attribute-list attribute-filter ASPATH-65000]
 2    (config)# aspath "65000"
      [attribute-list attribute-filter ASPATH-65000]
 3    (config)# exit
 4    (config)# attribute-list set-attribute SETPREF-200
      [attribute-list set-attribute SETPREF-200]
 5    (config)# localpref 200
      [attribute-list set-attribute SETPREF-200]
 6    (config)# exit
 7    (config)# network-filter name PRIVATE-NET
      [network-filter name PRIVATE-NET]
 8    (config)# 10.0.0.0/8
      [network-filter name PRIVATE-NET]
 9    (config)# 172.16.0.0/12
      [network-filter name PRIVATE-NET]
10    (config)# 192.168.0.0/16
      [network-filter name PRIVATE-NET]
11    (config)# exit
12    (config)# route-filter name AS65000-IN
      [route-filter name AS65000-IN]
13    (config)# seq 100 match network-filter PRIVATE-NET
      [route-filter name AS65000-IN]
14    (config)# seq 100 drop
      [route-filter name AS65000-IN]
15    (config)# seq 200 match attribute-filter ASPATH-65000
      [route-filter name AS65000-IN]
16    (config)# seq 200 set set-attribute SETPREF-200
      [route-filter name AS65000-IN]
17    (config)# seq 300 drop
      [route-filter name AS65000-IN]
18    (config)# exit
19    (config)# import proto bgp peer 172.17.1.1 route-filter AS65000-IN

表8-125 構成定義情報解説

解説番号 解説
1〜19 ピア172.17.1.1から宛先ネットワークがプライベートアドレス(10.0.0.0/8,172.16.0.0/12,192.168.0.0/16)の経路を除く,ASPATH 65000の経路を受け付けます。また,LOCAPREF属性値を200に設定します。また,その他の経路を拒否します。

[構成定義情報の表示]
attribute-list set-attribute SETPREF-200
  localpref 200
!
attribute-list attribute-filter ASPATH-65000
  aspath "65000"
!
network-filter name PRIVATE-NET
  10.0.0.0/8
  172.16.0.0/12
  192.168.0.0/16
!
route-filter name AS65000-IN
  seq 100 match network-filter PRIVATE-NET
  seq 100 drop
  seq 200 match attribute-filter ASPATH-65000
  seq 200 set set-attribute SETPREF-200
  seq 300 drop
!
import proto bgp peer 172.17.1.1 route-filter AS65000-IN

[注意事項]
  1. 経路フィルタ(route-filter)未使用時のインポート・フィルタの検索順序を次に示します。下記検索順序で検索した結果,最初に一致したフィルタの指定値(preference,set-attribute,またはrestrict)に従い,受信経路を取り扱います。

    「フィルタリング条件」
    (a)学習元ターゲット情報:peer指定,as指定,policygroup指定,未指定(全指定)
    (b)BGP4属性情報:attribute-filter
    (c)宛先ネットワーク情報:<Route_Filter>
    なお,「一致」とは,定義されたフィルタリング条件(上記(a),(b),(c))が共に一致した場合を指します。

    「フィルタ検索順序」
    (a)学習元ターゲット情報:peer指定,as指定,policygroup指定,未指定の順に検索します。各指定(peer指定,as指定,policygroup指定,未指定)が複数定義されている場合は各指定内での定義順に検索します。
    (b)宛先ネットワーク情報:よりマスク長の長い<Route_Filter>順に検索します。
  2. 経路フィルタ(route-filter)使用時のインポート・フィルタの検索順序を次に示します。下記検索順序で検索した結果,最初に一致したフィルタの指定値(route-filter内のset,drop,またはaccept)に従い,受信経路を取り扱います。なお,インポート・フィルタに複数の経路フィルタ識別子を列記指定した場合は,列記指定した経路フィルタのどれかで一致すると,当該フィルタにdropまたはacceptの指定がなければ,次に列記されている経路フィルタを続けて検索します。

    「フィルタリング条件」
    (a)学習元ターゲット情報:peer指定,as指定,policygroup指定,未指定(全指定)
    (b)経路フィルタ情報:route-filter内のmatch情報
    なお,「一致」とは,定義されたフィルタリング条件(上記(a),(b))が共に一致した場合を指します。

    「フィルタ検索順序」
    (a)学習元ターゲット情報:peer指定,as指定,policygroup指定,未指定の順に検索します。各指定(peer指定,as指定,policygroup指定,未指定)が複数定義されている場合は各指定内での定義順に検索します。
    (b)経路フィルタ情報:seq番号順に検索します。
  3. 受信した経路情報が定義されたフィルタリング条件に一致しない場合,当該経路の取り扱いはデフォルト動作(受信したすべての経路を取り込む)と同様となります。

[目次][前へ][次へ]


[他社商品名称に関する表示]

Copyright (c)2005 ALAXALA Networks Corporation. All rights reserved.