recommendations for lowering bgp metric in public peering
I am wondering when configuring a public bgp peering and I have a subnet /23 that is split into 2x /24, how one can achieve best load balancing here.
For example the own AS is 12345 and I have two routers. The first should be preferred for the first /24 net and the second for the second /24. I would like to prepend the as-path e.g. on the first router for the second network to make it less attractive. When I prepend the path with a route-map and "set as-path prepend 12345" it works.
sh ip bgp:
*> 172.16.10.0 172.16.32.1 0 54321 12345 12345 ?
When I want to add another time the 12345 AS e.g. "set as-path prepend 12345 12345" then I receive a error message in the BGP update.
BGP(0): 172.16.32.1 rcv UPDATE about 172.16.10.0/24 -- DENIED due to: AS-PATH contains our own AS;
sh ip bgp:
does not show anything for that network
I am exhausted today and dont get it when doing it with two and it does not work. Any one knows this from pocket?
Thanks in advance!