08-30-2024 07:21 AM - edited 09-02-2024 09:09 AM
Hi All,
I'm trying to balance our 4 Subnets over 2 ISP's using BGP
My situation: we have 4 Public v4 Subnets lets call them (not my real IP's)
NET1: 200.0.1.0/24
NET2: 200.0.2.0/24
NET3: 200.0.3.0/24
NET4: 200.0.4.0/24
I want NET1 and NET2 to use ISP1
I want NET3 and NET4 to use ISP2
With fallback if any of the ISP Links fail.
By default ISP1 has the shortest path to the internet.
So far I was able to use AS-path prepending to influence NET3 and NET4 inbound traffic from Internet to use ISP2
However the outbound traffic is still using ISP1.
I've set Local-Preference in the route-map however testing with trace-route still shows traffic from NET3 and NET4 using ISP1 outbound
Using a Trace-route server in the cloud I see NET3 and NET4 using ISP2 as intended.
Current Config
ip prefix-list NET1 seq 10 permit 200.0.1.0/24
ip prefix-list NET2 seq 10 permit 200.0.2.0/24
ip prefix-list NET3 seq 10 permit 200.0.3.0/24
ip prefix-list NET4 seq 10 permit 200.0.4.0/24
----------Route Map Out--------------
route-map ISP1 permit 10
match ip address prefix-list NET1
set metric 200
route-map ISP1 permit 20
match ip address prefix-list NET2
set metric 200
route-map ISP1 permit 30
match ip address prefix-list NET3
set as-path prepend MY*ASN MY*ASN MY*ASN
set metric 100
route-map ISP1 permit 40
match ip address prefix-list NET4
set as-path prepend MY*ASN MY*ASN MY*ASN
set metric 100
route-map ISP2 permit 10
match ip address prefix-list NET1
set metric 100
route-map ISP2 permit 20
match ip address prefix-list NET2
set metric 100
route-map ISP2 permit 30
match ip address prefix-list NET3
set metric 200
route-map ISP2 permit 40
match ip address prefix-list NET4
set metric 200
----------Route-Map-IN--------------
route-map ISP1-IN permit 10
match ip address prefix-list NET1
set local-pref 200
route-map ISP1-IN permit 20
match ip address prefix-list NET2
set local-pref 200
route-map ISP1-IN permit 30
match ip address prefix-list NET3
set local-pref 50
route-map ISP1-IN permit 40
match ip address prefix-list NET4
set local-pref 50
route-map ISP2-IN permit 10
match ip address prefix-list NET1
set local-pref 100
route-map ISP2-IN permit 20
match ip address prefix-list NET2
set local-pref 100
route-map ISP2-IN permit 30
match ip address prefix-list NET3
set local-pref 200
route-map ISP2-IN permit 40
match ip address prefix-list NET4
set local-pref 200
router bgp MY*ASN
<snip>
address-family ipv4
neighbor ISP1 route-map ISP1-IN in
neighbor ISP1 route-map ISP1 OUT
neighbor ISP2 route-map ISP2 out
neighbor ISP2 route-map ISP2-IN in
Any help would be appreciated.
Solved! Go to Solution.
08-30-2024 02:05 PM
If that So you need to use PBR.
Match ACL
Ser next-hop ISP1 or ISP2
MHM
08-30-2024 07:26 AM
Friends you need to use
MED or as-prep
Since these prefix is advertised by your router
LP not work for this case
MHM
08-30-2024 07:54 AM
Thanks for your advice.
In this case where would i apply the MED? in the route map IN or OUT? to which ISP?
08-30-2024 07:55 AM - edited 08-30-2024 11:57 AM
I prefer as-prep
And the direction of route-map is OUT
MHM
08-30-2024 01:27 PM
@MHM Cisco World wrote:
I prefer as-prep
And the direction of route-map is OUT
MHM
This would be okay to influence wan traffic ingress towards OPs rtr, however my understanding the OP needs to traffic engineer outbound traffic based on certain received routes from ISPs as such Weight or LP would be apllicable applied INbound
08-30-2024 01:35 PM
our 4 Subnets <<- I use this as reference' maybe he can confirm if this prefix advertise or receive from router
MHM
08-30-2024 01:54 PM
Hi, The 4 subnets that I mention we Advertise from our ASN.
08-30-2024 02:06 PM
Hello
@Cars J wrote:
Hi, The 4 subnets that I mention we Advertise from our ASN.
Well then @MHM Cisco World is correct - AS-path prepend applied Outbound is applicable, so apologies @MHM Cisco World I misunderstood the OP requiements
08-30-2024 02:09 PM
Friend he more clarify his request check below his reply and my suggestion
Thanks
MHM
08-30-2024 02:01 PM
Hi, We Indeed need to traffic engineer Outbound traffic (to the internet), but not based on received routes. Instead we need to engineer them based on "source" IP subnet.
For Example I want subnet 200.0.3.0/24 and 200.0.4.0/24 to exit to ISP2. the same path as they are already coming IN.
Thank You.
08-30-2024 02:05 PM
If that So you need to use PBR.
Match ACL
Ser next-hop ISP1 or ISP2
MHM
08-30-2024 01:47 PM - edited 08-30-2024 02:14 PM
Edited -
Now not applicable - misunderstood OP requirements
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