Configuration Guide Vol. 3


29.2.6 Configuring learned route filters

Points to note

The example below shows how to set the priority of learned BGP4+ routes by using route-map filters and specifying the conditions and settings.

Command examples

  1. (config)# ipv6 prefix-list EXT_IN seq 10 permit 3ffe:10: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

    Sets 120 in the LOCAL_PREF attribute when the destination network is 3ffe:10:10::/64.

  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

    Prepends one AS to the AS array when the end of the AS array of the AS_PATH attribute is 65529.

  3. (config)# ipv6 prefix-list INT_IN_1 seq 10 permit 3ffe:172: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

    Sets INCOMPLETE in the ORIGIN attribute when the destination network is 3ffe:172:20::/64.

  4. (config)# ipv6 prefix-list INT_IN_2 seq 10 permit 3ffe:172: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

    Sets 100 in the MED attribute when the destination network is 3ffe:172:30::/64.