cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
505
Views
2
Helpful
11
Replies

eBGP local-pref not working

Cars J
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

If that So you need to use PBR.

Match ACL

Ser next-hop ISP1 or ISP2 

MHM

View solution in original post

11 Replies 11

Friends you need to use 

MED or as-prep

Since these prefix is advertised by your router 

LP not work for this case 

MHM

Thanks for your advice.

In this case where would i apply the MED? in the route map IN or OUT? to which ISP?

 

I prefer as-prep

And the direction of route-map is OUT

MHM


@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


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

our 4 Subnets <<- I use this as reference' maybe he can confirm if this prefix advertise or receive from router 

MHM

Hi, The 4 subnets that I mention we Advertise from our ASN.

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


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Friend he more clarify his request check below his reply and my suggestion 

Thanks 

MHM

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.

If that So you need to use PBR.

Match ACL

Ser next-hop ISP1 or ISP2 

MHM

Edited -
Now not applicable - misunderstood OP requirements


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Review Cisco Networking for a $25 gift card