Configuration Guide Vol. 3


13.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 and specifying the conditions and settings.

Command examples

  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

    Sets 120 in the LOCAL_PREF attribute when the destination network is 10.10.0.0/16.

  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

    Adds one AS array count to AS array when the end of AS array with the AS_PATH attribute is 65529.

    You do.

  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

    Sets INCOMPLETE in the ORIGIN attribute when the destination network is 172.20.0.0/16.

  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

    Sets 100 in the MED attribute when the destination network is 172.30.0.0/16.