cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1405
Views
0
Helpful
5
Replies

bgp to 2 different isp's for internet

carl_townshend
Spotlight
Spotlight

Hi all

If I have 2 providers A and B, that both send me a default route

If I want to make sure inbound traffic comes to router A, do I just prepend my AS path to ISP B?

How reliable is this ? and would I just prepend it once ?

cheers

5 Replies 5

ajay chauhan
Level 7
Level 7

Yes if you advertising your network to both service providers. prepend will insure you get inbound on Router A. However there is no fixed rule how many times .3-4 times should be fine depends upon ISP peering.

how does this actually work? if im provider B, I gather that to get to my network once prepended I would have to go via provider A ? what if there was more paths going this way still? would it go direct from provider B still?

thats what I mean by, how reliable is it ?

Shortest AS path is always prefered so by doing prepend you make it longer.Hope this make sense.

carl_townshend wrote:

how does this actually work? if im provider B, I gather that to get to my network once prepended I would have to go via provider A ? what if there was more paths going this way still? would it go direct from provider B still?

thats what I mean by, how reliable is it ?

The reliability is solid.  It is dynamic which requires no manual intervention.

If provider B receives the announcement with a prepend, it will announce this upstream and all routers will hold this information in the BGP table.  Keep in mind that the best route is added to the routing table so the route to your site inbound will prefer provider A because that is the route that will be added to the routing table, which is the table used to route the traffic.  The BGP table will hold both announcements though so if you do a sh ip bgp on a looking glass you will see this in the BGP table with multiple entries, but the best announcement, least AS hops, etc... will be injected into the routing table.  You can see which one by finding the peer marked best in the output.

Rick Morris
Level 6
Level 6

carl_townshend wrote:

Hi all

If I have 2 providers A and B, that both send me a default route

If I want to make sure inbound traffic comes to router A, do I just prepend my AS path to ISP B?

How reliable is this ? and would I just prepend it once ?

cheers

Carl - is there a reason you are concerned with Asymmetric routing?  Does it matter if you go out one connection and back in another?

Inbound is a bit tricky in how you achieve this.  If you prepend your announcement then yes you will prefer one link inbound and will not get any routes on the connection being pre-pended.  If that is what you want then that will work.  Outbound you can do the same thing with local pref.  The higher the local pref the more preferred outbound.

      PE A   <------Inbound traffic preferred

     /

CE

     \

      PE B (AS 1234, 1234, 1234) <------Multiple pre-pends will not accept inbound traffic until PE A is down or least preferred for any other reason

      Local Pref 100 PE A  (outbound traffic not used unless pref is changed higher or PE B goes down

     /

CE

     \

      Local Pref 200 PE B ---------->   (outbound traffic preferred - higher pref)

So if you want to prefer one connection over the other for both inbound and outbound, change the local pref and pre-pend the announcement.

To prefer PE A do the following:

      Local Pref 200 PE A  <----------> Outbound and Inbound traffic preferred

     /

CE

     \

      PE B (AS 1234, 1234, 1234)