BGP Route-Map

Answered Question
Jan 8th, 2009
User Badges:

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,



Correct Answer by Edison Ortiz about 8 years 6 months ago

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


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Edison Ortiz Thu, 01/08/2009 - 15:11
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

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.

Jesse Hottle Thu, 01/08/2009 - 15:15
User Badges:

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.

Edison Ortiz Thu, 01/08/2009 - 15:19
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

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.

Jesse Hottle Thu, 01/08/2009 - 15:26
User Badges:

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.

Correct Answer
Edison Ortiz Thu, 01/08/2009 - 15:43
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

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


Jesse Hottle Thu, 01/08/2009 - 16:06
User Badges:

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.

Jesse Hottle Fri, 01/09/2009 - 11:04
User Badges:

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

Edison Ortiz Fri, 01/09/2009 - 16:27
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

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


__


Edison.

Jesse Hottle Fri, 01/09/2009 - 17:06
User Badges:

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.



Attachment: 
Edison Ortiz Fri, 01/09/2009 - 21:23
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

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.

Jesse Hottle Mon, 01/12/2009 - 12:17
User Badges:

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?

Edison Ortiz Mon, 01/12/2009 - 12:25
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

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.



Jesse Hottle Mon, 01/12/2009 - 12:31
User Badges:

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.

Edison Ortiz Mon, 01/12/2009 - 12:47
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

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.


maahiraahi Sat, 01/10/2009 - 03:22
User Badges:

how can he receive static routes from isp ? is it published in some branch office locations ?


I faced the same problem and resolved. the problem was my edge router was not learing routes from IGP. resolved by putting routes to words edge router from the lan core swith.



Jesse Hottle Mon, 01/12/2009 - 13:04
User Badges:

I am not receiving static from the ISP any longer. This is why we went to BGP because we are peering with another ISP for redundancy and load-sharing.


Just to clarify, everything is working. I am just unable to reach one of the connected routes. I have a /30 between my core and dist routers. My bgp peer can see the /30 as advertised when I add the "redistribute connected" command but they only advertise /24 and higher. Even if I remove the "redistribute connected" command and specify the full /24 from this subnetted range, it is still not advertised at all and therefore not reachable.

Jesse Hottle Mon, 01/12/2009 - 22:02
User Badges:

I have noticed that when I use the redistribute static command based on my route-map, all the static routes are brought to my "sh ip bgp" but they are show as "incomplete". Should they not show as internal paths? Any way I can fix this.


Everything is working as is.

Actions

This Discussion