cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1332
Views
0
Helpful
6
Replies

bgp with hsrp - asymmetric routing problem

dariopalermo
Level 1
Level 1

Looking at the attached network diagram, when all links, routers and switches are up, R2 is the VLAN101 gateway and R3 is the VLAN102 gateway, but R1 chooses R2 as the destination for both routes.

We use OSPF to redistribute loopback addresses and BGP to redistribute the connected routes. Could I change the preference - on R3 - just for the connected route 172.16.2.0/24?

Applying a route map to the redistribute connected would set the preference for all the connected routes, no way to pick just that one I need to change actuallym right?

At this moment the network seems to work just fine, but we're having aymmetric routing on VLAN102.

1 Accepted Solution

Accepted Solutions

Yes it is and it is local only to the router you set it on so it is never passed to other routers.

So R1 is receiving advertisements from both R2 and R3 for 172.16.2.0/24 as they both have connected interfaces in that subnet.

On R1 you can apply a weight to a neighbor using a route map which allows you to do it on a per prefix basis.

So you simply increase the weight (higher is better) for that prefix received from R3.

Jon

View solution in original post

6 Replies 6

Jon Marshall
Hall of Fame
Hall of Fame

There's nothing actually wrong with asymmetric routing and with HSRP on one side but not the other it is quite common.

That said if you want to ensure R1 always sends to R3 for 172.16.2.0/24 you may be able to do it but it's not entirely clear what your setup is.

Are you running BGP between R1, R2, R3 so that R1 learns the subnets from R2 and R3 ?

Jon

I thought avoiding asymmetrical routing was the best choice for troubleshooting purposes.

 

Anyway, yes, I'm running BGP to distribute connected routes between R1, R2 and R3, using update-source with the loopback addresses that I'm distributing with OSPF.

I managed to force the best path using this config:

 

On both R2 and R3

access-list 99 permit any

route-map SET_LOCAL_PREF_150 permit 10
 match ip address 99
 set local-preference 150

 

On R2 (VLAN101 master)

router bgp 64512

network 172.30.201.0 mask 255.255.255.0 route-map SET_LOCAL_PREF_150

 

On R3 (VLAN102 master)

router bgp 64512

network 172.30.202.0 mask 255.255.255.0 route-map SET_LOCAL_PREF_150

 

If failover happens, the VLAN interface on the failed router goes down and the route is not advertised anymore, so the other router takes the VIP and his route is the best (and only) path.

 

In this way the only asymmetrical routing happens between VLAN101 and VLAN102 (and viceversa), but that I cannot change because I'm dealing with connected routes.

 

Okay I understand.

The alternative I was going to suggest was to set the weight on R1 for the specific prefix so it always uses R3 but your way is fine as well.

Glad you got it sorted.

Jon

I'm interested in your solution's details for learning purposes... Isn't weight a per neighbour setting? Still at the beginning of my BGP study ;) 

Yes it is and it is local only to the router you set it on so it is never passed to other routers.

So R1 is receiving advertisements from both R2 and R3 for 172.16.2.0/24 as they both have connected interfaces in that subnet.

On R1 you can apply a weight to a neighbor using a route map which allows you to do it on a per prefix basis.

So you simply increase the weight (higher is better) for that prefix received from R3.

Jon

Ok, I didn't know I could apply a route map also there. Thanks.

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: