cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1189
Views
0
Helpful
17
Replies

BGP Route-Map

Jesse Hottle
Level 1
Level 1

Hello,

I am in the process of configuring a route-map with a prefix-list for the networks I wish to advertise with my bgp peer. Below is the initial configuration. I am using a 7206 router as the core, with another 7206 as my distribution router within our OSPF backbone network. Also, we are only set to get default-route from the upstream provider.

interface FastEthernet0/0

description Connection to Dist_Rtr_F5/0

ip address xxx.xxx.253.1 255.255.255.252

no ip redirects

no ip unreachables

duplex full

no cdp enable

!

interface FastEthernet5/0

description Connection to Downtown

ip address xxx.xxx.255.254 255.255.255.0

no ip redirects

no ip unreachables

duplex full

no cdp enable

!

interface FastEthernet6/0

description Connection to Host_Port

ip address xxx.xxx.55.86 255.255.255.252

no ip redirects

no ip unreachables

duplex full

no cdp enable

!

router bgp AS#

no synchronization

bgp log-neighbor-changes

redistribute connected

neighbor xxx.xxx.55.85 remote-as AS#

neighbor xxx.xxx.55.85 route-map EBGP_OUT out

no auto-summary

!

ip classless

ip route 0.0.0.0 0.0.0.0 xxx.xxx.55.85

ip route xxx.xxx.80.0 255.255.240.0 xxx.xxx.253.2

ip route xxx.xxx.240.0 255.255.248.0 xxx.xxx.253.2

ip route xxx.xxx.248.0 255.255.252.0 xxx.xxx.253.2

ip route xxx.xxx.252.0 255.255.255.0 xxx.xxx.253.2

ip route xxx.xxx.89.0 255.255.255.0 xxx.xxx.253.2

ip route xxx.xxx.121.0 255.255.255.0 xxx.xxx.253.2

no ip http server

!

!

!

ip prefix-list EBGP_ADVERTISE seq 10 permit xxx.xxx.89.0/24

ip prefix-list EBGP_ADVERTISE seq 20 permit xxx.xxx.121.0/24

ip prefix-list EBGP_ADVERTISE seq 30 permit xxx.xxx.80.0/20

ip prefix-list EBGP_ADVERTISE seq 40 permit xxx.xxx.240.0/21

ip prefix-list EBGP_ADVERTISE seq 50 permit xxx.xxx.248.0/22

ip prefix-list EBGP_ADVERTISE seq 60 permit xxx.xxx.252.0/23

no cdp run

!

route-map EBGP_OUT permit 10

match ip address prefix-list EBGP_ADVERTISE

I setup the route-map to use a prefix-list of the networks I wish to advertise to my upstream provider. These networks are then statically routed to our distribution router which is running OSPF to the backbone network.

When I do a sh ip bgp, my networks in the prefix-lists are not shown. Also, if I do a sh ip bgp route-map "name" or a sh ip bgp prefix-list "name", neither is showing up. Is there something I am missing here?

Thanks,

1 Accepted Solution

Accepted Solutions

Jesse,

If the remote BGP peer has the static routes , by sending those routes over BGP won't make the neighbor router choose the BGP routes as the BGP Administrative distance is higher than static routes.

You can verify the routes are making it to the neighbor with the show ip bgp command and once the verification is done, you can remove the static routes at the remote router and the remote router will use the BGP routes instead.

HTH,

__

Edison.

Please rate helpful posts

View solution in original post

17 Replies 17

Edison Ortiz
Hall of Fame
Hall of Fame

You need to bring those routes into BGP and then you can filter them with route-map.

Your current config, is bringing connected routes, not static routes and the route-map in the neighbor statement will filter those routes outbound.

Under the BGP process, if you do:

redistribute static route-map EBGP_OUT

You should have what you need.

HTH,

__

Edison.

Does it matter at this time that our bgp_peer is still statically routing these networks to us? Those have yet to me removed. If that is the case, do I need to change anything at all? This was the config they recommended.

Thanks for the reply.

Your router is reaching those networks via the static routes thus I'm not sure what you mean about "our bgp_peer is still statically routing these networks to us".

I mean, you wanted to advertise those networks over to the BGP neighbor from this device's perspective, correct?

If so, then you need to bring those routes into BGP unless another BGP router is already advertising those routes.

Well... we just setup the bgp_session today, and the bgp_peer is still statically routing those routes to us to our INET host port and are not being advertised via BGP, until those statics are removed from the upstream_peer. Does that make sense? I just want to make sure that when the bgp advertisments take over, that we dont lose any connectivity.

Jesse,

If the remote BGP peer has the static routes , by sending those routes over BGP won't make the neighbor router choose the BGP routes as the BGP Administrative distance is higher than static routes.

You can verify the routes are making it to the neighbor with the show ip bgp command and once the verification is done, you can remove the static routes at the remote router and the remote router will use the BGP routes instead.

HTH,

__

Edison.

Please rate helpful posts

I added the redistribute static command and now it shows the routes I have static routed to our distribution router when doing a show ip bgp command. I am going to play with this for awhile, but it looks good now.

Once our ISP removed the statics for these net_blocks everything should be good to go.

Thanks for the assistance.

whats the best approach to load balance traffic over both bgp sessions as well as providing redundancy in the event of a link failure?

Please supply a diagram depicting your network topology, else that's an open ended question...

__

Edison.

LOL. Good point.

I have attached a basic diagram depicting how are links are connected. We have two circuits to two different ISP's (10mb and 50mb circuits). I would like to be able to advertise some portions of our ip prefixs out the 50mb link and a small portion out the 10mb link to load-share. However, I also need to be able to have full redundancy in case of either link failure.

You will need to contact your ISPs and find out what BGP policies will be allowed in this kind of situation.

On a non-ISP topology, your task can be easily accomplished with 'as-path prepend'. If the ISPs allow you to prepend your BGP routes, then you can create a route-map matching the needed routes and set the appropriate as-path prepend out to one ISP to make it less preferred.

HTH,

__

Edison.

Hello,

When I specify the networks I want to advertise out, my route-map isnt needed or no longer works. Is this correct? Is there another way I should be doing this? I need to be able to use a route-map for some as-path prepends. Also, would it be easier to do some other internal routing to my distribution router other than static routes?

When I specify the networks I want to advertise out, my route-map isnt needed or no longer works. Is this correct?

You are using the route-map for the redistributing of static routes, right?

Is there another way I should be doing this?

What's wrong with the one is being done now?

I need to be able to use a route-map for some as-path prepends.

You can create a different route-map for the as-path prepend and remove the route-map from the outgoing advertising - keep it for the redistribute, though.

Also, would it be easier to do some other internal routing to my distribution router other than static routes?

Yes.

__

Edison.

i am currently running OSPF on our backbone network. Would it be better to also make an ospf connection from the interface on the core to the distribution router that is running the bgp process? This way I can remove the static routes altogether.

Also, one issue I am having is reaching the subnet I have assigned connecting the core to the distribution router. This subnet is a .30 but my BGP peer doesnt advertise anything smaller than a /24. I specificed this as a /24 prefix, but the bgp peer only sees this as a /30 still.

i am currently running OSPF on our backbone network. Would it be better to also make an ospf connection from the interface on the core to the distribution router that is running the bgp process? This way I can remove the static routes altogether.

Hard to say what's better without doing a full analysis of your network. I'm afraid this recommendation can't be done on a single post. You need someone to come onsite and make that recommendation for you.

Also, one issue I am having is reaching the subnet I have assigned connecting the core to the distribution router. This subnet is a .30 but my BGP peer doesnt advertise anything smaller than a /24. I specificed this as a /24 prefix, but the bgp peer only sees this as a /30 still.

Can you post the show ip bgp from both BGP peers and tell us the network you want to advertise?

You may also post the portion of the BGP config along with a show ip route and include that network in the output.

__

Edison.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card