Install guide

Filtering IP Routes 2-27
Software Version 2.7.5
C613-10454-00 REV A
Applying AS path
lists
To apply an AS path list directly as a filter on a BGP peer, use one of the
commands:
add bgp peer=ipadd remoteas=asn [inpathfilter=1..99]
[outpathfilter=1..99] [other-options]
set bgp peer=ipadd [inpathfilter=1..99] [outpathfilter=1..99]
[other-options]
The outpathfilter parameter applies the AS path list as a filter on update
messages that the router or switch sends to the peer. The router or switch only
sends update messages if the update’s AS path attribute matches an entry that
has the action include. If a route matches an entry with the action exclude, the
router or switch does not advertise it to that peer. If an update message does
not match any entry in the AS path list, the router or switch does not advertise
it to that peer.
You can also use an AS path list in a route map and apply the route map.
Applying route maps To use the route map to filter or modify update messages that it sends to a peer,
use one of the commands:
add bgp peer=ipadd remoteas=asn outroutemap=routemap
[other-options]
set bgp peer=ipadd outroutemap=routemap [other-options]
The router or switch checks every route in the update message against every
entry in the filter, starting with the entry with the lowest entry number, until it
finds a match or gets to the end of the filter.
If your route map is intended to modify the community attribute of outgoing
update messages, you also need to enable the router or switch to set the
community attribute in messages to that peer. Use one of the commands:
add bgp peer=ipadd remoteas=asn outroutemap=routemap
sendcommunity=yes [other-options]
set bgp peer=ipadd outroutemap=routemap sendcommunity=yes
[other-options]
Filtering invalid when using OSPF to advertise routes
The design of the OSPF protocol does not allow you to filter LSAs before
advertising them. This is because OSPF shares LSAs between all the routers in
an area. The protocol assumes that all the routers in the area have shared all the
advertisements among each other, and that all agree on the state of the
complete link state database for the area. If some routers in the area are
learning, but not advertising, that breaks the OSPF model.
Therefore, once a route is in the LSA database, you have no control over
whether it is advertised.