i want to ask about an issue that im facing from :
i have the topology below :
we have R1 & R2 as gateway routers an working bgp protocol with diffrent two independent isps
no ibgp between R1 & R2
R3 IS the lan route that has the cutomers networks
now have a look about the topology
on R1 im advertising the entire subnet 1.2.3/22 to isp1
on R2 only im advertising the subnet 126.96.36.199/24 which is part of 188.8.131.52/22 to isp2
there is a policy based routing on R1 as follow :
PBR ON R1 :
if the src ip from 184.108.40.206/27 ==>send it R2 then isp2
otherwise ==> send it to isp1
as u see , if the src ip on R3 was 220.127.116.11 then the upload direction will be from isp2 , otherwise , the upload direction will be from isp1
if the src ip on R3 was 18.104.22.168 . then the upload direction will be from isp1
note that the advertising was done by defualt Path attributes in both R1 & R2
now ive discussed the topology and i will begin discuss the poblems :
problem 1 :
im fond of the subnet of
so that the upload and the download to be from isp2 , but the problem is ===> the upload is from isp2 but the download is from isp1
so how to solve this problem ??
actually i thought with alot of solutions :
a - to part the subnet of 22.214.171.124/22 into many subnets parts and ignore advertising the subnet of 126.96.36.199/27 from R1 too isp1 and by this i will solve the problem of the download direction .
but in the same time , i found that parting the subet 188.8.131.52/22 with alot of subnets will annoy my bgp table and will have alot of individual subnets and may cause an errors , so i began to think that :
on R1 i will still advertsie the entire /22 subnet but i want to play with PA , so that the PA of /27 subnet that will be advertised on R2 will be better than the subnet /22 that will be advertised on R1 ,
so agian , does my opinion is good ??
and what path attributes i can play with to achive my goal ??
does using path attribute of set as prepend can solve the problem ?? i mean i will set prepend to the subnet /22 with my ASN many times ,and as a result the /27 will be better than /22 because it has lowe ASN path .
does set metric is applicable ?
plz advice about the best solution to achive my goal with less configs because im facing production networks with heavy internet traffic and dont want any msikates
i will discuss the other problesm after solving the 1st problem
i performed a PA on R1 about the subnet /22
i createda route map and set as path prepend x x x x x x x
but the same issue , the downlink is still from isp1 ,
i typed set origin undeermined but the same issue , the downlink is still from isp1 !!!!!!
here is my config :
route-map zzzzL, permit, sequence 20
ip address prefix-lists: newsubnet
as-path prepend xxxx5 xxxx5 xxxx5 xxxx5 xxxx5 xxxx5 xxxx5
Policy routing matches: 0 packets, 0 bytes
the config was done oN R1 and still facing the same problem
If I understand this your situation properly, you may be facing Asymmetric routing issue, for this is common in BGP, and you can only set it right, if you have agreement with your ISP to help you set their MED attribute value to favor you.