Route Selection into your AS with multiple ISP's

Answered Question
Nov 23rd, 2007

If you have multiple connections to the internet with multiple ISP's (ISP1 10mb, ISP2 T1, ISP3 T1) which BGP metric would you use to advertise to all internet bgp routers the path with the most bandwidth? I know you can set the MED but doesnt that only advertise to the neighbor AS? In this case the 3 ISP are all in different AS's and I dont think MED would be the right one. Anybody have any suggestions?

I have this problem too.
0 votes
Correct Answer by milan.kulik about 9 years 2 weeks ago

Hi,

ask your provider a question if he is permitting you to prepend your AS#.

Sometimes ISPs apply as-path lists which allow your AS# only once ocuuring.

BR,

Milan

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
royalblues Fri, 11/23/2007 - 13:20

You need to use AS path Prepending for route selection into your AS

eg

route-map preferred permit 10

set as-path prepend

router BGP

neighbor remote-as

neighbor route-map preferred

you can also include an access-list or prefix-list in the route map pointing to specific subnets

It is quite possible that even after prepending, the return path is preferable via a particular ISP as it totally depends upon the ISP's connection to the NAP

HTH

Narayan

thefindjack Fri, 11/23/2007 - 13:45

I have tried prepending the routes for the two slower ISP's and it worked succesfully on 1 ISP but when I prepended the route of the other it would not populate BGP routes anymore. (I have two different internet AS's so I can check what is happening in the routing tables of my other AS internet bgp router). I saw the one I prepended working correctly but the other one as soon as I added the prepend it stopped populating routes. Could this be the ISP? or something else?

royalblues Fri, 11/23/2007 - 13:52

Yes it could be.

How many times you prepended your AS? Sometimes ISPs do filter based on the AS length but it is very rare

can you post the configuration btw

Narayan

thefindjack Fri, 11/23/2007 - 14:12

I only prepended it once....here is a look at what Im doing without posting too much info.

Router 1 (HSRP Primary)

router bgp 1234

no synchronization

bgp log-neighbor-changes

network z.z.z.z mask 255.255.255.0

network v.v.v.v mask 255.255.255.0

network n.n.n.n mask 255.255.255.0

neighbor x.x.x.x remote-as 1234 <---Secondary Router

neighbor 1.1.1.1 remote-as 1111

neighbor 1.1.1.1 soft-reconfiguration inbound

neighbor 1.1.1.1 filter-list 1 out

neighbor 2.2.2.2 remote-as 2222

neighbor 2.2.2.2 soft-reconfiguration inbound

neighbor 2.2.2.2 route-map SETASPATH out

neighbor 2.2.2.2 filter-list 1 out

no auto-summary

route-map SETASPATH permit 10

set as-path prepend 1234

ip as-path access-list 1 permit ^$

Router 2 (HSRP Secondary)

router bgp 1234

no synchronization

bgp log-neighbor-changes

network z.z.z.z mask 255.255.255.0

network v.v.v.v mask 255.255.255.0

network n.n.n.n mask 255.255.255.0

neighbor x.x.x.x remote-as 1234 <---Primary Router

neighbor 3.3.3.3 remote-as 3333

neighbor 3.3.3.3 soft-reconfiguration inbound

neighbor 3.3.3.3 route-map SETASPATH out

neighbor 3.3.3.3 filter-list 1 out

no auto-summary

route-map SETASPATH permit 10

set as-path prepend 1234

ip as-path access-list 1 permit ^$

The secondary router prepended and populated the routes correctly to the internet but the primary router did not advertise the prepended route to the internet after I implemented this. ***UPDATED*** To be more clear it only advertised the route the was not prepended and the other route was removed from other bgp internet routing tables.

royalblues Fri, 11/23/2007 - 14:20

you should be prepending your own AS i.e AS 1234 and not the remote neighbor AS.

HTH

Narayan

thefindjack Fri, 11/23/2007 - 14:22

that was just a typo on my part...i am prepending my own AS number.

royalblues Fri, 11/23/2007 - 14:27

Can you use a match statement and prepend only your local subnets and not others?

network topology would be helpful

Narayan

thefindjack Fri, 11/23/2007 - 14:36

I just want to prepend the route so ISP 1 is used to come into our AS. I have a default route already to use ISP 1 for all internal routes...that works fine for uploads. But when I download the traffic is coming in the other ISPs. This is why I was tryin to prepend the routes...

Correct Answer
milan.kulik Mon, 11/26/2007 - 03:03

Hi,

ask your provider a question if he is permitting you to prepend your AS#.

Sometimes ISPs apply as-path lists which allow your AS# only once ocuuring.

BR,

Milan

thefindjack Mon, 11/26/2007 - 06:27

I called...that was the issue, I knew I was doing all the configuration correctly. Thanks for the tip.

Actions

This Discussion