Internet Fundamentals


Internet Fundamentals

Corey
Welcome to our introduction to how the internet works. We are starting from scratch, so you do not need technical knowledge. The goal is to build a visual, intuitive understanding of what happens when devices communicate, without getting lost in unnecessary details.

Michael
That is important because the internet is part of everyday life, but many people never stop to ask what it actually is. In simple terms, the internet is a huge structure that connects networks and devices around the world. We will build that idea step by step, beginning with a small office.

Corey
Imagine seven computers in one office, and the administrator needs every computer to communicate with the others. The device used to connect computers in the same nearby environment—such as a home, office, or building—is called a switch. But the computers cannot communicate merely because the switch is sitting there; they must first be connected to it.

Michael
So we connect each computer to a port on the switch using a cable. In small environments, these are generally copper cables, commonly Category 5 or Category 6 cables. Category 6 cables are faster than Category 5, and the word “Cat” simply refers to category. Some switches also support fiber-optic cables, which generally transmit data much faster than copper.

Corey
There is a key distinction here: a switch connects devices with cables. You cannot connect computers to a switch using wireless technology. If you want computers in the same environment to communicate wirelessly, you use an access point instead. Both a switch and an access point can connect the computers, but the switch uses cables while the access point uses wireless communication.

Michael
Once those computers are connected, they form a network. Because the network is limited to a physical location such as a building, office, or home, it is called a local area network, or LAN. A LAN is not meant to connect computers thousands of miles apart—for example, computers in the United States and Russia would not normally be one LAN.

Corey
Let’s follow a message inside that LAN. Suppose PC One wants to communicate with PC Six. The computer creates a unit of data, which this course calls a packet, although some people also call it a frame. PC One sends the packet to the switch, the switch examines its destination, and then sends it through the port connected to PC Six.

Michael
That gives us a useful basic rule: if one computer can send a packet to another computer, those computers can communicate. The switch makes that possible for devices on the same LAN. A real switch has many ports, and the number varies from one model to another; switches with more ports generally cost more.

Corey
Those switch ports are called LAN ports. Computers and laptops also have LAN ports, and a cable connects the LAN port on a computer to a LAN port on the switch. The packet enters one switch port, is handled by the switch’s internal hardware, and then leaves through the port connected to its destination computer.

Michael
But a LAN alone does not provide internet access. The computers can communicate with one another, but the switch’s job is only to create the local network. To connect that LAN to the internet, we need another device: a router.

Corey
The router’s main role is to connect different networks. In the office example, we connect the switch to the router, usually with a copper cable. Then the router must also be connected to the internet through a cable or service provided by an internet service provider, commonly called an ISP.

Michael
Here is the difference between the two devices. If PC One sends a packet to PC Five on the same LAN, the packet goes to the switch, and the switch sends it to PC Five. The router has no role in that same-LAN communication. But if PC One sends a packet to the internet, the packet goes first to the switch, then to the router, because the router acts as the door from the LAN to the internet.

Corey
The router examines the packet, recognizes that its destination is outside the local network, and sends it onward through the connection supplied by the ISP. So the basic path is computer to switch, switch to router, and router to the internet.

Michael
Now let’s expand our view. The internet is not one giant computer or one single device. It can be understood as a structure connecting millions of LANs around the world. Routers are essential because their main job is to connect different networks, whether those networks are in different offices, different cities, or different countries.

Corey
A home router is especially common because it combines a router and a switch in one device. In a small home or small office, that combination may be enough: it provides local connectivity and a path to the internet. If there are many devices, however, additional switches and routers may be needed.

Michael
Why does the internet use many routers instead of one enormous router in the middle of the world? A single router would have to handle millions of connections, creating an impossible overload. It would also create a single point of failure: if that one router stopped working, the entire internet would be affected.

Corey
A single giant router would also require extremely long cables to reach distant locations, creating a huge physical and organizational problem. A distributed structure solves these issues. Traffic can be spread across many routers, cables do not all have to run to one central point, and the failure of some routers does not necessarily bring down the entire internet.

Michael
The physical infrastructure includes enormous numbers of cables, including cables under oceans between countries and continents. The course explains that about 99 percent of international internet communication uses hundreds of underwater cable lines—468 in the visual model—and that these cables together span roughly four million kilometers.

Corey
Some underwater cables are only about 131 kilometers long, while others are around 20,000 kilometers. Damage can be serious: in 2018, an almost 17,000-kilometer cable between France and Africa was accidentally cut, causing internet disruption in ten countries. Cable problems occur frequently, often because of ships or natural disasters, and one example from 2007 involved pirates stealing eleven kilometers of cable and selling it as scrap.

Michael
These long-distance cables are fiber-optic cables. Fiber optics support very fast data transmission, and unlike copper, they remain much less likely to produce errors as distance increases. That makes fiber especially suitable for intercontinental communication.

Corey
Let’s follow a packet from one LAN to a computer in another country. The source computer first sends the packet to its switch. The switch sees that the destination is outside the LAN and sends the packet to the router. The router then sends it toward the wider internet through the connection that links the LAN to the internet.

Michael
After that, the packet may have several possible paths. Each router has a routing table, which contains information about where packets should go. When a router receives a packet, it examines the destination and forwards the packet through the appropriate port. The router does not send it back along the path it just came from.

Corey
The information in routing tables is created by a processor using different algorithms. Those algorithms do not simply count how many routers are on each possible path. Routers can also consider conditions such as traffic density. A path that looks shorter may be congested, so another path with more steps might deliver the packet faster.

Michael
That decision is related to congestion control. The packet may move through one router, then another, with every router repeating the process: examine the routing table, select an appropriate route, and forward the packet. Eventually, it reaches the router connected to the destination LAN, which sends it through the switch to the destination computer.

Corey
This is why devices in distant countries can communicate in milliseconds. The bookish definition is that the internet is “the network of networks.” A home LAN, an office LAN, and a company’s networks are all smaller networks, and the internet is the enormous system formed by connecting them.

Michael
Connecting to the internet from a computer’s perspective means being able to send packets to the internet and receive packets from it. For example, when you enter Udemy.com and click a video, your computer creates a request packet and sends it through the home router to Udemy.

Corey
Udemy receives that request and sends back packets containing the video. The video is delivered piece by piece, a process called streaming. Because of streaming, you do not have to wait for an entire one-hour video to reach your computer before watching it. Internet speed affects how quickly those pieces arrive.

Michael
The powerful computers that provide websites and services are called servers. They are fundamentally similar to normal computers, but they need much more powerful hardware because they may exchange packets with thousands of users at the same time.

Corey
Large services do not depend on one single server. Udemy, for example, uses distributed servers in different locations, and users communicate with a suitable server. This helps prevent a single point of failure and supports load balancing, because users can be distributed among multiple servers.

Michael
A WAN, or wide area network, is a network formed by combining different LANs. Imagine a company with offices in different parts of the world that wants those offices to work as though they belong to one connected network. The company can create a WAN to connect those distant LANs.

Corey
The internet already allows those LANs to communicate, but the internet is public. A company may not want an important file to travel openly across a public network, where outsiders might be able to observe or alter it. A private company WAN provides a more controlled way for offices to communicate.

Michael
One popular and cost-effective way to create that WAN is with a VPN, or virtual private network. A VPN creates a special connection over a public network using tunneling. The tunnel is not a physical tunnel; it is a way of making packets behave as though they are traveling through a private, protected connection.

Corey
A useful analogy is sending a letter. The public internet is like a postman carrying an unsealed letter that could be read. Tunneling is like placing that letter inside an envelope. In networking terms, the original packet is placed inside another packet, so the outside network carries it without directly exposing the original packet.

Michael
Tunneling alone is not the whole security solution, because someone could theoretically open the outer packet. That is why encryption is also used. The original packet is encrypted before being placed inside the outer packet, so even if someone accesses it, the information is not understandable without the appropriate ability to decrypt it.

Corey
At the destination router, the outer packet is removed and the encrypted original packet is decrypted. The router then examines the original packet and sends it to its destination LAN. A VPN-based WAN can therefore connect company offices securely over the internet, although no system has one-hundred-percent security.

Michael
Encryption also protects ordinary internet activities. When you enter credit-card information on Amazon, that information travels in packets toward an Amazon server. Encryption between your computer and the destination server prevents outsiders from seeing the credit-card data as plain text; the endpoints can decrypt it and recover the original information.

Corey
The internet itself is the largest WAN in the world, but it is different from a company WAN. A company WAN created with a VPN is intended for that company, while the internet is a public network available to people and organizations around the world.

Michael
There is also a Campus Area Network, or CAN. If two offices are very close—about one hundred meters apart, for example—we may connect their switches directly and create one LAN across the locations. This type of LAN is often associated with university campuses.

Corey
A direct LAN connection is generally more secure than a VPN-based WAN because packets remain on the company’s own cable rather than crossing the public internet. A VPN WAN is still protected by tunneling and encryption, but it cannot guarantee perfect security.

Michael
A company can also purchase a dedicated line from an ISP for a private WAN. That dedicated line is used only by the company, unlike a VPN that uses the public internet. Private WANs can be highly secure, but they are often expensive, so many organizations choose a public WAN created with VPN technology.

Corey
Remember the device distinction: switches create LANs, while routers connect different networks and are used to create WAN connections. A router is not only an internet device. For example, one router can connect a marketing LAN and a software-development LAN in the same office.

Michael
Each cable connected to a router can represent a different network: one cable to LAN One, another to LAN Two, and another to the internet. Separating departments into different networks can improve organization and hierarchy, especially in a large office with many computers.

Corey
Now let’s focus on ISPs. An internet service provider is a company that allows customers to connect to the internet for a fee. ISPs are responsible for transmitting packets between locations and for operating or controlling portions of the router infrastructure used in the internet.

Michael
There are many types of ISPs. A local ISP usually handles small areas, such as neighborhoods. The first step for a home or office is generally to connect to a local ISP, using the service line that enters the home router. A local ISP facility is called a Point of Presence, or POP, and it can contain routers, switches, servers, and other equipment.

Corey
Some local ISPs connect several neighborhoods, so they may have multiple paths and routers. Regional ISPs connect larger areas, such as cities within a country. Multiple local and regional ISPs work together to form a countrywide network.

Michael
Global ISPs handle international communication. If a computer in the United States communicates with one in China, the packet needs an international structure, including global ISPs and the undersea cables that connect continents. Packets can take different routes, and routers along the way determine those routes.

Corey
The hierarchy helps keep the system organized. Rather than connecting every ISP directly to every other ISP, local ISPs connect through regional ISPs, and regional or other networks connect through global ISPs. Direct links can exist in some situations, but connecting everything directly would create unnecessary complexity.

Michael
A packet does not always follow the same path in both directions. For example, when you request a website from Belgium whose servers are in the United States, the request travels to the website’s server. The server then sends a response containing the page’s HTML, images, videos, and other information, but that response may return along a different route.

Corey
Your browser receives the response packets, learns the information needed to display the site, and shows the webpage. This request-and-response process happens every time you visit a website, but it occurs so quickly—often in milliseconds—that you do not notice the many operations taking place.

Michael
Large companies such as Google use many servers distributed around the world. When you request Google’s service, you can often communicate with a server relatively close to your location, which improves speed and efficiency. YouTube benefits from this distributed server structure as well.

Corey
Google also uses peering. Peering is a direct connection between a large company such as Google and an ISP, allowing customers to reach the company’s servers without using as much of the public ISP infrastructure. This can improve speed and streaming quality, and because fewer public network locations are involved, it can also reduce exposure to outside interference.

Michael
Peering is one reason large services can perform efficiently for millions of users. The course contrasts this with services that may have fewer distributed servers or do not use peering, where users may experience more freezing or interruptions. Companies such as Google and Amazon use these kinds of infrastructures to serve users efficiently.

Corey
The networks established by global ISPs are often called the internet backbone. Internet exchange points, or IXPs, help global ISPs communicate with one another more efficiently and allow the backbone to operate in a coordinated way.

Michael
Finally, a customer does not necessarily have to connect through a local ISP. Depending on service availability and cost, a customer could connect directly to a regional or global ISP. In practice, most ordinary users simply choose among the ISP services available in their location.

Corey
Let’s bring the whole picture together. Inside a home or office, switches connect devices into a LAN. Routers connect that LAN to other networks and to the internet. ISPs provide the service and manage portions of the infrastructure, while packets move between networks through routers, routing tables, cables, and sometimes wireless access points.

Michael
And the internet is best understood as the network of networks: millions of LANs and other networks connected through a distributed system of routers, ISPs, fiber-optic cables, servers, and exchange points. When you open a website, your computer sends request packets, the server sends response packets, and your browser assembles those responses into the page or video you see.

Corey
That is the essential mental model. A switch handles communication within a local network, a router connects different networks, an ISP provides access and transports packets through its infrastructure, and VPN tunneling with encryption can create a protected company connection over the public internet.

Michael
Once you can visualize those roles and follow a packet from a computer, through a switch and router, across ISP networks, and finally to a remote server or LAN, you have the foundation for understanding how the internet works.

Ask anything
We've read this whole study set, so questions about it get the best answers.