Install guide
Software Version 2.7.4 47
Software Version 2.7.4
C613-10444-00 REV A
BGP: Enhancements to Prefix Filtering
This enhancement changes the method of configuring prefix filters on BGP
peers. BGP can now use prefix lists to define the filter.
Prefix filtering rejects some of the routes from an update message, without
rejecting the whole update. This enables you to configure the router or switch
to accept only routes for particular networks from a particular peer, and to
send only routes for particular networks to a particular peer.
To create a prefix list, use the command
add ip prefixlist=name entry=1..65535
[action={match|nomatch}] [masklength=range] [prefix=ipadd]
See the Border Gateway Protocol version 4 (BGP-4) chapter of your router or
switch’s Software Reference for more information about prefix lists.
Then apply the filter to a BGP peer or peer template definition, using one of the
commands:
add bgp peer=ipadd remoteas=asn [infilter=prefixlist-name]
[outfilter=prefixlist-name] [other-options]
set bgp peer=ipadd [infilter=prefixlist-name]
[outfilter=prefixlist-name] [other-options]
add bgp peertemplate=1..30 [infilter=prefixlist-name]
[outfilter=prefixlist-name] [other-options]
set bgp peeertemplate=1..30 [infilter=prefixlist-name]
[outfilter=prefixlist-name] [other-options]
The infilter parameter uses the prefix list to filter update messages that the
router or switch receives from the peer. If a prefix matches a prefix in the prefix
list, BGP rejects that route. Otherwise, it accepts the route.
The outfilter parameter uses the prefix list to filter update messages that the
router or switch sends to the peer. If a prefix matches a prefix in the prefix list,
BGP removes that route from the update message. Otherwise, it leaves the
route in the update message and therefore advertises it to the peer.
You can continue to use IP filters as prefix filters. However, if you give a prefix
list a name that matches an existing IP filter, BGP uses the prefix list.
Example To create a peer relationship on the local router or switch, with a peer that has
the IP address 192.168.1.1 and is part of AS 1, and prevent the local router or
switch from advertising routes from the 10.0.0.0/8 network, use the
commands:
add ip prefixlist=10_network entry=1 action=match
prefix=10.0.0.0/8
add bgp peer=192.168.1.1 remotas=1 outfilter=10_network