
1:42:43
How does the internet work? (Full Course)
freeCodeCamp.org
Overview
This course explains the fundamental concepts of how the internet works, starting from basic networking devices and progressing to the global structure of the internet. It covers local area networks (LANs), the role of switches and routers, how data travels across the internet using packets, and the concept of wide area networks (WANs), including virtual private networks (VPNs) for secure communication. The course emphasizes visual explanations and aims to provide a clear understanding for individuals with no prior technical knowledge.
How was this?
Save this permanently with flashcards, quizzes, and AI chat
Chapters
- A network allows devices to communicate with each other.
- A switch is a device used to connect multiple computers within the same physical location (like an office or home) to form a Local Area Network (LAN).
- LANs are created using cables (copper like Cat 5/6, or fiber optic) to connect devices to a switch, or wirelessly using an access point.
- A LAN is a network of devices in a restricted geographical area, enabling them to communicate locally.
Understanding LANs is the foundational step to grasping how individual devices connect and form the basis of larger networks.
Connecting seven computers in an office to a switch using cables so they can share information.
- While switches enable communication within a LAN, a router is essential for connecting a LAN to the wider internet.
- A router acts as a gateway, directing traffic between different networks, including your local network and the internet.
- An Internet Service Provider (ISP) provides the physical connection (cable) from your home or office to the internet.
- When a computer sends a packet to the internet, it first goes to the switch, then to the router, which then forwards it to the internet.
Routers are critical for enabling access to the vast resources and communication capabilities of the global internet beyond your local network.
Connecting an office switch to a router, which is then connected to an ISP's cable, allowing office computers to access the internet.
- Data is broken down into small units called packets, which are sent across the network.
- The internet is a vast network of interconnected routers that direct these packets to their destinations.
- Routers use routing tables to determine the most efficient path for packets, considering factors like traffic and distance.
- The internet's distributed structure with many routers prevents single points of failure and manages traffic effectively, unlike a single, centralized router.
Understanding packet transmission and the distributed nature of the internet explains how information travels globally and why the internet is resilient.
A packet from your computer traveling through multiple routers across the internet to reach a server in another country.
- A significant portion of international internet traffic travels through massive undersea fiber optic cables.
- These cables are crucial for connecting continents, and damage to them can disrupt internet access for entire regions.
- Fiber optic cables are preferred for long-distance transmission due to their speed and reliability compared to copper cables.
- Problems like accidental cuts, natural disasters, and even piracy can affect these vital undersea cables.
This highlights the physical infrastructure that underpins global internet connectivity and its vulnerabilities.
A 17,000 km undersea cable connecting Europe and Africa, the disruption of which caused internet outages in multiple countries.
- A Wide Area Network (WAN) connects multiple LANs, often over large geographical distances.
- While the internet connects LANs, it's a public network, posing security risks for sensitive data transmission.
- A Virtual Private Network (VPN) creates a secure, encrypted 'tunnel' over the public internet, allowing private communication between networks.
- VPNs use tunneling and encryption to ensure data privacy and security, making them suitable for connecting geographically dispersed company offices.
WANs and VPNs are essential for businesses and organizations needing to securely connect multiple locations and protect sensitive data.
A company using a VPN to securely connect its offices in different cities, allowing employees to share files as if they were on the same local network.
- Connecting to the internet means your device can send and receive packets to/from internet resources.
- Home routers often combine the functionality of a router and a switch, simplifying home network setup.
- When you access a website like Udemy, your computer sends a request packet, and the website's servers send back the content (like video) in packets (streaming).
- Servers are powerful computers that handle requests from many users simultaneously, and they are often distributed globally to improve performance and reliability.
This clarifies the practical experience of using the internet from a user's device, demystifying web browsing and content access.
Accessing a video on Udemy.com: your computer sends a request packet, and Udemy's servers stream the video back to you in packets.
- A Campus Area Network (CAN) is a type of LAN connecting multiple buildings within a limited area, like a university campus.
- LANs are inherently more secure than WANs because data stays within your private network and doesn't traverse the public internet.
- Even with VPNs, WAN communication travels over the internet, making it less secure than a direct LAN connection.
- While the internet is the largest WAN, private WANs (like those created with VPNs) are specific to an organization and offer enhanced security for internal communications.
Understanding the security differences between LANs and WANs helps in choosing the appropriate network strategy for different needs.
Connecting two office switches directly within a short distance (e.g., 100 meters) to form a secure LAN, versus using a VPN to connect them over the internet.
Key takeaways
- The internet is fundamentally a network of interconnected Local Area Networks (LANs).
- Switches manage traffic within a LAN, while routers connect LANs to each other and to the internet.
- Data travels across networks in small units called packets.
- The global internet relies on a vast, distributed network of routers and physical infrastructure, including undersea cables.
- VPNs provide secure communication channels over the public internet by using encryption and tunneling.
- Understanding network devices like switches, routers, and the concepts of LANs and WANs is crucial for comprehending internet functionality.
- Security is a critical consideration, with LANs generally being more secure than WANs due to their private nature.
Key terms
Local Area Network (LAN)SwitchRouterPacketInternet Service Provider (ISP)Wide Area Network (WAN)Virtual Private Network (VPN)TunnelingEncryptionServerFiber Optic CableCopper Cable
Test your understanding
- What is the primary function of a switch in a network?
- How does a router differ from a switch in terms of network connectivity?
- Explain why data is broken down into packets before being sent over the internet.
- What is the role of undersea cables in global internet connectivity, and what are the risks associated with them?
- How does a VPN enhance security for data transmitted over the internet?
- What does it mean for a computer to be 'connected to the internet' from a packet-transmission perspective?
- Why is a LAN generally considered more secure than a WAN?