03-26-2021 06:59 PM
Hello Guys,
Here is the design and the objective:-
We have R1,R2 and R3 all connected via a core switch and from R3-R1 there is iBGP and from R3 to R2 there is iBGP too, now from LAN side the traffic goes to R3 always via VRRP. R2 and R1 both have an eBGP to a backbone MPLS.
For simplicity lets say R1 and R2 only knows a total of 4 subnets learnt and they will advertise that into iBGP, now when traffic go to R3 we need to make R1 primary and R2 secondary,the challenge is:- We need to have one of those 4 subnets to be preferred from R2 instead of R1 , so when R3 wants to go to that subney , it uses backup instead of primary.
Any thoughts?
If you have can you share the config.
I tried using local pref for that specific prefix on backup router to be higher than primary router for R3 but it ended up changing all the prefixes advertised from backup to R3 being all higher :S
Can someone help ? Thanks
03-26-2021 07:05 PM
Lets say all LAN can communicate to those 4 subnets, when traffic comes from LAN to R3, R3 needs to prefer all 4 to go to primary R1 except one subnet to be preferred via backup, we need simple solution if possible, I already know complex ones.
Much thanks
03-26-2021 07:27 PM - edited 03-27-2021 05:10 AM
without see the topology it is difficult to find solution,
R1,2,3 all connect to Core SW? I think this is wrong only R3 connect to Core SW and R3 connect to R1 and R2.
R1 have eBGP to ISP1
R2 have eBGP to ISP2
we need to make load share for both ISP
first R1 and R2 must advertise the same 4 subnet via iBGP to R3.
R3 have 4 subnet with two path via R1 and R2
since we have only one Router "R3" use weight not LP to load share.
*Toward R1
route-map UPDATES-1 permit 10
match ip address 1
set weight 100
route-map UPDATES-1 permit 20
match ip address 2
*Toward R2
route-map UPDATES-2 permit 10
match ip address 1
route-map UPDATES-2 permit 20
match ip address 2
set weight 100
03-27-2021 01:48 PM
Thanks, we won't need any load sharing but thanks for your efforts man , cheers !
03-27-2021 03:00 PM
this is load sharing since you make traffic for specific subnet via ISP1 and other traffic for ISP2.
for why the prefix not work
remove the deny 0.0.0.0/0 from the match prefix list since the route-map 20 have already for all not match prefix, remove this and try again.
03-27-2021 03:01 PM
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13762-40.html
please see these example for BGP load.
03-26-2021 08:25 PM - edited 03-26-2021 08:26 PM
Hi Dawoud,
> I tried using local pref for that specific prefix on backup router to be higher than primary router for R3 but it ended up
> changing all the prefixes advertised from backup to R3 being all higher :S
It is possible to set the local preference only for that one subnet. Can you please share the configuration you used on the backup router to set the local preference?
Regards,
03-27-2021 01:57 PM
Hi Harold,
Here you go , the local preference set for all routes from the other primary router are marked with 200 local preference.
route-map BACKUPROUTESOUT permit 10
match ip address DCMOVE
set local-preference 210
route-map BACKUPROUTESOUT permit 20
set local-preference 150
R2#sh ip prefix-list
ip prefix-list DCMOVE: 2 entries
seq 5 permit 4.4.4.4/32
seq 20 deny 0.0.0.0/0 le 32
03-27-2021 01:57 PM
neighbor 57.7.7.2 route-map BACKUPROUTESOUT in
03-27-2021 02:20 PM
I tried standard ACL to match and it worked, not sure what is wrong with my prefix list , can you illustrate?
03-27-2021 04:15 AM
Hello Mahmoud,
>> I tried using local pref for that specific prefix on backup router to be higher than primary router for R3 but it ended up changing all the prefixes advertised from backup to R3 being all higher :S
you have likely used a command like
neighbor y.y.y.y local-preference 200
Instead you need to use a route-map to be able to be selective in LP increase as suggested by Harold.
ip prefix-list TEST permit 10.10.30.0/24
route-map SEL-LP-RISE permit 10
match address prefix TEST
set local-preference 200
! final empty route-map clause to accept all other prefixes with no changes
route-map SEL-LP-RISE permit 20
router bgp <myAS>
neighbor y.y.y.y route-map SEL-LP-RISE in
You may need to clear the BGP session to see the effect.
Hope to help
Giuseppe
03-27-2021 01:58 PM
Hi Giuseppe,
route-map BACKUPROUTESOUT permit 10
match ip address DCMOVE
set local-preference 210
route-map BACKUPROUTESOUT permit 20
set local-preference 150
R2#sh ip prefix-list
ip prefix-list DCMOVE: 2 entries
seq 5 permit 4.4.4.4/32
seq 20 deny 0.0.0.0/0 le 32
neighbor 57.7.7.2 route-map BACKUPROUTESOUT in
03-27-2021 02:30 PM
I tried standard ACL to match and it worked, not sure what is wrong with my prefix list , can you illustrate?
03-29-2021 02:21 AM
Hello Dawood,
as explained by Paul Driver in order to match a prefix-list you need to use
route-map BACKUPROUTESOUT permit 10
match ip address prefix DCMOVE
set local-preference 210
route-map BACKUPROUTESOUT permit 20
set local-preference 150
So your previous config didn't work because it was looking for a named ACL with name DCMOVE and not for the prefix-list.
Likely all prefixes had matched the last clause.
When using a standard ACL you have solved for this reason.
Hope to help
Giuseppe
03-27-2021 02:59 PM
Hello
@MahmoudDawoud0323 wrote:
Hello Guys,
Here is the design and the objective:-
We have R1,R2 and R3 all connected via a core switch and from R3-R1 there is iBGP and from R3 to R2 there is iBGP too,
What about an ibgp peering between R2-R3? You have no mention of route reflectors so then IBGP would require a full mesh peering.
Can you post the topology of this network and if possible the run config all all 3 rtrs into a file and attach to your post.
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