How the Internet Works

Follow the path from submarine fiber to an enterprise network, then see where BGP, IP addressing, and NAT fit.

Network Fundamentals ·

When I hear that a company has two internet providers, my first question is whether those connections take different physical paths. That question is a useful starting point for understanding how the internet works. I’ll follow the connection from the ocean floor to the enterprise edge, then show where addressing and translation come in.

Start with the submarine cables

Before I get into routing or IP addresses, I like to start with what physically connects one network to another. Even in the age of cloud computing, internet traffic between continents travels over fiber-optic cables laid across the ocean floor. The map below shows what those connections look like.

Figure 1 · Submarine cable map
Figure 1 · Submarine cable map

Multiple routes give a country more options if one cable fails. The same lesson applies to an enterprise. If my company buys service from two ISPs and both use the same submarine cable, a single cut can affect both connections. When I look at redundancy, I want to know which physical routes those services actually use.

Tonga is a good example. In January 2019, a severed undersea cable caused a major disruption to the country’s internet access for about two weeks. ABC Pacific’s report on the outage

Follow the fiber to land

A landing station is where a submarine cable comes ashore and connects to land-based fiber. Providers can lease capacity on that system and carry the traffic into their own networks. From there, core routers move traffic through the provider’s backbone.

Figure 2 · Cable landing point
Figure 2 · Cable landing point

Here’s the example I use to picture how capacity can be shared. Assume a link can carry 100 Gbps. A provider can allocate portions of that capacity to different customers or services based on their needs.

Figure 3 · Bandwidth allocation example
Figure 3 · Bandwidth allocation example

From the ISP to the enterprise edge

The edge router is often the last router my company manages before traffic passes to an external network. At that boundary, BGP lets networks exchange information about which IP prefixes they can reach. An enterprise with its own BGP peering might establish a neighbor relationship with its ISP and exchange routes. Inside the enterprise, a protocol such as OSPF can handle internal routing.

I think of DNS as a separate step. It resolves a name such as example.com to an IP address. The network then uses routing information to get packets to that address. BGP specification

Why private IPv4 addresses matter

IPv4 has about 4.3 billion possible addresses, and only a portion can be used as public addresses. As demand grew, it became impractical to assign a public IPv4 address to every device. I’m leaving IPv6 for another post. For this example, the important distinction is between public addresses used on the internet and private addresses used within a network.

RFC 1918 defines three private IPv4 ranges. Organizations can reuse these ranges internally, and those addresses are not meant to be routed on the public internet.

  • 10.0.0.0/8
  • 172.16.0.0/12
  • 192.168.0.0/16

RFC 1918 private address ranges

How NAT lets devices share public addresses

When a device on my private network connects to the internet, the device doing NAT can translate its private source address to a public address. It keeps track of that translation so replies can get back to the right internal device.

NAT overload (PAT)
Multiple internal connections can share one public IPv4 address. The translator uses port mappings to keep the connections distinct.
NAT pool
The translator uses a configured set of public addresses instead of relying on a single public address.

To bring it back to the two-ISP example, suppose I’m using one connection as primary and the other as standby. If traffic fails over to the second ISP, the outbound translation should use an address appropriate for that connection. Existing connections may need to restart when their public source address changes. SD-WAN is another way to manage traffic across multiple links.

RFC 3022 on traditional NAT and port translation

What I took away

The physical path, the routes networks exchange, and the addresses devices use all solve different parts of the same problem. When I look at a redundant internet design, I want to know where the links run, how traffic moves after a failure, and which public address it will use.

Before we dive into, how the Internet works, we first need to understand the infrastructure behind it.

Lets first learn about the Submarine Cables!

Even in the age of cloud computing, the world of the internet is connected by Fiber Optic cables that are also known as the Submarine Cables.

These Submarine Cables are huge Fiber Optic Cable Wires that run across the ocean, interconnecting countries together with the internet.

  • The following map shows the submarine cable which connects the world via the Internet.

While most modern countries have multiple submarine cable’s running across their territories, smaller island nations often have a single submarine cable running into their territory. 

Having multiple submarine cables running into your country means you have a failover redundancy in place, in the case that one of the submarine cables goes down for any major reasons.

Example : If my company has 2 ISPs that use both the same submarine cable, it could cause a problem. Recommended using 2 different ISPs, using 2 different submarine Cable.

Real Life Example:

An Island Country called “Tonga” was impacted due to damaged submarine cable. Because there was only one submarine cable going into the country, when a volcanic eruption destroyed the only fiber that connects the country to the internet, Country of Tonga was isolated from the Internet for nearly a month.

https://www.bbc.com/news/world-asia-46968752

We talked about what submarine cables are, now lets talk about Landing Point.

This is the point where the Fiber Optic Cable that runs via submarine are coming into the Land, where Fiber Optic Cable’s will be available for ISP or 3rd party to lease. At this point, an ISP entity will purchase or lease these optical fiber cables, which will then connect back to their data centers.

Generally, these fiber optic cables will connect back to ISP Data Center’s core routers and which will traffic across the entire world.

A powerful device is generally needed, to send traffic one way to another. And this is why core router is generally preferred.

  • A core routers job is simple, to send traffic one way to another fastest as possible.

From the one large optical fiber cable that derives from the landing point, there are smaller derivations of cables, which we connect back to our ISP’s.

Refer to the picture below

Lets assume that the optical fiber cable pipe is 100Gbps. This capacity can be distributed into smaller portions for ISP to use, in accordance with their needs.

We covered some of the Big Key Players in how the internet works so far

  • Submarine Cable

  • Landing Point

  • ISP Role

 Now I would like to show you how it connects back to our corporate environment.

  • Routing (BGP)

  • DNS

  • NAT

Lets start!

Before we dive into what a BGP is, we first need to talk about the Edge Device.

What is an Edge Device?

Simply put, an Edge Device usually refers to the Edge router which is a device that is used to connect to other networks outside of our domain.

  • Its usually the last internally managed routing device that separates one network to another

The Exterior Routing Protocol that is used, to connect to other networks outside of our domain is called the BGP.

  • Although we can use Interior Routing protocols to communicate to our outside domain, we prefer to use BGP because of its scalability.

BGP Is most widely used when dealing with ISP or any big companies.

  • Using BGP, companies are easily able to manage hundreds of different subnets.

  • Routing Protocols such as OSPF, simply does not have the level of scalability as BGP and thus generally used to route internal traffics which consist of smaller set of connected networks.

Now the fun question, so how does BGP actually helps us to communicate with the outside world?

  • Through something called a BGP Peering, Through BGP Peering we can form a neighbor-ship with the ISP Router or other organizations.

    • Direct exchange of traffic via the internet.

  • Also Through BGP Peering, we have availability to other networks IP Addresses and we use DNS instead of IP Addressing to address them.

    • For visibility purposes and instead of relying on IP Addressing which is harder to tell, if something ever goes down

Now that we talked about, how corporations connect to the Internet, we need to know something about IPv4 and its Exhaustion

  • What is IPv4 Exhaustion? And why should we care?

History Lesson:

  • Back in the days, your home devices consisted of multiple Public IP addresses, because originally 4 billion IPv4 Addresses were thought to be enough for human kind. (Clearly not). Thus, IPv6 was invented but I will not get into that this blog post.

  • In order to conserve quickly depleting public IP addresses, we use a protocol called NAT which converts public IP Address into a private IP Address.

  • IANA (Internet Assigned Numbers Authority) also Reserved what is known as “RFC 1918” which ensures that, the address allocation for private internets use the following reserves.

    • Reserve 10.0.0.0/8 | 172.16.0.0/12 | 192.168.0.0/16

  • Basically means, No ISP will ever advertise these IP Address schemes as a Public IP Address. These are strictly for use of Private & Within an Organization.

  • IANA = One of the Internet’s oldest institution and they own database that stores all internet domain names.

Now Lets talk about the difference between Public IP Address and Private IP Address

  • Public IP Address : Can either be provided by an ISP or alternatively, you can purchase an IP Block from the Internet Gods also known as IANA.

  • When talking about private IP address, we need to address something called a NAT.

  • The rule of thumb, is that that the ISP will provide a public IP Address to first establish communications with our network. This is where we use something called “NAT” which is also known as Network Address Translation. Simply put, it translates a public IP Address to a Private IP Address.

  • To conserve IP address spaces, we use different type of NAT protocols.

  • NAT Overload (PAT) Port Address Translations– Takes 1 Public IP Address, and using private ports you can assign many private IP Address, as long as the private ports are not in use.

  • NAT Pool – Sort of like how a DHCP works, you can setup rules to translate our private IP to the public IP address. 

Example:

  • If you have 2 ISP, and you want to use Active / Standby System, you can use NAT Rules that are translating your private IP into the first primary Public IP and If something happens to the primary ISP, than you can have another NAT Rule setup that will translate our private IP to the public IP Address that was provided by our 2nd ISP. (In this case, there is 2 NAT rule in placed – Active / Standby Sate)

Alternatively, SD-Wan is the latest technology, that can be an alternative solution where the network can use multiple connectivity options including ISP circuits etc.

Thank you for reading!

- Chris

Previous
Previous

Software Defined Networking

Next
Next

My CCNA Journey