Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

big_malk

macrumors 6502a
Original poster
Aug 7, 2005
557
1
Scotland
Ok, bit of a technical question, but I've never been able to find a decent answer to this and I'm really curious...

I know about the DNS system, IP addresses and the principles of packet switching and how those things work, at least the basic principles. I know when I submit this form it'll get broken into packets and sent to my ISP with an IP address to direct it to.

I assume uploads always go through one cable toward 'the cloud' when they pass through the local routers in my town. But, when it reaches 'the cloud', how do the backbone routers who which cable to send it down? I think there's at least 5 undersea cables connecting the UK to the internet, how does the router know 74.86.132.180 is down *that one*?

And when it reaches America (where I assume the MacRumors servers are?), there must be thousands of routes it could take from where the undersea cable lands to wherever the servers are. Each router in the internet can't possibly have a 'map' of the internet and all it's routers, can they?!

Also, a main design principle of the net is that if a packet gets lost en route, because of a broken cable or router perhaps, it gets resent and can take a different route. How do the routers not send the packet via the same route? Surely they can't keep track of every packet they send and check which way it was sent the last time?

If anyone can answer this or direct me to a decent source of this information I'd be very grateful :D
 

belvdr

macrumors 603
Aug 15, 2005
5,945
1,372
Mainly, it's the BGP dynamic routing protocol at work, since it is a cross platform capable protocol that can handle multiple links.

It has its own security issues, which has caused issues for sites such as YouTube.
 

Queso

Suspended
Mar 4, 2006
11,821
8
The backbone of the Internet is formed by the BGP tables redistributed between the tier 1 providers, companies such as AT&T, BT, etc. which are then further redistributed with the smaller tier 2 and 3 providers, ISPs etc. The "tiers" are defined as entities that happily share traffic amongst themselves (known as peering) without charging to do so. Two tier 1s will share traffic without one company having to pay the other, but a Tier 1 will charge a tier 2 and so on.

When we come to BGP itself it's a difficult concept to explain in layman's terms as it sits on top of other routing protocols and defines paths across the domains made up of those routing protocols. A domain is basically a group of routers that share their routing information over OSPF, EIGRP, IS-IS etc. These protocols are known as IGPs. In BGP instead of saying that a route is available via a particular IP address as with an IGP, it instead says it is available in this or that routing domain, and these are the other domains you need to go through to get there. BGP policies, communities etc. are then put in place to influence the path across the domains.

BGP tables hold all possible paths to a destination (unless filtered by an administrator), but only the paths that are defined as preferred are used. When a route disappears from a routing table within an IGP domain the BGP router that advertises it (normally at the boundary between the IGP and BGP) will stop doing so, meaning that the path will time out and an alternative path will become preferred for that destination within global BGP tables.

Obviously there's a lot more into it than that (BGP breaks down into iBGP and eBGP, with different behaviours, and there's a lot of aggregation and filtering that goes on), but people write entire books on this subject so I'm not going into more detail here. If you want to read more I find this O'Reilly book strikes a pretty good balance on how to deal with a very techie subject in an easy to read manner.

http://oreilly.com/catalog/9780596002541/preview
 

steve2112

macrumors 68040
Feb 20, 2009
3,023
6
East of Lyra, Northwest of Pegasus
Thanks guys :)

I'm choosing to believe it's the elves :p

That's probably the best bet. When I first got into networking, I was amazed any of it actually worked. Now that I am further along in my career, I am still amazed. I always tell people who gripe about slow web sites or email that if they knew what had to happen for them to even get to a website, they would be amazed.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.