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


12.2.6 学習用経路フィルタの設定

[設定のポイント]

学習したBGP4経路の優先度を設定する場合,route-mapを使用し,条件と設定値を指定します。

[コマンドによる設定]

  1. (config)# ip prefix-list EXT_IN seq 10 permit 10.10.0.0/16

    (config)# route-map SET_LOCPREF_IN permit 10

    (config-route-map)# match ip address prefix-list EXT_IN

    (config-route-map)# set local-preference 120

    (config-route-map)# exit

    (config)# route-map SET_LOCPREF_IN permit 20

    (config-route-map)# exit

    宛先ネットワークが10.10.0.0/16のLOCAL_PREF属性値に120を設定します。

  2. (config)# ip as-path access-list 10 permit "_65529$"

    (config)# route-map SET_ASPREPEND_IN permit 10

    (config-route-map)# match as-path 10

    (config-route-map)# set as-path prepend count 1

    (config-route-map)# exit

    (config)# route-map SET_ASPREPEND_IN permit 20

    (config-route-map)# exit

    AS_PATH属性のAS配列の最終が65529の場合にAS配列のAS数を1個追加

    します。

  3. (config)# ip prefix-list INT_IN_1 seq 10 permit 172.20.0.0/16

    (config)# route-map SET_ORIGIN_IN permit 10

    (config-route-map)# match ip address prefix-list INT_IN_1

    (config-route-map)# set origin incomplete

    (config-route-map)# exit

    (config)# route-map SET_ORIGIN_IN permit 20

    (config-route-map)# exit

    宛先ネットワークが172.20.0.0/16の場合,ORIGIN属性にINCOMPLETEを設定します。

  4. (config)# ip prefix-list INT_IN_2 seq 10 permit 172.30.0.0/16

    (config)# route-map SET_MED_IN permit 10

    (config-route-map)# match ip address prefix-list INT_IN_2

    (config-route-map)# set metric 100

    (config-route-map)# exit

    (config)# route-map SET_MED_IN permit 20

    (config-route-map)# exit

    宛先ネットワークが172.30.0.0/16の場合,MED属性値に100を設定します。