Hacker News new | ask | show | jobs
by stephen_g 4326 days ago
Routers. Routers everywhere...

The internet is broken up into different networks, each one being an 'Atonomous System' (AS). These networks are all connected to other ASes at various interconnection points, such as an Internet Exchange (IX) or another point-of-presence (PoP). At these points, a router on the edge of one network is connected to a router on the edge of another.

These 'edge' or 'border' routers talk to each other with a protocol called BGP (Border Gateway Protocol). This lets them 'advertise' all the routes that you can reach through that router to other routers (like, "hey, you can get to 54.24.0.0/16 at cost x through me").

Internally, each AS will also use an internal routing protocol, such as Open Shortest Path First (OSPF) or iBGP (the internal version of Border Gateway Protocol) to internally advertise this information along with information about how to get between internal routers to work out where to go. So if you have a packet at your grandmother's house, it will hit the first router that her cable or DSL is connected to, use something like OSPF to work out the best (fastest) path through the network to a border router, and then from there the best (probably cheapest!) path to the destination based on the information it got from neighboring routers with BGP.

This is because there are two ways that ASes will interconnect - either peering, where you say "we'll let you send traffic into your network for free if we can send data into yours", and transit, where you actually pay. There may be two paths to get to your destination, and one might be shorter but more expensive in transit, so the cheaper path might get chosen, depending on the priorities of the ISP.

An undersea cable is usually internal to an AS. Typically though, it's not actually the whole cable, but one or more wavelengths through it - for example, some cables have up to ~128 different wavelengths (colours) of light going through them - each 1, 10, 40 or 100Gbps. So a cable operator usually doesn't actually handle any data transfer but just sell wavelengths to different providers. Each one usually has a separate laser and then they are all multiplexed by a piece of optical equipment into a fibre strand. This method of sending multiple wavelengths is called dense wavelength division multiplexing.

1 comments

This is fascinating. Thank you.