Configuration Guide Vol. 3


13.2.8 Setting Learned Route Filtering Conditions

Points to note

The example below shows how to apply learned route filtering on a per-peer basis by specifying the filters to be applied in the neighbor in command.

Command examples

  1. (config)# router bgp 65531

    (config-router)# neighbor 172.16.2.2 route-map SET_LOCPREF_IN in

    Sets 120 in the LOCAL_PREF attribute of routes to the destination network 10.10.0.0/16 that were learned from the peer (remote peer address:

    172.16.2.2) and gives such routes higher precedence than routes learned from other peers.

  2. (config-router)# neighbor 10.2.2.2 route-map SET_ASPREPEND_IN in

    Prepends one AS in the AS array when the end of the AS array of the AS_PATH attribute learned from the peer (remote peer address:

    10.2.2.2) is 65529, and gives such routes lower precedence than routes learned from other peers.

  3. (config-router)# neighbor 10.1.2.2 route-map SET_ORIGIN_IN in

    Sets INCOMPLETE in the ORIGIN attribute of routes to the destination network 172.20.0.0/16 that were learned from the peer (remote peer address:

    10.1.2.2) and gives such routes lower precedence than routes learned from other peers.

  4. (config-router)# neighbor 192.168.2.2 route-map SET_MED_IN in

    The destination network learned from the peer (remote peer address: 192.168.2.2) is 172.30.0.0/16

    Sets 100 as MED of the route.