Using local-pref for specific subnets

Unanswered Question
Sep 19th, 2010

My network is dual-homed to different providers, but one of the provider links is constantly running close to max bandwidth during peak working hours. Prior to upgrading bandwidth or making other changes, I would like to use local-pref to push a specific subnet to the under-utilized link. Can anyone provide examples of how this is typically done?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
milan.kulik Sun, 09/19/2010 - 09:18


you can use:

router bgp xxx

neighbor your_nei route-map change_locpref in

route-map  change_locpref permit 10

match ip address prefix-list to_move
set local-preference 50

route-map  change_locpref permit 20

ip prefix-list to_move seq 5 permit a.b.c.d/length

Where your_nei is the neighbor connected through the overloaded line.

Of course you can use

match as-path ...

instead of

match   ip address ...

if more comfortable for you.



rsamuel37 Mon, 09/27/2010 - 06:54

Let me clarify my question a little more...the subnet I'd like to direct to our second Internet provider is really just one address that all of our guest wireless traffic is NAT'd to. So, instead of a /24 that I want to only go to that specific provider, it's a /32. Would I still be able to use the same approach? I don't think that the provider would accept the /32 would they?

milan.kulik Mon, 09/27/2010 - 08:27


ah, so far I thought you had asked for an outgoing traffic modification.

As it has no sense to use local preference to modify incoming traffic behaviour.

You can use other tools to change the way your neighbors prefer the subnets advertised from your AS:

As-prepending, communities agreed with your neighbor, etc.

But definitely advertising /32 is not the best practice.

It will be probably either dropped or summarized within the Internet very soon.




This Discussion