cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
500
Views
0
Helpful
2
Replies
Highlighted

question about BGP network command if we using route map !

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

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

question about BGP network command if we using route map !

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

View solution in original post

2 REPLIES 2
Cisco Employee

question about BGP network command if we using route map !

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

View solution in original post

question about BGP network command if we using route map !

"""

The route-map applies policy control mechanism to the routes leaving or entering the BGP table."""""

thanks for ur reply ,

regards

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards