
How a Router's Missed Range Check Nearly Crashed the Internet - tmilewski
http://www.renesys.com/blog/2009/02/longer-is-not-better.shtml
======
YuriNiyazov
This might be a good post to ask this particular question: I am very
unfamiliar with the nuts and bolts of how the Internet _actually_ works. I
understand DNS resolution, ports, HTTP protocol - all of the higher-level
abstracted stuff that you need to know to program within the environment.
However - route-maps? BGP? ASN? Whatever else is under the hood that makes it
tick - no idea. What's a good book to learn all this stuff?

~~~
patrickg-zill
I will try to give you a quick recap, the books other have suggested are good.

Your connection to the Internet is probably single-homed, that is, one
connection going to one upstream provider. Simple enough to understand - "send
all packets not meant for the LAN to this address".

Consider that a large company, or a datacenter with hundreds to thousands of
servers, will have multiple connections to multiple providers, such as ATT,
Level3, Sprint, Cogent, etc.

BGP is the border gateway protocol - it lets you load sets of prefixes (eg.
207.89.0.0 if that range were all owned by one provider) and then given the
connections you have and what prefixes are connected to that connection, it
will try to use the least number of hops to get your traffic to the
destination.

ASN is autonomous system number - basically a "site location" that represents
an organization that has some number of IP addresses (represented by prefixes
as above).

You use the ASN in conjunction with the other information you give BGP, so
that you don't have to store ALL the routes for ALL the locations and compute
the path for each packet.

Big routers like the larger Ciscos have custom RAM chips and do most of the
routing in hardware, in order to be fast enough. They are called TCAMs :
[http://www.enterprisenetworkingplanet.com/nethub/article.php...](http://www.enterprisenetworkingplanet.com/nethub/article.php/3527301)

~~~
YuriNiyazov
Thank you for that. Now, let me ask you this: so, let's say we are talking
about that large datacenter with hundreds to thousands of servers. What are
the possible reasons for why you would have multiple providers as opposed to
just pumping everything through one?

Is it:

1) A provider might not have enough bandwidth available for your needs, so you
need to diversify?

2) You would get multiple providers so that you try to reach as many
destinations as possible directly? IOW, if I only have ATT, then in order to
get to destination X that's on Level3 there's an extra hop wherever the hell
ATT connects to Level3, and you also have Level3 yourself then the fastest
route to that is through the Level3 network?

3) All/None of the above/something else?

~~~
fhars
If you are large enough (say, you are a large national access or hosting
provider), there is no single, even larger "The Internet, Inc." upstream
provider you can use as your single link. You have to negotiate peering
agreements with the other large actors so that you have reliable and
affordable routes to all parts of the net. At this level you need things like
BGP to know where to send traffic for a destination outside of your own net,
because you could have several possible routes with different performance
and/or price.

Unlike most LANs wich are either physically or logically (via the spanning
tree protocol) structured like a tree, the core internet is a weighted graph.

------
carterschonwald
Interesting little fact, the BGP protocol and other bits related to
propagating routing information will not converge to an answer in general, but
will under certain conditions such as "no dispute wheel" (which can happen if
the routing distances don't satisfy a triangle inequality[by which I mean some
geometric notion of distance], though thats too strong an assumption about
routing choices to be reasonable).

