So, if I have a site that has 2 (or more) internet connections, with a routable IP subnet that I own, and one ISP goes down, how do I tell the rest of the world to send traffic addressed to my network through ISP B instead of ISP A? This is in relation to a high-availability type setup. I'm pretty sure it involves BGP, but I don't know how to implement it.
-
2have you already requested an ASN for your company? – Mike Pennington Sep 11 '13 at 16:03
-
1@MikePennington I have not. – MDMoore313 Sep 11 '13 at 18:05
1 Answers
Multihoming is normally done with BGP by announcing your ASN (Autonomous System number) & Prefixes ("Network/Subnet") to both of your ISPs. This mean that you have to have your own ASN and valid Public ip address space)
You Peer in BGP with both ISPs, they re-announce your ASN & Prefixes upstream of them so any traffic for your network is directed through them depending on BGP policies (AS-Path, etc).
Now, if you plan on announcing your ASN yourself, be sure to have GOOD LINKS (DSL will cause you problems if it flaps - BGP is treating flapping/unstable route as BAD and will drop them until they're stable for a while).
The FUN of BGP is that you can control how traffic comes in and out.
With AS-Path Prepending you can make some links "worse" than others (even if they're much greater than speed) as the AS-PATH length is what's first looked at when deciding which route is the best. This can be done on a prefix-by prefix basis.
With Local-Preference and Route-Maps, you can decide which ISP to use for your egress traffic and for any flows you want (basically, you manipulate routes matching some conditions before accepting them in your own routing table).
- 7,104
- 6
- 32
- 66
- 2,184
- 12
- 13
-
1Nice! So, how would I use this in a failover scenario? Would my BGP router detect a bad link and automatically broadcast my ASP & Prefixes to the 2nd (or Nth) ISP? – MDMoore313 Sep 11 '13 at 19:40
-
1Well, since you peer with both of your ISP at the same time, they BOTH send your ASN to their upstream.
Various clients on the net will take the shortest route to your network
As each BGP Hops adds their ASN to the AS-PATH when sending routes to others. The more ASN in the AS-PATH, the "further" that particular destination "seems" to others upstream and is something you can manipulate (AS-Path Prepending).
Take a look at this, a small BGP Primer: http://www.pacnog.org/pacnog1/day4/b0-1up.pdf
– Remi Letourneau Sep 11 '13 at 19:55 -
More "Meat" and more complete.
http://www.cs.fsu.edu/~xyuan/cis6930/APRICOT2004-BGP00.pdf
– Remi Letourneau Sep 11 '13 at 20:02