10-27-2012 05:20 AM - edited 03-07-2019 09:42 AM
hi ,
i would like to ask about somehthing in bgp ,
assume i want to adverstise a specified network , as we know , it must be exit in the routing table before we can add it into the bgp table ,
but i want to ask about , if we used a routemap to filter someprefix ,
my question is ,
does it mandatory to add the networks in the prefix list by the network command ???
have a look here :
=================================
router bgp 5555
no synchronization
bgp log-neighbor-changes
network m.m.16.0 mask 255.255.252.0
neighbor zz.zz.zz.zz remote-as 4444
neighbor zzzz.zzzz.zzz.zzz route-map bbb out
=========================================
as u see above , the network m.m.16.0 was matched by route map bbb and only the prefix which will be allowed ,
my question is ,
Q1
is it mandatory to type the command
network m.m.16.0 mask 255.255.252.0 under bgp
???????????????????
if yes , how is the behaviuor of bgp when a network exist in bgp and there is a route map will filter other networks except the netwok by netwrk command ???
regards
Solved! Go to Solution.
10-27-2012 05:48 AM
To answer your first question: To add networks to your local BGP table you can use the network command or redistribute from another protocol. This cannot be accomplished with a route-map on a neighbor statement. The route-map applies policy control mechanism to the routes leaving or entering the BGP table.
Second Question: There are BGP neighbor forwarding rules which dictate what routes are shared with who but that is a little off topic. In your example your neighbor is an eBGP neighbor. The router will attempt to share the best route in the BGP table for each prefix with neighbor zzz. After this list is compiled the router will exclude the prefixes that have been denied by route-map and permit prefixes that have been permitted by route-map.
In your example the route-map will prevent any routes learned from another BGP neighbor from being advertised or routes added to BGP via redistribution or network command from being advertised.
Regards,
Ryan
10-27-2012 05:48 AM
To answer your first question: To add networks to your local BGP table you can use the network command or redistribute from another protocol. This cannot be accomplished with a route-map on a neighbor statement. The route-map applies policy control mechanism to the routes leaving or entering the BGP table.
Second Question: There are BGP neighbor forwarding rules which dictate what routes are shared with who but that is a little off topic. In your example your neighbor is an eBGP neighbor. The router will attempt to share the best route in the BGP table for each prefix with neighbor zzz. After this list is compiled the router will exclude the prefixes that have been denied by route-map and permit prefixes that have been permitted by route-map.
In your example the route-map will prevent any routes learned from another BGP neighbor from being advertised or routes added to BGP via redistribution or network command from being advertised.
Regards,
Ryan
10-27-2012 05:55 AM
"""
The route-map applies policy control mechanism to the routes leaving or entering the BGP table."""""
thanks for ur reply ,
regards
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide