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

question about BGP network command if we using route map !

Dr.X
Level 2
Level 2

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

Ryan Newell
Cisco Employee
Cisco Employee

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

Ryan Newell
Cisco Employee
Cisco Employee

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

"""

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

thanks for ur reply ,

regards

Review Cisco Networking for a $25 gift card