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


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

[設定のポイント]

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

[コマンドによる設定]

  1. (config)# ipv6 prefix-list EXT_IN seq 10 permit 2001:db8:10::/64

    (config)# route-map SET_LOCPREF_IN permit 10

    (config-route-map)# match ipv6 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

    宛先ネットワークが2001:db8:10::/64の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)# ipv6 prefix-list INT_IN_1 seq 10 permit 2001:db8:20::/64

    (config)# route-map SET_ORIGIN_IN permit 10

    (config-route-map)# match ipv6 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

    宛先ネットワークが2001:db8:20::/64の場合,ORIGIN属性にINCOMPLETEを設定します。

  4. (config)# ipv6 prefix-list INT_IN_2 seq 10 permit 2001:db8:30::/64

    (config)# route-map SET_MED_IN permit 10

    (config-route-map)# match ipv6 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

    宛先ネットワークが2001:db8:30::/64の場合,MED属性値に100を設定します。