1. Home
  2. Explore
  3. Computer Science
  4. Internet Fundamentals

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Internet Fundamentals

How the Internet Works: From Local Networks to the Global Internet

The internet is part of everyday life, but its underlying structure is often invisible. A web page may appear almost instantly, yet many devices, cables, routers, and networks may be involved before the page reaches a user’s screen.

The central idea is simple:

The internet is a network of networks that allows electronic devices in different locations to exchange packets.

Understanding this idea does not require advanced technical knowledge. The internet can be explained by building upward from small, familiar networks such as those found in homes and offices.

1. What a Network Is

A network is a group of connected devices that can communicate with one another. Communication occurs when one device sends data to another device.

For example, if one computer can send a message to another computer and the second computer can receive it, the two computers are communicating over a network.

The data sent between devices is divided into small units. These units are commonly called packets. In some contexts, similar units may be called frames, but the term packet is useful for understanding the general process.

A packet contains information about:

  • The data being sent
  • The intended destination
  • Information that helps networking devices deliver it correctly

The packet does not usually travel directly from the source computer to the destination computer. Instead, it passes through networking devices that examine the packet and decide where it should go next.

Think About It

If two computers are connected but cannot send packets to each other, have they formed a functioning network? A physical connection alone is not enough; the devices must be able to exchange data.

2. Creating a Local Area Network

Imagine a small office containing seven computers. The administrator wants every computer to communicate with the others. One computer should be able to send a packet to any other computer in the office.

The main device used for this purpose is a switch.

The Role of a Switch

A switch connects devices located in the same local environment, such as:

  • A home
  • An office
  • A school building
  • A nearby workplace

A switch receives a packet from one connected computer, examines the packet’s destination, and sends the packet through the appropriate connection to the destination computer.

For example:

  1. Computer 1 creates a packet intended for Computer 6.
  2. The packet travels from Computer 1 to the switch.
  3. The switch examines the packet and identifies Computer 6 as the destination.
  4. The switch sends the packet through the port connected to Computer 6.
  5. Computer 6 receives the packet.

The switch acts like a traffic director inside the local environment. It does not normally send the packet everywhere. It uses the destination information to send the packet toward the correct device.

Switch Ports and Network Cables

A physical switch contains multiple connection points called LAN ports. The number of ports varies between switches. Some switches have relatively few ports, while others have many more. A larger number of ports generally makes a switch more expensive.

Computers and laptops also have LAN ports. A cable connects the LAN port on a computer to a LAN port on the switch.

The most common cable types in small environments are copper cables such as:

  • Category 5, often called Cat 5
  • Category 6, often called Cat 6

Cat 6 cables generally support faster data transmission than Cat 5 cables. The word “category” explains the abbreviation “Cat.”

Some switches also support fiber-optic cables. Fiber-optic cables transmit data much faster than copper cables and are especially useful over long distances.

A crucial distinction is that a traditional switch connects devices using physical cables. Wireless devices do not directly connect to a traditional switch through wireless signals.

Access Points and Wireless Networks

An access point provides wireless connectivity between devices in the same environment. It can allow several computers or other devices to communicate without each device being connected by a physical cable.

The difference can be summarized as follows:

DeviceMain connection methodMain purpose
SwitchCablesConnect devices in the same local environment
Access pointWireless signalsConnect devices wirelessly in the same local environment

Both devices can help create a local network. The main difference is how the devices connect.

3. The Local Area Network

When several nearby devices are connected and can communicate, they form a Local Area Network, or LAN.

A LAN is a collection of connected devices in a restricted physical location, such as:

  • A home
  • An office
  • A building
  • A small campus or nearby group of buildings

A LAN is designed for a limited area. Computers located in distant countries would not normally be considered part of the same LAN merely because they can communicate. A LAN is local in terms of physical range.

A home network is a LAN. A company office network is also a LAN. Around the world, millions of homes, offices, and buildings contain their own LANs.

Switches and Communication Within a LAN

A switch is generally sufficient for communication between devices in the same LAN. If Computer 1 sends a packet to Computer 5 in the same office:

  1. Computer 1 sends the packet to the switch.
  2. The switch examines the destination.
  3. The switch forwards the packet to Computer 5.
  4. Computer 5 receives it.

A router is not required merely for two computers in the same LAN to communicate. The switch performs this local communication task.

A LAN connects nearby devices, and a switch forwards packets between those devices.

4. Why a Switch Alone Cannot Connect to the Internet

A switch can connect devices within a LAN, but it does not by itself connect that LAN to the global internet.

The device that connects different networks is a router.

A router is needed because the internet is not one single local network. It is made from many separate networks. A router provides a path from one network to another.

A typical small office arrangement looks like this:

  1. Computers connect to a switch.
  2. The switch connects to a router.
  3. The router connects to an internet service provider.
  4. The internet service provider connects the local network to other networks on the internet.

The connection between the switch and the router may use a copper cable. A separate cable supplied by the internet service provider connects the router to the provider’s infrastructure.

The Router as a Doorway

A router can be understood as a doorway between networks.

Suppose Computer 1 wants to send a packet to a computer on the internet:

  1. Computer 1 sends the packet to the switch.
  2. The switch recognizes that the packet is intended for a different network.
  3. The switch forwards the packet to the router.
  4. The router examines the packet.
  5. The router sends the packet toward the internet through the connection provided by the ISP.

The switch handles communication inside the local network. The router handles communication between the local network and other networks.

A switch connects devices within a network; a router connects separate networks.

5. The Internet as a Network of Networks

The internet can be visualized as millions of LANs connected through routers.

One home LAN may contain a computer, a phone, and a television. A company LAN may contain hundreds of computers. Each LAN is a smaller network, but routers connect these networks to other LANs.

This creates the formal definition:

The internet is the network of networks.

The internet is not simply one large computer or one central machine. It is a distributed structure containing:

  • Homes and offices
  • Local networks
  • Routers
  • Internet service provider networks
  • Long-distance cables
  • Servers
  • Other networking equipment

When a LAN connects to the larger internet structure, devices in that LAN can communicate with devices connected to other networks around the world.

Home Routers

A home router usually combines two functions in one device:

  1. A switch function for connecting devices within the home
  2. A router function for connecting the home network to the internet

Because of this combination, a small home usually does not need a separate switch and router. A home router is often sufficient for a small number of devices.

If a location has many devices, the built-in switch function of the home router may not provide enough ports. In that situation, additional switches or other networking equipment may be needed.

6. Why the Internet Uses Many Routers

The internet uses many routers distributed around the world rather than relying on one enormous central router.

A single-router design would create several serious problems.

Overloading

If millions or billions of devices all had to connect to one router, that router would need an enormous number of connections and would have to process an impractical amount of traffic.

Distributing the work among many routers prevents one device from carrying the entire burden.

Single Point of Failure

A single point of failure is one component whose failure can bring down an entire system.

If the entire internet depended on one router and that router failed, global communication could stop. A distributed structure is more resilient. If several routers fail, other routers can continue carrying traffic, although performance may decrease.

Excessive Cable Length

A single central router would also require extremely long cables from distant locations. Networks near the opposite side of the world would need cables extending enormous distances to reach the central router.

A distributed design places routers closer to the networks they serve. Connections may still cover long distances, but the system avoids sending every cable to one central location.

Load Balancing

A distributed network also supports load balancing. Traffic can be spread across different routers and paths instead of concentrating on one route.

This makes the network more efficient and helps prevent congestion. It also allows communication to continue when part of the system is damaged.

7. Physical Cables Beneath the Internet

Although people often imagine the internet as wireless or existing “in the cloud,” much of its physical infrastructure consists of cables.

Long-distance and international communication frequently uses fiber-optic cables, including cables placed beneath oceans. These cables connect countries and continents that are separated by water.

The source material describes hundreds of international submarine cable systems, with individual cables ranging from relatively short lengths to approximately 20,00020{,}00020,000 kilometers. Together, these cables form a major part of the physical foundation of international internet communication.

Some submarine cables extend for nearly 17,00017{,}00017,000 kilometers. Damage to one important cable can interrupt or reduce internet access for multiple countries.

Submarine cables can be damaged by:

  • Ship anchors
  • Fishing activity
  • Natural disasters
  • Other accidents
  • Deliberate actions

The material also describes an incident in which cable sections were stolen and sold as scrap. Such events demonstrate that the internet’s infrastructure is physical and can be affected by events in the real world.

Why Fiber Optic Cables Are Used

Fiber-optic cables transmit data using light. They are preferred for long-distance communication for two major reasons:

  1. They support very fast data transmission.
  2. They maintain reliable transmission over long distances.

As copper cables become longer, the chance of transmission errors increases. Fiber-optic cables are much better suited to carrying data across oceans and between continents with minimal errors.

8. How a Packet Travels Across the Internet

Suppose a computer in one LAN needs to communicate with a computer in another LAN located in a different country.

The packet may follow this general sequence:

  1. The source computer sends the packet to its local switch.
  2. The switch sends the packet to the local router.
  3. The router determines that the destination is outside the local network.
  4. The router forwards the packet to another router.
  5. Additional routers examine and forward the packet.
  6. Eventually, the packet reaches the router connected to the destination LAN.
  7. That router sends the packet into the destination LAN.
  8. The destination switch forwards the packet to the correct computer.

A packet may pass through many routers before reaching its destination.

Routing Tables

Each router has a routing table. A routing table contains information that helps the router decide where packets should go next.

When a router receives a packet, it generally performs these actions:

  1. Receives the packet through one of its ports
  2. Examines the packet’s destination
  3. Consults its routing table
  4. Selects an appropriate outgoing path
  5. Sends the packet through the corresponding port

This forwarding process is called forwarding.

A router does not normally send a packet back through the same path from which it arrived. Instead, it chooses a route that moves the packet closer to its destination according to its routing information.

How Routing Decisions Are Created

Routers use processors and algorithms to create or update routing-table information. These algorithms help determine suitable paths through the network.

The best path is not always the path with the fewest routers. A route that looks shorter visually may be slower if the links along that route are heavily occupied.

Congestion Control

Congestion occurs when a path contains a high density of packets or traffic. A router may avoid a congested path even if it appears to be the shortest route.

This decision is part of congestion control. The router chooses a path that may contain more intermediate routers but may deliver the packet faster because it is less busy.

Therefore, routing decisions can consider more than physical distance. A suitable path depends on network conditions, available links, and traffic levels.

9. Connecting to the Internet from a Computer’s Perspective

Connecting to the internet means that a computer can:

  • Send packets toward the internet
  • Receive packets from the internet

Consider a person entering a website address into a browser and selecting a video.

Request and Response

The process begins with a request message:

  1. The computer creates a packet requesting a specific web page or video.
  2. The packet travels to the home router.
  3. The router forwards the packet through the internet.
  4. The request reaches a server belonging to the website.
  5. The server processes the request.

The website then creates a response message. This response contains the information needed to display the requested content, such as:

  • Text
  • Images
  • Video
  • An HTML file
  • Other web page information

An HTML file can be understood as the structural skeleton of a web page. The browser uses the information returned by the server to construct and display the page.

The response travels back through the internet to the computer. The browser interprets the response and displays the requested web page.

This request-and-response process happens repeatedly whenever a user opens a website or requests new content.

Streaming

Video is usually delivered through streaming. Streaming means that the video is sent piece by piece rather than requiring the entire video to arrive before playback begins.

For example, if a video is one hour long, the computer does not need to receive the complete hour before showing the beginning. The server sends portions of the video while playback occurs.

A faster internet connection generally allows video data to arrive more quickly. A slower connection may cause pauses or interruptions if the incoming data cannot keep up with playback.

Servers

A server is a computer that provides services or content to other computers. Web servers store and deliver websites, videos, images, and other information.

Servers are not fundamentally different from ordinary computers, but they generally require much more powerful hardware because they may communicate with thousands of users simultaneously.

Large companies usually operate many servers in different locations. This provides two important benefits:

  • Load balancing: Requests can be distributed among multiple servers.
  • Fault tolerance: If one server fails, other servers can continue providing the service.

When a user visits a large website, the user may communicate with one of the company’s servers selected according to location, availability, and network conditions.

10. Wide Area Networks

A Wide Area Network, or WAN, connects multiple LANs across a large geographic area.

For example, a company may have:

  • One LAN in one city
  • Another LAN in a different city
  • Additional LANs in other countries

If the company wants these offices to operate as though they belong to one connected organizational network, it can create a WAN.

A WAN differs from a LAN mainly in geographic scope:

Network typeTypical scopeMain purpose
LANHome, office, or buildingConnect nearby devices
WANCities, countries, or larger regionsConnect separate LANs

The internet itself is the largest WAN because it connects networks across the entire world. However, a company’s private WAN is different from the public internet.

11. Public Networks, Private Networks, and VPNs

The internet is a public network. It does not belong exclusively to one company or one person. Many different users and organizations share it.

Because data travels across a public network, a company may not want to send sensitive information directly over the internet without protection.

For example, a company may need to send an important file from one office to another. If both offices are connected by a private local cable, the communication remains within the company’s private infrastructure. If the file travels directly across the public internet, outsiders may potentially observe or interfere with the communication.

A common solution is a Virtual Private Network, or VPN.

VPN Tunneling

A VPN creates a special logical connection across a public network. This process is called tunneling.

The tunnel is not a physical passage through the ground or under the ocean. Instead, the packet is packaged in a way that makes it behave as though it is traveling through a private connection.

A useful analogy is sending a letter:

  • An unprotected letter is like data sent openly through the public internet.
  • Placing the letter inside an envelope represents tunneling.
  • The envelope helps hide the letter from casual observers.

Technically, the original packet is placed inside another packet. The outer packet helps transport the inner packet across the public network.

A VPN connecting two offices through their routers is called a site-to-site VPN.

Encryption

Tunneling alone is not always enough. If someone opens the outer packet, the original information might still be exposed.

For this reason, VPNs also use encryption. Encryption transforms readable information into an unintelligible form. Only an authorized endpoint with the appropriate ability to decrypt the data can recover the original content.

The VPN process can therefore be understood as:

  1. The original packet is encrypted.
  2. The encrypted packet is placed inside another packet.
  3. The outer packet travels across the internet.
  4. The receiving router removes the outer packet.
  5. The receiving router decrypts the inner packet.
  6. The original packet is delivered to the destination LAN.

Encryption strengthens privacy and security, but no system provides an absolute guarantee of perfect security. A VPN is a practical and cost-effective method for securely connecting offices across a public network.

Internet Encryption for Everyday Activities

VPNs are not the only use of encryption. Websites that handle sensitive information, such as online shopping websites, also use encryption between the user’s computer and the website’s server.

For example, when a customer enters credit-card information:

  1. The computer places the information into a packet.
  2. The packet is encrypted before traveling over the internet.
  3. Intermediate devices cannot easily read the protected information.
  4. The destination server decrypts the packet and processes the information.

Without encryption, sensitive information could travel in readable form, creating serious security risks.

12. LANs, WANs, and Campus Area Networks

Suppose two company offices are only a short distance apart. If the offices are close enough, their switches may be connected directly with a cable. The two offices can then operate as part of one LAN.

When a LAN covers a group of nearby buildings, especially on a university or organizational campus, it may be called a Campus Area Network, or CAN.

A CAN is larger than a typical office LAN but smaller than a WAN. Its purpose is to connect nearby buildings or locations under one organization’s control.

If two offices are far apart, connecting them directly with a private cable may be impractical. A VPN-based WAN may be more suitable.

Comparing Direct LAN Connections and VPN WANs

A direct LAN connection is generally more secure than a VPN-based WAN because the packets remain on the organization’s own physical cable rather than passing through the public internet.

A VPN WAN still provides strong protection through tunneling and encryption, but it uses public infrastructure. Since no system is perfectly secure, a direct private connection offers an additional layer of control.

A company can also request a private WAN from an ISP. In a private WAN, the ISP provides a dedicated line used only by that company.

A private WAN is generally more secure than a public VPN-based WAN, but it can be expensive. For this reason, many organizations choose a VPN-based public WAN as a balance between cost and security.

13. Routers Can Connect Any Different Networks

A router is often introduced as the device that connects a local network to the internet. Its broader and more accurate role is to connect different networks.

Those networks may be:

  • In different countries
  • In different cities
  • In different buildings
  • In separate departments of the same office

For example, a company may separate its marketing computers from its software-development computers. Each department can have its own LAN. A router can connect the two LANs while maintaining their separation.

A router’s different ports may connect to different networks:

  • One port may connect to LAN 1.
  • Another port may connect to LAN 2.
  • Another port may connect to the internet.

This is why routers are useful for organizing large environments. Dividing a large office into multiple networks can improve structure and hierarchy, while the router controls communication between those networks.

14. Internet Service Providers

An Internet Service Provider, or ISP, is a company that provides access to the internet in exchange for payment.

An ISP supplies or manages the connection that allows a home, office, or organization to exchange packets with other networks.

The ISP is not simply a cable entering a building. It is also an organization that operates and controls networking infrastructure, including routers and other equipment.

There are many ISPs around the world. These providers work together in a layered structure.

Local ISPs

A local ISP serves a relatively small geographic area, such as:

  • A neighborhood
  • Several nearby neighborhoods
  • A small town or local region

A home or office usually connects first to the local ISP. The cable purchased from the local ISP links the customer’s router to the provider’s network.

The first facility through which a customer connects to an ISP is called a Point of Presence, or PoP.

A PoP may contain:

  • Routers
  • Switches
  • Servers
  • Other networking equipment

For basic understanding, routers are especially important because they forward packets between networks.

A large local ISP may have multiple PoPs or multiple connections serving different neighborhoods.

Regional ISPs

A regional ISP connects larger areas, such as different cities within a country.

If two users live in different cities and are served by different local ISPs, their packets may travel through a regional ISP. The regional ISP provides a higher level of connection between local providers.

This layered structure avoids excessive direct connections between every local ISP. If every local ISP connected directly to every other local ISP, the system would become extremely complex.

A hierarchical structure is more manageable:

  1. Local ISPs connect homes, offices, and neighborhoods.
  2. Regional ISPs connect local ISPs and cities.
  3. Global ISPs connect different countries and continents.

Global ISPs

A global ISP provides international communication. If a device in one country needs to communicate with a device in another country, the packet may pass through global ISP infrastructure.

Global ISPs are connected through large international networks. Their networks include long-distance and submarine fiber-optic cables.

The network formed by the interconnection of major global ISPs is commonly called the internet backbone. This backbone carries large volumes of international traffic.

Internet Exchange Points

An Internet Exchange Point, or IXP, is a structure that helps different networks exchange traffic efficiently.

IXPs allow networks, including major ISP networks, to connect and exchange packets more directly. This can reduce unnecessary routing through distant networks and improve efficiency.

15. How ISP Hierarchy Carries a Packet

Consider a packet traveling from a home in one country to a web server in another country.

A possible path is:

  1. The home computer sends the packet to the home router.
  2. The home router sends it to the local ISP.
  3. The local ISP forwards it to a regional ISP.
  4. The regional ISP forwards it to a global ISP.
  5. The global ISP carries it across international infrastructure.
  6. Another global ISP or regional ISP receives it.
  7. The destination local ISP receives the packet.
  8. The local ISP forwards it to the destination LAN.
  9. The destination router and switch deliver it to the server.

The exact path is not fixed in advance. Routers make decisions as the packet travels. Different packets traveling between the same two endpoints may follow different paths depending on routing information and traffic conditions.

Sometimes a local ISP connects directly to a global ISP. This may happen if the global provider already has infrastructure in that location or if the local ISP pays for a direct connection. A direct connection can provide faster access but may require significant investment.

16. Website Requests and Distributed Servers

When a user enters a website address, the computer sends a request message to that website’s server. The server sends back a response containing the information needed to display the site.

The request path and response path do not have to be identical. Routing decisions are made dynamically, so the two messages may travel through different routers.

Small Websites

A small website may operate from a limited number of servers. If the server is located far from the user, the request and response may have to travel through several networks and long-distance links.

Large Websites

A large company such as Google operates many servers distributed around the world. When a user requests a service, the request can be directed toward a suitable server located relatively close to the user.

This distributed structure provides:

  • Faster response times
  • Better load balancing
  • Greater resilience if one server fails
  • More efficient content delivery

YouTube benefits from this type of infrastructure because video requires the repeated delivery of large amounts of data.

17. Peering

Peering is a technique in which a large company establishes a direct connection with an ISP.

For example, a company such as Google may connect directly to local ISPs so that users can reach Google’s servers without relying on as much of the public ISP infrastructure.

Peering can improve:

  • Speed
  • Efficiency
  • Streaming quality
  • Reliability

It can also reduce the number of public network points through which packets travel. This may reduce the opportunity for outside observation, although it does not create perfect security.

Large companies use peering because they serve enormous numbers of users and need efficient paths to their distributed servers.

Comprehensive Review

The internet can be understood as a layered collection of connected networks.

  • A network allows devices to exchange packets.
  • A switch connects devices within the same local network.
  • A LAN connects devices in a restricted physical area.
  • An access point provides wireless connectivity within a local environment.
  • A router connects different networks.
  • A WAN connects multiple LANs across a large geographic area.
  • A CAN connects nearby buildings or networks, often on a campus.
  • An ISP provides access to the internet and operates networking infrastructure.
  • A routing table helps routers choose where packets should go.
  • Forwarding is the act of sending a packet through the selected outgoing path.
  • Congestion control helps routers avoid overloaded paths.
  • Fiber-optic cables carry high-speed long-distance and international traffic.
  • A server provides content or services to other computers.
  • Streaming delivers content piece by piece while it is being used.
  • A VPN creates a protected logical connection across a public network.
  • Tunneling places one packet inside another to create the appearance of a private connection.
  • Encryption transforms data so unauthorized parties cannot understand it.
  • Peering creates direct connections between large content providers and ISPs.
  • The internet backbone consists of major interconnected global networks.
  • Internet Exchange Points help networks exchange traffic efficiently.

The complete journey of a web request follows the same basic logic: a computer creates a packet, a switch handles local delivery, routers carry the packet between networks, ISPs provide the interconnected infrastructure, and a server returns a response. The browser then uses that response to display the requested content. This packet-based exchange, carried across a distributed system of networks, is the foundation of the modern internet.

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent