12-23-2013 01:42 PM - edited 03-04-2019 09:55 PM
Please refer to the diagrama:
- Router R11, R12 are managed by service provider 1.
- Router R21, R22, R23 are managed by service provider 2.
- Router R31, R32 are managed by me (Sergio).
- Service provider 2 hasta an international MPLS link and a national MPLS Link.
- R22 has a BGP session with R32.
- R23 has a BGP session with R32.
- R12 hasta a BGP session with R31.
- R31, R32 and R33 run OSPF between them.
** - I want to load balance the traffic comming from Provider 2 National and send some through Provider 2 international (R32, R22, R21) and some through provider 1 international (R32, R31, R12, R11) using OSPF.
- I made a similar configuration in R33, so it receives the routes to 10.10.10.0/24 through OSPF, from R31 and R32, with the same metric and load balances it. That works ok.
- I tried to configure the same in R32 but I have the difficulty that one path is learned through BGP and the other through OSPF.
- I know that BGP cant load balance, so I need to introduce the routes learned in R32 from R22 using BGP into OSPF with the same metric that the ones learned through OSPF from R31.
- How can I make that configuration?
- I have tried to redistribute BGP into OSPF but the route that uses is always the ones from OSPF from R31 and not the one redistributed.
Solved! Go to Solution.
12-25-2013 11:20 AM
Hi,
ad) " I tried to configure the same in R32 but I have the difficulty that one path is learned through BGP and the other through OSPF."
I'm afraid you never get load balancing over two routes received from different routing protocols.
It has been discussed here recently, see
https://supportforums.cisco.com/message/4067147#4067147
Best regards,
Milan
12-23-2013 02:35 PM
Sergio,
Could you please post the configuration and an output of the routing table ? Have you verified that you are receiving via BGP both prefixes, check this out with show ip bgp neighbors
Thanks,
Jose.
12-23-2013 03:11 PM
Jose,
Thanks for your reply.
This is part of the configuration:
router bgp 64518
bgp log-neighbor-changes
neighbor WAN_IBM_CLARO_MEX peer-group
neighbor WAN_IBM_CLARO_MEX remote-as 65194
neighbor WAN_IBM_CLARO_MEX timers 10 30
neighbor WAN_IBM_CLARO_PER peer-group
neighbor WAN_IBM_CLARO_PER remote-as 64516
neighbor WAN_IBM_CLARO_PER timers 10 30
neighbor 10.231.4.164 peer-group WAN_IBM_CLARO_PER
neighbor 10.231.4.165 peer-group WAN_IBM_CLARO_MEX
neighbor 10.231.4.165 password 7 062B5BXXXXXXXXXXXXXXXXX
address-family ipv4
redistribute connected
redistribute static
redistribute ospf 10 match external 1 external 2 route-map ibm_ospf_to_bgp_ar
neighbor WAN_IBM_CLARO_MEX send-community both
neighbor WAN_IBM_CLARO_MEX soft-reconfiguration inbound
neighbor WAN_IBM_CLARO_MEX prefix-list scotiabank-claro-mex-out out
neighbor WAN_IBM_CLARO_PER send-community both
neighbor WAN_IBM_CLARO_PER soft-reconfiguration inbound
neighbor 10.231.4.164 activate
neighbor 10.231.4.165 activate
neighbor 10.231.4.165 route-map scotiabank-claro-mexico-in in
maximum-paths 2
exit-address-family
Actually, this routers is in production, so I made a simulation. Please, if you can, help me assuming this is the real ouput:
R4#show ip route 10.10.10.0
Routing entry for 10.10.10.0/24
Known via "ospf 10", distance 110, metric 20, type extern 2, forward metric 10
Redistributing via bgp 65001
Last update from 10.231.4.187 on FastEthernet0/1, 00:50:08 ago
Routing Descriptor Blocks:
* 10.231.4.187, from 10.10.20.1, 00:50:08 ago, via FastEthernet0/1
Route metric is 20, traffic share count is 1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
R4#show ip bgp neighbors 10.231.4.165 received-routes
BGP table version is 157, local router ID is 10.10.20.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
r>i10.10.10.0/24 10.231.4.165 0 64516 12252 ?
Total number of prefixes 1
Yes, I am running ebgp between my router and the CPEs managed by the service provider.
12-23-2013 03:42 PM
Sergio,
The reason why it is preferring the OSPF route and not the BGP one is because it is learned via iBGP which has a worse AD of 200 than OSPF of 110, and this is why you can see the RIB failure in the BGP table. However, you said that you are running eBGP, then, where is this iBGP session ?
You should make the routes received from other remote sites advertised by the CPE's of the Service Provider via BGP better than the ones received via the LAN via OSPF. Remember that the redistribution process works taking the routes from the RIB. You may change the AD to prefer the BGP ones in case you are receiving it via iBGP, but it would be better to have a clear and entire picture of the scenario. Also, I suppose you are applying filtering in order to advertise towards the CPE's via BGP the local prefixes of the site and not other ones from remote sites.
Hope this helps,
Jose.
12-23-2013 08:31 PM
Hi,
As Jose already pointed, that in BGP table the prefix which you are mentioning is learned from iBGP ( default AD 200 ) whereas same is learned from OSPF ( default AD 110 ), hence OSPF learned route is getting installed in the routing table.
Couple of points of concern is as you mentioned that you have eBGP with telco managed CPE, I suggest you relook your configs when simulation was done, as simulation output is clearly at oppsoite tanget with the provided configs of production.
Now coming to load balance between eBGP and OSPF. Assuming that you have no iBGP session in your network ( as if there are iBGP in your network, then it needs a deeper look, or else you might end up having loop in your network). The simplest thing you can do, is to change the OSPF AD to 20.
Regards,
Smitesh
PS: Please rate helpful posts.
12-25-2013 11:20 AM
Hi,
ad) " I tried to configure the same in R32 but I have the difficulty that one path is learned through BGP and the other through OSPF."
I'm afraid you never get load balancing over two routes received from different routing protocols.
It has been discussed here recently, see
https://supportforums.cisco.com/message/4067147#4067147
Best regards,
Milan
12-25-2013 07:47 PM
Ohh man, how forgetfull of me, that I forgot my own post ( link which Milan Kulik ) pointed...
Thanks Milan for pointing that out that even in case of making AD equal, load balancing between different protocols is not possible...
Regards,
Smitesh
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