[00:00] Everyone know how a cat video travels from a server to your smartphone in seconds? Or how millions can watch a live sports event online simultaneously? That's the Internet, a global system of interconnected networks. [00:13] It's changed our world, but how does it actually work? From protocols to packets, let's dive into the inner workings of the Internet. The evolution of the Internet is a fascinating journey spanning several decades. It started with the OperaNet in the late 1960s, a project funded by the U.S. Department of Defense. [00:30] This was followed by the development of TCPIP in the 1970s, which laid the foundation for modern Internet. The birth of the World Wide Web in 1989 revolutionized how we access and share information. [00:43] The 2000s saw the rise of social media and mobile Internet, transforming how we connect with each other. Today, we are witnessing the expansion of the Internet of Things and 5G networks, pushing the boundaries of what's possible in an interconnected world. [00:57] Now let's break down the key components of the Internet. We'll start with the network edge. The network edge consists of N systems, also called hosts. These are the devices connected to the internet. They include desktop computers, servers, mobile devices, and an increasing number of IoT devices like smart home appliances. [01:16] Hosts are sometimes divided into two categories, client and servers. Clients are typically personal devices like PC and smartphones. Servers are usually more powerful machines that store and distribute webpages, stream [01:29] video, relay email, and provide similar services. Today, most of the servers providing search results, email, webpages, and videos reside in large data centers. These data centers can house thousands of interconnected servers, forming the backbone [01:45] of many internet services we use daily. Next, let's look at access networks. They specifically connect end systems to the first router on a path to other distance end systems. There are three main types of access networks. [01:59] First, we have home access networks. These enable connectivities within a residential environment. They typically use technology like DSL, cable internet, or fiber optic connections to bring homes to the broader internet. [02:13] Then there are institutional access networks used by organizations and businesses These are designed to handle the specific needs and requirements of large operations They often use high fiber connections and complex network architectures [02:27] to support many users and data-intensive applications. Finally, we have mobile access networks, which enable our smartphones to connect to the Internet. These are cellular technologies like 5G to provide wireless Internet access. [02:41] The evolution of mobile networks has dramatically changed how we access and use the Internet, making it possible to stay connected almost anywhere. Now let's dive into the network core. [02:53] This is the mass of packet routers and links that interconnect the Internet's end systems. At the heart of the network cores are routers, specialized devices that direct packets from one network to another. These routers handle the task of packet forwarding, which ensures data reaches its intended destination efficiently. [03:11] The network course operates based on the principle of packet switching. But what exactly does that mean? Let's break it down. When you send an email or load a webpage, the data doesn't travel as a single continuous stream. [03:24] Instead, it's broken down into smaller chunks called packets. Each packet contains a portion of the data along the information about its source and destination. These packets are then sent independently through the network. [03:37] They may take different routes and arrive at different times. Once all the packets reach the destination, they are reassembled into the original message. This method has several advantages. It allows the network to handle multiple communications simultaneously, making efficient use of the available bandwidth. [03:55] It also provides resilience. If one route is congested or fails, packets can be rerouted through different paths. There are two key functions performed inside the network core, forwarding and routing. [04:08] Forwarding is the local action of moving an arriving packet from the router's input link to the appropriate router output link. It's controlled by a forwarding table inside each router. When a packet arrives, the router examines the packet's destination address and uses its forwarding table to determine which output link to send the packet to. [04:28] Routing on the other hand is the global process of determining the full paths packets take from source to destination Internet routing algorithms compute the shortest and most efficient paths between any two points on a global network These algorithms take into [04:44] account factors like network topology, traffic conditions, and link capacity to make routing decisions. One of the most important routing protocols on the internet is BGP. BGP is used [04:56] to exchange routing information between different autonomous systems, large networks or groups of networks, typically managed by ISPs or large organizations. In essence, BGP allows each AS to announce which IP address ranges it can reach, and [05:11] this information propagates across the Internet. BGP routers use this data to make routing decisions, choosing the best path for data to travel across multiple autonomous systems. [05:23] The routing process is dynamic and adaptive. If a link fails or becomes congested, routing algorithms can quickly recalculate paths to to ensure data continues to flow efficiently across the network. [05:35] All activity on the Internet involving communications between network devices is governed by protocols. Protocols are standard rules that define message formats, ordering of message exchanges, and expected responses. [05:47] They are like the language and grammar of the Internet to ensure that different devices and systems can understand each other. Some common protocols include TCP, UDP, IP, and HTTP. [05:59] These serve a specific purpose within the network. For example, TCP ensures reliable order delivery of data between applications. It handles things like booking data into packets, acknowledging received packets, and retransmitting lost packets. [06:15] IP, on the other hand, is responsible for addressing and routing packets across the Internet. Every device connected to the Internet has an IP address, which acts like a postal address for data packets. HTTP is a protocol that powers the World Wide Web, defining how messages are formatted and transmitted between web browsers and servers. [06:35] When you type a URL into your browser, you are eventually sending an HTTP request to a web server. These protocols and many others work together to enable the complex interactions that occur every time you send an email stream a video or browse a website Now let talk about the Internet Protocol Stack also known as the TCPIP stack It is a conceptual framework that standardizes the protocols used for communication over the Internet [07:02] The TCPIP stack typically consists of four layers. At the top, we have the application layer. This layer is closest to the end user and interacts directly with software applications. Protocols in this layer include HTTP for web browsing, SMTP for email, and FTP for file transfers. [07:20] below that is the transport layer. It ensures reliable data transfers between applications. The two main protocols in this layer are TCP and UDP. TCP provides reliable order delivery of data, while UDP offers faster but less reliable transmission. [07:38] Next comes the network layer, also known as the IP layer. This handles the addressing and routing of data packets across different networks. The main protocols here are IPv4 and IPv6, which define how data should be packetized, [07:53] addressed, transmitted, routed, and received. At the bottom, we have the link layer. It manages the physical connection between devices on the same network segment. This layer deals with the hardware aspects of network communication, including network [08:08] interface cards and device drivers. These layers work together to enable communication across networks. When you send data, it starts at the application layer and moves down through each layer. [08:20] Each layer adds its own information to the data, a process called encapsulation. When the data reaches its destination, it moves up through the layers, with each layer stripping off its information, a process called decapsulation. [08:34] This layered approach makes the Internet incredibly flexible and robust and allows different technologies to be used at different layers without affecting the others. For example, you can switch from a wired to wireless connection, which is a change of [08:47] the link layer, without affecting how your web browser works at the application layer. That's our crash course in networking, from packets to protocols. We've just zoomed through the basics of how the internet works. If you enjoy our videos, we would love a System Design Newsletter. [09:02] We cover important topics and trends in large-scale system design. Join 1 million subscribers from the tech industry. Subscribe at blog.bybiko.com.