29.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
-
(config)# router bgp 65531
(config-router)# address-family ipv6
(config-router-af)# neighbor 3ffe:172:16:2::2 route-map SET_LOCPREF_IN in
Sets 120 in the LOCAL_PREF attribute of routes to the destination network 3ffe:10:10.::/64 that were learned from the peer (remote peer address: 3ffe:172:16:2::2) and gives such routes higher priority than routes learned from other peers.
-
(config-router-af)# neighbor 3ffe: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: 3ffe:10:2:2::2) is 65529, and gives such routes lower priority than routes learned from other peers.
-
(config-router-af)# neighbor 3ffe:10:1:2::2 route-map SET_ORIGIN_IN in
Sets INCOMPLETE in the ORIGIN attribute of routes to the destination network 3ffe:172:20:0::/64 that were learned from the peer (remote peer address: 3ffe:10:1:2::2) and gives such routes lower priority than routes learned from other peers.
-
(config-router-af)# neighbor 3ffe:192:168:2::2 route-map SET_MED_IN in
Sets 100 in the MED attribute of routes to the destination network 3ffe:172:30::/64 that were learned from the peer (remote peer address: 3ffe:192:168:2::2).