<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ internet - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ internet - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Thu, 21 May 2026 16:11:19 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/internet/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How DNS Works: A Guide to Understanding the Internet's Address Book ]]>
                </title>
                <description>
                    <![CDATA[ The Domain Name System (DNS) translates domain names (like example.com) into IP addresses (like 192.0.2.1) so we can easily access websites. In this guide, you’ll learn how DNS resolution starts, its step-by-step process, how caching works, and the r... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-dns-works-the-internets-address-book/</link>
                <guid isPermaLink="false">6824f1ac04a60b4a58654ddc</guid>
                
                    <category>
                        <![CDATA[ dns ]]>
                    </category>
                
                    <category>
                        <![CDATA[ dns resolver ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Domain Name System ]]>
                    </category>
                
                    <category>
                        <![CDATA[ dns server ]]>
                    </category>
                
                    <category>
                        <![CDATA[ internet ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Dhruv Prajapati ]]>
                </dc:creator>
                <pubDate>Wed, 14 May 2025 19:40:28 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1747235471002/8fbe4d7e-f1cb-4faf-a6a5-8dcaf38d58f3.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>The Domain Name System (DNS) translates domain names (like <code>example.com</code>) into IP addresses (like <code>192.0.2.1</code>) so we can easily access websites. In this guide, you’ll learn how DNS resolution starts, its step-by-step process, how caching works, and the role of root, TLD, and authoritative name servers.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ul>
<li><p><a class="post-section-overview" href="#heading-table-of-contents">Table of Contents</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-the-dns-resolution-process">The DNS Resolution Process</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-finding-the-first-dns-server-defaults-dhcp-and-manual-settings">Finding the First DNS Server: Defaults, DHCP, and Manual Settings</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-dns-resolution-powers-your-applications-network-requests">How DNS Resolution Powers Your Application’s Network Requests</a></p>
<ul>
<li><p><a class="post-section-overview" href="#heading-1-valid-ip-check">Valid IP Check</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-2-application-cache-lookup">Application Cache Lookup</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-3-operating-system-cache-check">Operating System Cache Check</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-4-forwarding-to-configured-dns-server">Forwarding to Configured DNS Server</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-5-recursive-resolution-across-servers">Recursive Resolution Across Servers</a></p>
</li>
</ul>
</li>
<li><p><a class="post-section-overview" href="#heading-understanding-the-role-of-the-recursive-resolver">Understanding the Role of the Recursive Resolver</a></p>
<ul>
<li><p><a class="post-section-overview" href="#heading-recursive-resolver-and-root-name-server-interaction">Recursive Resolver and Root Name Server Interaction</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-recursive-resolver-and-tld-server-interaction">Recursive Resolver and TLD Server Interaction</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-recursive-resolver-and-authoritative-name-server-interaction">Recursive Resolver and Authoritative Name Server Interaction</a></p>
</li>
</ul>
</li>
<li><p><a class="post-section-overview" href="#heading-domain-registrars-and-dns-setup-for-new-domains">Domain Registrars and DNS Setup for New Domains</a></p>
<ul>
<li><p><a class="post-section-overview" href="#heading-what-are-domain-registrars">What Are Domain Registrars?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-what-happens-in-the-dns-system-when-you-buy-a-new-domain">What Happens in the DNS System When You Buy a New Domain?</a></p>
</li>
</ul>
</li>
<li><p><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></p>
</li>
</ul>
<h2 id="heading-the-dns-resolution-process">The DNS Resolution Process</h2>
<p>When you type a domain name like <code>example.com</code> into your browser, it loads the website almost instantly. So how does it do this?</p>
<p>Well, DNS resolution makes it happen, acting like the internet’s GPS to turn that name into an IP address (such as <code>192.0.2.1</code>) that computers use to find servers.</p>
<p>DNS resolution works by sending a query through a chain of DNS servers, each one helping to pinpoint the exact address. This process starts with a crucial step: your device needs to know which DNS server to contact first, either one set automatically or one chosen for speed and reliability.</p>
<h2 id="heading-finding-the-first-dns-server-defaults-dhcp-and-manual-settings">Finding the First DNS Server: Defaults, DHCP, and Manual Settings</h2>
<p>For DNS to function, a device must know the IP address of at least one DNS server. This is achieved through <strong>preconfigured settings</strong>, <strong>automatic configuration via DHCP</strong>, and <strong>manual configuration</strong>.</p>
<p>Devices like routers, smartphones, and computers often ship with hardcoded DNS server IPs. Common examples include Google Public DNS (<code>8.8.8.8</code>, <code>8.8.4.4</code>) and Cloudflare DNS (<code>1.1.1.1</code>). These serve as default starting points for DNS queries.</p>
<p>Also, when a device connects to a network (for example, home Wi-Fi), a Dynamic Host Configuration Protocol (DHCP) server – typically on the router – assigns an IP address and DNS server addresses. These are often provided by the Internet Service Provider (ISP), such as Comcast’s <code>75.75.75.75</code>, but can be overridden with alternatives like OpenDNS (<code>208.67.222.222</code>) or Quad9 (<code>9.9.9.9</code>).</p>
<p>Advanced users can manually specify DNS servers. Public DNS providers use memorable IP addresses for simplicity, such as Google’s <code>8.8.8.8</code> (repeating digits), Cloudflare’s <code>1.1.1.1</code> (short sequence), or Quad9’s <code>9.9.9.9</code> (repeating digits).</p>
<p>This design ensures seamless operation for most users, with DHCP and default configurations, while allowing power users to choose faster or privacy-focused DNS services.</p>
<h2 id="heading-how-dns-resolution-powers-your-applications-network-requests">How DNS Resolution Powers Your Application’s Network Requests</h2>
<p>When an application, like a web browser or a backend service, wants to make a network call – such as an HTTP request to load a webpage, a gRPC call for microservice communication, or an API fetch to retrieve data – it triggers a series of checks and queries to translate a domain name into an IP address. This process is designed for efficiency, leveraging caches and a distributed network of servers to handle the internet’s massive scale.</p>
<h3 id="heading-1-valid-ip-check"><strong>1. Valid IP Check</strong></h3>
<p>The process begins by checking if the destination address is already a valid IP address, like <code>192.168.1.1</code>. The system uses a regex check to confirm this. If it’s a valid IP, no DNS resolution is needed, and the network call proceeds directly.</p>
<p><strong>Note</strong> that in rare cases, DNS resolution is skipped entirely if an IP address is used directly. For example, a user might manually type an IP, like 192.0.2.1, into a browser instead of a domain name, though this is unlikely since IP addresses are hard to remember compared to names like example.com.</p>
<p>Similarly, some applications make network calls using IP addresses directly, bypassing the need for DNS. While possible, these scenarios are uncommon due to the convenience of human-readable domain names.</p>
<h3 id="heading-2-application-cache-lookup"><strong>2. Application Cache Lookup</strong></h3>
<p>If the destination address is a domain name, such as <code>example.com</code>, the application checks its own DNS cache, if it has one.</p>
<p>Modern browsers like Chrome and Firefox maintain built-in caches to speed up browsing. If the domain-to-IP mapping is found here, the process stops, and the IP is used for the network call.</p>
<h3 id="heading-3-operating-system-cache-check"><strong>3. Operating System Cache Check</strong></h3>
<p>If the application cache lacks the mapping or the application doesn’t have a caching mechanism at all, the request moves to the operating system’s DNS client, also known as the Local Resolver.</p>
<p>This varies by OS:</p>
<ul>
<li><p>Windows uses <a target="_blank" href="https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn593685\(v=ws.11\)">dnscache</a></p>
</li>
<li><p>macOS uses <a target="_blank" href="https://manp.gs/mac/8/mDNSResponder">mDNSResponder</a></p>
</li>
<li><p>Linux uses the <a target="_blank" href="https://www.man7.org/linux/man-pages/man5/nsswitch.conf.5.html">Name Switch Service</a></p>
</li>
</ul>
<p>The DNS client checks two places: the OS-level DNS cache, which stores recent domain-to-IP mappings, and the hosts file, a local file that manually maps domains to IPs (for example, <code>127.0.0.1 localhost</code>). If the mapping is found in either place, the process stops here.</p>
<h3 id="heading-4-forwarding-to-configured-dns-server"><strong>4. Forwarding to Configured DNS Server</strong></h3>
<p>If the mapping remains unresolved, the DNS client sends the query to a configured DNS server, such as the ISP’s server or a public one like Google DNS (<code>8.8.8.8</code>) or Cloudflare DNS (<code>1.1.1.1</code>). This server is a complex system with its own caches and a Recursive Resolver Service, like <a target="_blank" href="https://www.isc.org/bind/">BIND</a> or <a target="_blank" href="https://www.nlnetlabs.nl/projects/unbound/about/#:~:text=Unbound%20is%20a%20validating%2C%20recursive%2C%20caching%20DNS%20resolver.,DNS-over-HTTPS%20which%20allows%20clients%20to%20encrypt%20their%20communication.">Unbound</a>, which takes over the query.</p>
<h4 id="heading-caching-techniques">Caching techniques</h4>
<p>Caching, especially in recursive resolvers, stores query results to minimize redundant lookups and speed up responses for users:</p>
<ul>
<li><p><strong>Recursive resolver cache</strong>: Stores query results from root, TLD, and authoritative name servers in recursive resolvers to speed up responses.</p>
</li>
<li><p><strong>Negative cache</strong>: Stores responses for non-existent domains or records to avoid repeated queries.</p>
</li>
<li><p><strong>Forwarded query cache</strong>: Stores responses from queries forwarded to other resolvers or DNS servers to enhance performance.</p>
</li>
</ul>
<p>These caching mechanisms minimize external lookups (<a target="_blank" href="https://datatracker.ietf.org/doc/html/rfc1035">RFC 1035</a>).</p>
<h3 id="heading-5-recursive-resolution-across-servers"><strong>5. Recursive Resolution Across Servers</strong></h3>
<p>The recursive resolver, a core component of a DNS server, is responsible for performing recursive resolution to translate domain names like <code>example.com</code> into IP addresses.</p>
<p>As DNS records are distributed across multiple servers, the resolver parses the domain and executes a series of queries:</p>
<ol>
<li><p>It contacts a root name server, which directs it to the top-level domain (TLD) server (for example, for .com).</p>
</li>
<li><p>The TLD server points to the authoritative name server for the specific domain.</p>
</li>
<li><p>The authoritative server provides the final IP address.</p>
</li>
</ol>
<p>This distributed approach ensures scalability and reliability (<a target="_blank" href="https://datatracker.ietf.org/doc/html/rfc1035">RFC 1035</a>).</p>
<h2 id="heading-understanding-the-role-of-the-recursive-resolver">Understanding the Role of the Recursive Resolver</h2>
<p>The recursive resolver is the engine behind DNS resolution, working to convert a domain name like example.com into an IP address. Its journey begins by querying a root name server, the first step in navigating the DNS hierarchy to find the correct address.</p>
<h3 id="heading-recursive-resolver-and-root-name-server-interaction">Recursive Resolver and Root Name Server Interaction</h3>
<p>To understand this interaction, let’s first explore what root name servers are and their role in DNS.</p>
<h4 id="heading-exploring-root-name-servers">Exploring Root Name Servers</h4>
<p>Root name servers form the foundation of the DNS hierarchy, responding to queries for top-level domain (TLD) records to initiate resolution. They direct recursive resolvers to TLD servers, enabling the lookup of domain IP addresses.</p>
<ul>
<li><p>There are <strong>13 root server clusters</strong>, named a.root-servers.net to m.root-servers.net, operated by 12 organizations (VeriSign manages two). These clusters distribute global DNS query loads. As of May 10, 2025, 1,936 anycast instances ensure high availability and scalability, handling billions of daily queries (Root Server Technical Operations Association).</p>
</li>
<li><p>Each cluster uses <strong>anycast routing</strong>, sharing a single IP address across multiple global servers. Queries are routed to the nearest or least-loaded instance, reducing latency, enhancing reliability, and providing redundancy if a server fails.</p>
</li>
<li><p>The <strong>root hints file</strong>, provided by ICANN (<a target="_blank" href="https://www.iana.org/domains/root/files">IANA</a>), lists root server IP addresses and is preloaded in resolvers. It enables initial DNS queries without needing to resolve root server domains, preventing circular dependencies and ensuring system stability.</p>
</li>
</ul>
<p>The DNS began with just two root name servers in 1983. As the internet grew, more servers were added to meet demand. By 2002, the number reached 13, and anycast routing was proposed, allowing multiple servers to operate as a single cluster under one IP address.</p>
<p>Since then, the DNS has scaled by expanding these 13 clusters to handle global requirements (<a target="_blank" href="https://datatracker.ietf.org/doc/html/rfc882">RFC 882</a>, <a target="_blank" href="https://www.netnod.se/">Netnod</a>). For a detailed history, see the <a target="_blank" href="https://dnsinstitute.com/dns-history/dns-root-hints-history/">DNS Institute’s archive</a> and <a target="_blank" href="https://icannwiki.org/History_of_ROOT-SERVERS">History of ROOT-SERVERS</a>..</p>
<h4 id="heading-how-recursive-resolvers-query-root-name-servers">How Recursive Resolvers Query Root Name Servers</h4>
<p>The recursive resolver initiates resolution by querying a root name server for TLD records, relying on several mechanisms to ensure accuracy and efficiency.</p>
<ul>
<li>It uses the <strong>root hints file</strong>, ICANN’s list of root server IP addresses hardcoded in resolvers (for example, BIND), to avoid circular dependencies.</li>
</ul>
<ul>
<li><p><strong>Priming queries</strong> fetch updated root server IPs on resolver startup or cache expiry, ensuring reliability (RFC 8109).</p>
</li>
<li><p>The <strong>root zone file</strong>, ICANN’s database of TLDs and their name servers, is used by root servers to respond with TLD details (<a target="_blank" href="https://www.iana.org/domains/root/files">IANA</a>).</p>
</li>
</ul>
<p>When querying, the resolver selects a root server and requests TLD records (for example, for <code>.com</code>). The response includes <strong>NS</strong> records (for example, <code>a.gtld-servers.net</code> for <code>.com</code>) and <strong>glue records</strong>, which are IP address records (<strong>A</strong> or <strong>AAAA</strong>) providing the TLD name servers’ IPs directly.</p>
<p>Glue records are critical when the requested name servers’ domains are within the queried domain (for example, <code>ns1.example.com</code> for <code>example.com</code>), preventing circular dependency by supplying the IP without resolving the domain.</p>
<p>For TLD queries, glue records are always included, speeding up resolution by avoiding additional lookups for TLD name server domains like <code>a.gtld-servers.net</code>, especially for busy TLDs like <code>.com</code> (<a target="_blank" href="https://datatracker.ietf.org/doc/html/rfc1035">RFC 1035</a>).</p>
<h3 id="heading-recursive-resolver-and-tld-server-interaction">Recursive Resolver and TLD Server Interaction</h3>
<p>Once the recursive resolver receives the root server’s response, including glue records, it queries a TLD name server (for example, <code>a.gtld-servers.net</code> for <code>.com</code>). TLD name servers maintain <strong>zone files</strong> listing domains under their TLD (for example, <code>example.com</code>) and their name servers.</p>
<p>The TLD server responds with a referral, providing the authoritative name server records (for example, <code>ns1.example.com</code> for <code>example.com</code>). If the authoritative server’s domain is within the requested domain (for example, <code>ns1.example.com</code>), glue records are included to provide the IP directly, preventing circular dependency.</p>
<p>The resolver caches the response based on its TTL to speed up future queries. If the TLD server is unreachable, the resolver tries another TLD server from the root’s response (<a target="_blank" href="https://datatracker.ietf.org/doc/html/rfc1035">RFC 1035</a>).</p>
<h3 id="heading-recursive-resolver-and-authoritative-name-server-interaction">Recursive Resolver and Authoritative Name Server Interaction</h3>
<ul>
<li><p>The recursive resolver then queries the authoritative name server (for example, <code>ns1.example.com</code>), which maintains zone files with DNS records like <strong>A</strong>, <strong>CNAME</strong>, or <strong>MX</strong> for its domain (for example, <code>example.com</code>).</p>
</li>
<li><p>The server returns the requested record, such as an A record (for example, <code>192.0.2.1</code>), AAAA, CNAME, or MX, depending on the query.</p>
</li>
<li><p>Glue records from the TLD response provide the server’s IP if within the domain, avoiding circular dependency.</p>
</li>
<li><p>The resolver caches the response based on TTL for efficiency. In rare cases, the server may delegate to another authoritative server (for example, for subdomains), requiring further queries. If unreachable, the resolver tries another authoritative server (<a target="_blank" href="https://datatracker.ietf.org/doc/html/rfc1035">RFC 1035</a>).</p>
</li>
</ul>
<p>Traditionally, zone files for Root, TLD, and Authoritative name servers were text files listing domains and their DNS records, guiding queries across the DNS hierarchy.</p>
<p>Modern DNS infrastructure has replaced these with efficient databases or in-memory databases, using optimized data structures like hash tables or tries for faster lookups and scalability. This shift supports the growing number of TLDs and high query volumes across all server types.</p>
<p>Similarly, the anycast routing proposal, introduced to enhance speed and reliability by distributing server instances globally, was designed for all name servers – Root, TLD, and Authoritative.</p>
<p>While root name servers universally adopt anycast, ensuring low latency and redundancy, not all TLD and authoritative name servers strictly follow it.</p>
<p>Some TLDs and smaller authoritative servers rely on unicast or limited anycast due to cost or operational constraints, leading to varied performance across the DNS hierarchy.</p>
<p>The following diagram illustrates the complete Domain Name Resolution process, summarizing the steps outlined above.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746995157651/f0f9913b-a23a-4654-bea5-c9d8a8e4f7ca.png" alt="DNS Resolution System Diagram" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>The following image shows the <code>dig +trace google.com</code> output, demonstrating the resolution process from root to authoritative name servers:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1747000331356/8735cac3-5a22-48c2-9691-62ed6d8fb885.png" alt="DNS Resolution Process in Action using dig tool" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<h2 id="heading-domain-registrars-and-dns-setup-for-new-domains">Domain Registrars and DNS Setup for New Domains</h2>
<h3 id="heading-what-are-domain-registrars">What Are Domain Registrars?</h3>
<p>Domain registrars were originally established to manage the registration of domain names, allowing individuals and organizations to secure unique names (for example, <code>example.com</code>) for websites and online services. They act as intermediaries between domain owners and domain registries, which maintain the authoritative databases for top-level domains (TLDs) like <code>.com</code> or <code>.org</code>.</p>
<p>Registrars handle tasks such as registering domains, renewing them, and updating DNS settings, ensuring seamless integration with the global DNS system. Many registrars also offer additional services like web hosting and SSL certificates to support website operations.</p>
<p>GoDaddy and Hostinger are among many registrars, known for their user-friendly platforms and comprehensive service offerings.</p>
<h3 id="heading-what-happens-in-the-dns-system-when-you-buy-a-new-domain">What Happens in the DNS System When You Buy a New Domain?</h3>
<p>When you purchase a new domain (like <code>example.com</code>) through a registrar like GoDaddy or Hostinger, the following steps occur in the DNS system:</p>
<ul>
<li><p><strong>Step 1: Registration with the registry</strong> – The registrar sends your domain details to the registry for the TLD (for example, VeriSign for <code>.com</code>). The registry adds the domain to its database, recording the registrar as the managing entity and the authoritative name servers (for example, <code>ns1.example.com</code>) you specify.</p>
</li>
<li><p><strong>Step 2: Name server configuration</strong> – You configure the domain’s name servers at the registrar’s control panel (for example, GoDaddy’s Domain Portfolio or Hostinger’s hPanel). These name servers, often provided by the registrar or hosting provider (for example, <code>ns1.hostinger.com</code>), point to the DNS zone file that contains DNS records for your domain.</p>
</li>
<li><p><strong>Step 3: DNS zone setup</strong> – The DNS zone file, managed where the name servers point, is updated with DNS records like:</p>
<ul>
<li><p><strong>A record</strong>: Maps the domain (for example, <code>example.com</code>) to the hosting server’s IP address (for example, <code>192.0.2.1</code>).</p>
</li>
<li><p><strong>CNAME record</strong>: Aliases subdomains (for example, <code>www.example.com</code>) to another domain.</p>
</li>
<li><p><strong>MX record</strong>: Directs email to mail servers.</p>
</li>
</ul>
</li>
</ul>
<p>    If using the registrar’s hosting, these records may be set automatically. Otherwise, you manually configure them to point to your hosting provider’s IP.</p>
<ul>
<li><p><strong>Step 4: DNS propagation</strong> – After updating name servers or DNS records, changes propagate across the global DNS network, which can take 24–48 hours due to caching and server updates. During this period, your website may not be immediately accessible.</p>
</li>
<li><p><strong>Step 5: TLD registry update</strong> – The registry updates its records to include the domain’s name servers, which are queried by recursive resolvers during DNS lookups. For domains with name servers in the same domain (for example, <code>ns1.example.com</code> for <code>example.com</code>), glue records (IP addresses of the name servers) are registered with the registry to prevent circular dependencies.</p>
</li>
</ul>
<h2 id="heading-conclusion">Conclusion</h2>
<p>The Domain Name System (DNS) translates domain names into IP addresses, making the internet user-friendly. It resolves queries efficiently through a hierarchical system and caching, evolving from a few root servers in 1983 to a scalable, anycast-driven network today.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What Happens When You Visit a Website? How the Web Works Explained ]]>
                </title>
                <description>
                    <![CDATA[ In this article, I’ll guide you through an overview of what happens when you navigate to a website using your browser. Whether you’re new to web development or have some experience, this post will help you gain a better understanding of how the web a... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-happens-when-you-visit-a-website/</link>
                <guid isPermaLink="false">67378578138bc8b1c027a1e8</guid>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ internet ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Viviana Yanez ]]>
                </dc:creator>
                <pubDate>Fri, 15 Nov 2024 17:31:36 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1731682843488/32065460-190d-472f-9268-5b181430eef6.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>In this article, I’ll guide you through an overview of what happens when you navigate to a website using your browser.</p>
<p>Whether you’re new to web development or have some experience, this post will help you gain a better understanding of how the web and its core technologies work.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ul>
<li><p><a class="post-section-overview" href="#heading-finding-a-resource-urls">Finding a Resource: URLs</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-matching-ips-and-urls-dns-resolution">Matching IPs and URLs: DNS Resolution</a></p>
<ul>
<li><p><a class="post-section-overview" href="#heading-what-is-the-dns-resolver">What is the DNS Resolver?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-what-is-the-root-dns-server">What is the Root DNS Server?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-what-is-the-top-level-domain-server">What is the Top Level Domain Server?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-authoritative-nameserver">Authoritative Nameserver</a></p>
</li>
</ul>
</li>
<li><p><a class="post-section-overview" href="#heading-establishing-a-connection-tcpip-model">Establishing a Connection: TCP/IP Model</a></p>
<ul>
<li><p><a class="post-section-overview" href="#heading-how-does-tcp-connection-work">How Does TCP Connection Work?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-tcp-three-way-handshake">TCP Three-way Handshake</a></p>
</li>
</ul>
</li>
<li><p><a class="post-section-overview" href="#heading-starting-the-exchange-client-server-communication">Starting the Exchange: Client-Server Communication</a></p>
<ul>
<li><p><a class="post-section-overview" href="#heading-what-is-the-http-protocol">What is the HTTP Protocol?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-http-requestresponse">HTTP Request/Response</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-https">HTTPS</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-time-to-first-byte">Time to First Byte</a></p>
</li>
</ul>
</li>
<li><p><a class="post-section-overview" href="#heading-from-data-to-pixels-the-critical-rendering-path">From Data to Pixels: The Critical Rendering Path</a></p>
<ul>
<li><p><a class="post-section-overview" href="#heading-building-the-dom-tree">Building the DOM tree</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-building-the-cssom-tree">Building the CSSOM Tree</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-javascript-compilation-and-execution">Javascript Compilation and Execution</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-building-the-accessibility-tree">Building the Accessibility Tree</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-render-tree">Render tree</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-layout">Layout</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-painting">Painting</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-a-note-about-javascript-hydration">A Note About JavaScript Hydration</a></p>
</li>
</ul>
</li>
<li><p><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></p>
</li>
</ul>
<p>Before going into the details of every step included in the process, let's review some of the basic concepts we’ll be covering.</p>
<p>The internet is a huge network of interconnected computers. The World Wide Web (aka web) is built on top of that technology, as well as other services such as email, chat systems or file sharing, and so on.</p>
<p>Computers connected to the internet are either:</p>
<ul>
<li><p><strong>Clients</strong>, the web user's devices and the software that those devices use to access the web.</p>
</li>
<li><p><strong>Servers</strong>, computers that store web pages, sites, or apps and the files they need to be displayed in the user's web browser or devices.</p>
</li>
</ul>
<h2 id="heading-finding-a-resource-urls">Finding a Resource: URLs</h2>
<p>Each resource stored in a server can be located by clients using its valid associated URL. The following is an example of a valid URL:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1731414821178/970907db-f349-421e-b410-45f4ee978e0b.jpeg" alt="Example of a valid URL, including its scheme, authority, path to resource, two parameters and an anchor." class="image--center mx-auto" width="1200" height="178" loading="lazy"></p>
<p>You may already know what a URL is, but let’s see in detail each one of its parts:</p>
<ul>
<li><p><strong>Scheme</strong>: The first part of an URL indicates the protocol that should be used to retrieve the resource. Websites use the HTTP and the HTTPS protocol, but we’ll see more details about this later. The <code>:</code> after the scheme is what separates it from the next part of the URL.</p>
</li>
<li><p><strong>Authority</strong>: this part is composed by the domain name and the port number separated by a colon. The port is only mandatory when the standard ports of the HTTP protocol (80 for HTTP and 443 for HTTPS) are not being used by the web server. The <code>//</code> before the domain name indicates the beginning of the authority.</p>
</li>
<li><p><strong>Path to resource</strong>: this is the abstract or physical path to the resource in the web server.</p>
</li>
<li><p><strong>Parameters</strong>: a set of key/value pairs that add extra options to apply to the returning the requested resource. They are separated by a <code>&amp;</code> and each web server has its own way to handle parameters. This section starts with <code>?</code>.</p>
</li>
<li><p><strong>Anchor</strong>: This section, if present, starts by a <code>#</code> and is handled by the browser to display a specific part of the returned document. For example, it can point to a specific section in a HTML document.</p>
</li>
</ul>
<p>There are a few things that happen when you type a URL into your browser’s address bar that allow you to navigate to a site and interact with its content. Let’s see each one in detail.</p>
<h2 id="heading-matching-ips-and-urls-dns-resolution">Matching IPs and URLs: DNS Resolution</h2>
<p>While, as humans, we prefer domain names composed of words, computers communicate with each other using IP addresses. IP addresses are composed by numbers and are harder to remember for our human minds. The <a target="_blank" href="https://en.wikipedia.org/wiki/Domain_Name_System">Domain Name System</a> (<strong>DNS</strong>) is what puts together domain names and IP addresses.</p>
<p>When you type a URL, the browser will first look into the local cache to see if the results for the DNS lookup are already stored. Then, it will equally check into the operating system cache.</p>
<p>If there are no results stored, then the browser will call the DNS Resolver to try to find the associated IP address for the domain name.</p>
<h3 id="heading-what-is-the-dns-resolver">What is the DNS Resolver?</h3>
<p>The resolver is typically defined by your internet provider’s DNS, even though that’s the default most people use, and it is possible to change it to Google’s or Cloudflare’s or anything else you want.</p>
<p>Again, the provider’s DNS might have the results for the domain name stored in its cache, if not, it will ask the Root DNS server.</p>
<h3 id="heading-what-is-the-root-dns-server">What is the Root DNS Server?</h3>
<p>The Root DNS server is a system that actually drives the entire internet. It is composed of thirteen servers distributed across the planet. It returns the query from the resolver with the relevant Top Level Domain server for the requested domain name.</p>
<p>At this moment, the DNS resolver will cache the IP of that Top Level Domain server so it doesn’t have to ask the Root DNS server again for it.</p>
<h3 id="heading-what-is-the-top-level-domain-server">What is the Top Level Domain Server?</h3>
<p>The <a target="_blank" href="https://en.wikipedia.org/wiki/Top-level_domain">Top Level Domain</a> (<strong>TLD</strong>) server stores the IP addresses of the authoritative name servers for the domain that the user is looking for.</p>
<p>In the URL, <code>www.exampleurl.com</code>, the top-level domain is <code>.com</code>. There are different types, such as generic top-level domains like <code>.com</code> or <code>.org</code>, country code top-level domains, usually represented by the two letters ISO country code, and more.</p>
<p>The TLD returns the authoritative name servers for the requested domain. One more time, the DNS resolver will cache the results so it doesn’t have to come back later for them.</p>
<h3 id="heading-authoritative-nameserver">Authoritative Nameserver</h3>
<p>This server contains the DNS records that maps domain names to IP addresses. There is more than one name server attached to any domain.</p>
<p>There is no caching involved at this point, because the authoritative nameserver is the highest authority and the latest piece in the DNS resolution chain.</p>
<p>If the IP address is available, the authoritative nameserver responds to the DNS resolver query with the domain name’s IP address. If not available it will respond with an error. Then, the DNS resolver stores the IP and sends it back to the client’s browser.</p>
<p>Once the DNS lookup is completed and the browser has the IP address, it can attempt to establish a connection with the server.</p>
<h2 id="heading-establishing-a-connection-tcpip-model">Establishing a Connection: TCP/IP Model</h2>
<p>The connection between client and server is established using the <a target="_blank" href="https://en.wikipedia.org/wiki/Transmission_Control_Protocol">Transmission Control Protocol</a> (<strong>TCP</strong>) and the <a target="_blank" href="https://en.wikipedia.org/wiki/Internet_Protocol">Internet Protocol</a> (<strong>IP</strong>). These protocols are the main ones behind the World Wide Web and other internet technologies, such as email, and determine how data travels across the network.</p>
<p>The <a target="_blank" href="https://en.wikipedia.org/wiki/Internet_protocol_suite">TCP/IP model</a> is a framework used to organize the different protocols involved in the internet and other network communications. The primary responsibility of TCP/IP is to divide the data into packets and send them to their final destination, ensuring the packets can be put back together on the other end of the communication.</p>
<p>This process follows a four-layer model, where data travels in one direction and then in the reverse direction when it reaches the destination:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1731414848576/178ce64e-2216-487a-b142-c88c2125dcde.jpeg" alt="The four-layer model includes the application layer, the transport layer, the internet layer, and the network layer. Data travels back and forth through these layers." class="image--center mx-auto" width="1062" height="555" loading="lazy"></p>
<p>The transport layer that ensures applications can exchange data by establishing data channels. It is also the layer that establishes the concept of network ports, a system of numbered data channels allocated for the specific communication channels that applications need.</p>
<p>The TCP/IP model’s transport layer includes two protocols that are most commonly used on the internet: the TCP and the <a target="_blank" href="https://en.wikipedia.org/wiki/User_Datagram_Protocol">User Datagram Protocol</a> (UDP).</p>
<p>TCP includes some capabilities that make it prevalent over most of the internet-based applications such as the web, so let’s focus on it.</p>
<h3 id="heading-how-does-tcp-connection-work">How Does TCP Connection Work?</h3>
<p>TCP allows data to be transferred reliably and in order to its destination. It is a connection-oriented protocol, that means that the sender and the receiver must agree on connection parameters before actually establishing the connection. This process is known as the handshake procedure.</p>
<h3 id="heading-tcp-three-way-handshake">TCP Three-way Handshake</h3>
<p>The handshake is a way for the client and the server to establish a secure connection and ensure that both parties are synchronized and ready to start exchanging messages.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1731414866173/6d66c360-2d2e-427b-8c8d-1555fdaa7197.jpeg" alt="The three steps of the TCP handshake." class="image--center mx-auto" width="904" height="604" loading="lazy"></p>
<p>The three steps of the TCP handshake include:</p>
<ol>
<li><p>The client informs the server that it wants to establish a connection by sending a SYN (synchronize) packet. This packet specifies a sequence number that subsequent segments will start with.</p>
</li>
<li><p>The server receives the SYN and responds with a SYN-ACK (synchronize-acknowledgment) segment. It includes the server’s sequence number and an acknowledgment of the client’s sequence number, incremented by one.</p>
</li>
<li><p>The client responds with an ACK message, acknowledging the server’s sequence number. At this point, the connection has been established.</p>
</li>
</ol>
<h2 id="heading-starting-the-exchange-client-server-communication">Starting the Exchange: Client-Server Communication</h2>
<p>Once the TCP connection is established, the client and server can start exchanging messages using the HTTP protocol.</p>
<h3 id="heading-what-is-the-http-protocol">What is the HTTP Protocol?</h3>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/HTTP">Hypertext Transfer Protocol</a> (<strong>HTTP</strong>) is the most widely used application layer protocol in the TCP/IP suite, but it’s considered insecure, leading to a shift towards HTTPS, which uses TLS on top of TCP for data encryption. You see find more details about this later.</p>
<p>The browser will start by sending an HTTP request message to the server, asking for a copy of the site in the form of an HTML file. HTTP protocol can transfer files like HTML, CSS, JS, SVG, and so on.</p>
<h3 id="heading-http-requestresponse">HTTP Request/Response</h3>
<p>There are two types of HTTP messages:</p>
<ul>
<li><p><strong>Requests</strong>, sent by the client to the server to trigger an action.</p>
</li>
<li><p><strong>Responses</strong>, sent from the server to the client as an answer to the previous request.</p>
</li>
</ul>
<p>Messages are plain text documents, structured in a precise way determined by the communication protocol, in this case, HTTP.</p>
<p>The three parts included in a <strong>HTTP request</strong> are:</p>
<ol>
<li><p><strong>Request line</strong>: Includes the request method, which is a verb defining the action to perform. In the case we are covering in this blogpost, the browser will make a GET request to fetch a page from the server. The request line will also include the resource location, in this case an URL, and the protocol version being used.</p>
</li>
<li><p><strong>Request header</strong>: A set of key value pairs. Two of them are mandatory. <code>Host</code> indicates the domain name to target, and <code>Connection</code> which is always set to close unless it must be kept open. The request header always ends with a blank line.</p>
</li>
<li><p><strong>Request body</strong>: Is an optional field that allows sending data over the server.</p>
</li>
</ol>
<p>The server will reply to the request with an HTTP response. Responses include information about the request status and may include the requested resource or data.</p>
<p>HTTP responses are structured in the following parts:</p>
<ol>
<li><p><strong>Status line</strong>: Includes the used protocol version, a status code and a status text, with a human readable description of the status code.</p>
</li>
<li><p><strong>Headers</strong>: A set of key-value pairs that can either be general headers, applying to the whole message; response headers, giving additional information about the server status; or representation headers, describing the format and encoding for the message data if present.</p>
</li>
<li><p><strong>Body</strong>: Contains the requested data or resource. If no data or resource is expected by the client, the response usually won’t include a body.</p>
</li>
</ol>
<p>When the request for a web page is approved by the server, the response will include a <code>200 OK</code> message. Other existing HTTP response codes are:</p>
<ul>
<li><p>404 Not Found</p>
</li>
<li><p>403 Forbidden</p>
</li>
<li><p>301 Moved Permanently</p>
</li>
<li><p>500 Internal Server Error</p>
</li>
<li><p>304 Not Modified</p>
</li>
<li><p>401 Unauthorized</p>
</li>
</ul>
<p>The response will also contain a list of HTTP headers and the response body, including the corresponding HTML code for the requested page.</p>
<h3 id="heading-https">HTTPS</h3>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/HTTPS">Hypertext Transfer Protocol Secure</a> (<strong>HTTPS</strong>) is not a different protocol, but an extension of the HTTP. It is usually referred to as HTTP over Transport Layer Security (<strong>TLS</strong>). Let’s see what it exactly means.</p>
<p>HTTP is the protocol used for most communications between browsers and servers, but it lacks security. Any data sent over HTTP can potentially be visible to anyone on the network. This is especially risky when sensitive data is involved in the connection, such as login credentials, financial information, health information, and so on.</p>
<p>The main motivation behind HTTPS is to ensure data privacy, integrity, and identification. This means ensuring that data is only accessible to whom it is supposed to be and cannot be intercepted or modified by anyone in between. Also, that both sender and receiver can be identified as who they claim to be by a legitimate authority.</p>
<p>In HTTPS the communications are encrypted using the TLS protocol, which relies on asymmetric public key infrastructure. It combines two keys: one public and one private. The server shares its public key so the client can use it to encrypt messages that can only be decrypted by the server’s private key.</p>
<p>To establish an encrypted communication, the client and the server have to initiate another handshake. During the handshake, they agree on the TLS version to use and on how they will encrypt data and authenticate each other during the connection, a set of rules known as the cipher suite.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1731414891509/541f6b6c-ad54-4301-834a-1056aea524c0.jpeg" alt="Steps in the SSL Handshake." class="image--center mx-auto" width="1171" height="1177" loading="lazy"></p>
<p>This handshake or TLS negotiation starts once a TCP connection has been established, and includes the following steps:</p>
<ul>
<li><p><strong>Client hello</strong>: The browser sends a hello message that includes all supported TLS versions and cipher suites.</p>
</li>
<li><p><strong>Server Hello</strong>: The server responds with the chosen cipher suite and TLS version, along with its SSL certificate containing the server's public key.</p>
</li>
<li><p><strong>Authentication and Pre-Master Key</strong>: The client verifies the server’s SSL certificate with the corresponding trusted authority, then creates a pre-master key using the server's public key (previously shared in the certificate) and shares this pre-master key with the server.</p>
</li>
<li><p><strong>Pre-master key decryption</strong>: The pre-mastered key can only be decrypted using the server’s private key. If the server is able to decrypt it, the client and server can then agree on a shared master secret to use for the session.</p>
</li>
<li><p><strong>Client ChangeCipherSpec</strong>: The client creates a session key using the shared master secret and sends the server all previously exchanged records, this time encrypted with the session key.</p>
</li>
<li><p><strong>Server ChangeCipherSpec</strong>: If the server generates the correct session key, it will be able to decrypt the message and verify the received record. The server then sends a record to confirm that the client also has the correct keys.</p>
</li>
<li><p><strong>Secured connection established</strong>: The handshake is complete.</p>
</li>
</ul>
<p>Once the handshake is completed, all the communication between the client and server is protected by symmetric encryption using the session key, and the browser can make the first HTTP GET request for the site.</p>
<h3 id="heading-time-to-first-byte">Time to First Byte</h3>
<p>Once the browser's request is approved, the server will send a 200 OK message along with the response headers and the contents requested. As it is a website, content is likely to be an HTML document.</p>
<p>Data travels between the client and server divided into a series of small data chunks, called data packets. This makes it easy to replace corrupted chunks of data if needed and also allows data to travel to and from different locations, enabling multiple users to access data faster and at the same time.</p>
<p>When the first request is made from the client, the first packet that arrives as response marks the <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Glossary/Time_to_first_byte">Time to First Byte</a> (<strong>TTFB</strong>), which represents the time elapsed since the request was initiated and when the first chunk of data was received as a response. It will include the time taken for the DNS lookup, the TCP handshake to establish the connection, and the TLS handshake if the request is made over HTTPS.</p>
<h2 id="heading-from-data-to-pixels-the-critical-rendering-path">From Data to Pixels: The Critical Rendering Path</h2>
<p>The <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/Performance/Critical_rendering_path">Critical Rendering Path</a> (<strong>CRP</strong>) is a series of steps that the browser performs to transform the data received back from the server into pixels on the screen. It includes creating the <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model">Document Object Model</a> (<strong>DOM</strong>) and <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model">CSS Object Model</a> (<strong>CSSOM</strong>), the <strong>render tree</strong> and <strong>layout</strong>.</p>
<h3 id="heading-building-the-dom-tree">Building the DOM tree</h3>
<p>When the first chunk of data arrives, the browser starts parsing the HTML. Parsing means analyzing and converting a piece of input code into a syntax and representation that can be interpreted by a specific runtime. In this case, the browser assembles the data packets received and parses the HTML, building a representation of the document as a node tree known as the DOM tree.</p>
<p>Each HTML tag in the document is represented as a node in the DOM tree. Nodes are connected to the DOM tree according to their hierarchical position in the document, and each node's representation includes all relevant information about the tag.</p>
<p>For the following HTML code:</p>
<pre><code class="lang-xml"><span class="hljs-meta">&lt;!DOCTYPE <span class="hljs-meta-keyword">html</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">html</span> <span class="hljs-attr">lang</span>=<span class="hljs-string">"en"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"viewport"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"width=device-width, initial-scale=1.0"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>What Really Happens When You Navigate to a Website<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">main</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">header</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>What Really Happens When You Navigate to a Website<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">header</span>&gt;</span>

        <span class="hljs-tag">&lt;<span class="hljs-name">section</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">h2</span>&gt;</span>Intro<span class="hljs-tag">&lt;/<span class="hljs-name">h2</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>
                Before entering into the details of every step included in the process, let's review some of the basic concepts we will be discussing throughout the blog.
            <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>
                The Internet is a huge network of interconnected computers. The World Wide Web (aka web) is built on top of that technology, as well as other services such as email, chat systems, or file sharing.
            <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>

            <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Computers connected to the internet are either:<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">ul</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Clients, the web user's devices and the software that those devices use to access the web.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Servers, computers that store web pages, sites, or apps and the files they need to be displayed in the user's web browser or devices.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">section</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">main</span>&gt;</span>

    <span class="hljs-tag">&lt;<span class="hljs-name">footer</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>© 2024<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">footer</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
</code></pre>
<p>The resulting DOM tree looks like following:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1731498370760/4267c646-145e-487c-83af-f97d6f8ce21d.jpeg" alt="The DOM tree includes all HTML elements, its content and its hierarchy relationships." class="image--center mx-auto" width="1171" height="897" loading="lazy"></p>
<p>While parsing the HTML, the browser makes additional requests for encountered resources. CSS files and images are non-blocking resources, meaning the parser will continue its task while awaiting the requested resources. But if a <code>&lt;script&gt;</code> tag is found, the HTML parsing will pause impacting the time to first rendering.</p>
<h3 id="heading-building-the-cssom-tree">Building the CSSOM Tree</h3>
<p>While the DOM contains all the information about the content of the page and its hierarchy, the CSSOM contains the information on how to style the page.</p>
<p>In the CSSOM, each HTML element is matched with its corresponding CSS styles. The result is a tree that doesn’t contain information about the content of the elements, but about how they should be displayed.</p>
<p>Given the following CSS code:</p>
<pre><code class="lang-css">* {
    <span class="hljs-attribute">box-sizing</span>: border-box;
}

<span class="hljs-selector-tag">body</span> {
    <span class="hljs-attribute">font-family</span>: Arial, sans-serif;
    <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#f4f4f9</span>;
    <span class="hljs-attribute">color</span>: <span class="hljs-number">#333</span>;
}

<span class="hljs-selector-tag">main</span> {
    <span class="hljs-attribute">padding</span>: <span class="hljs-number">20px</span>;
    <span class="hljs-attribute">max-width</span>: <span class="hljs-number">800px</span>;
    <span class="hljs-attribute">margin</span>: <span class="hljs-number">0</span> auto;
}

<span class="hljs-selector-tag">header</span> {
    <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#005bbb</span>;
    <span class="hljs-attribute">color</span>: <span class="hljs-number">#ffffff</span>;
    <span class="hljs-attribute">padding</span>: <span class="hljs-number">10px</span>;
    <span class="hljs-attribute">text-align</span>: center;
}

<span class="hljs-selector-tag">h1</span> {
    <span class="hljs-attribute">font-size</span>: <span class="hljs-number">24px</span>;
}

<span class="hljs-selector-tag">section</span> {
    <span class="hljs-attribute">margin-top</span>: <span class="hljs-number">20px</span>;
}

<span class="hljs-selector-tag">h2</span> {
    <span class="hljs-attribute">font-size</span>: <span class="hljs-number">20px</span>;
    <span class="hljs-attribute">color</span>: <span class="hljs-number">#005bbb</span>;
    <span class="hljs-attribute">display</span>: none;
}

<span class="hljs-selector-tag">p</span> {
    <span class="hljs-attribute">margin-bottom</span>: <span class="hljs-number">10px</span>;
}

<span class="hljs-selector-tag">ul</span> {
    <span class="hljs-attribute">margin-left</span>: <span class="hljs-number">20px</span>;
    <span class="hljs-attribute">list-style-type</span>: disc;
}

<span class="hljs-selector-tag">footer</span> {
    <span class="hljs-attribute">margin-top</span>: <span class="hljs-number">40px</span>;
    <span class="hljs-attribute">text-align</span>: center;
    <span class="hljs-attribute">font-size</span>: <span class="hljs-number">14px</span>;
    <span class="hljs-attribute">color</span>: <span class="hljs-number">#555</span>;
}
</code></pre>
<p>When the browser processes it, the resulting CSSOM will look like this:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1731496962735/f3cb0399-a9fb-48cc-8043-00608d1236db.jpeg" alt="The CSSOM tree includes each HTML element and their corresponding styles. " class="image--center mx-auto" width="596" height="918" loading="lazy"></p>
<p>Its creation is not incremental, meaning that the browser stops rendering the page until it processes all the CSS.</p>
<p>This works this way because, as its name suggests, Cascading Style Sheets (<strong>CSS</strong>) apply styles from top to bottom, meaning that classes defined later override those at the beginning of the document. A CSS document needs to be fully processed before rendering anything on the screen, as there are classes that may change.</p>
<h3 id="heading-javascript-compilation-and-execution">Javascript Compilation and Execution</h3>
<p>While the CSSOM is being created, rendering is blocked, but the browser continues downloading any JavaScript files it encounters.</p>
<p>JavaScript is also parsed, compiled, and interpreted by the browser, but as mentioned before, it is a parser-blocking resource by default. This means that when the browser encounters a <code>&lt;script&gt;</code> tag, it stops HTML parsing and executes the file before continuing. The async or defer attributes can be used to avoid this behavior, allowing parsing to continue while the resource is fetched.</p>
<p>Once the browser completes parsing and executes all JavaScript files that may modify the DOM and CSSOM, the next step is to build the render tree. However, before seeing this step in detail, let’s take a moment to focus on the accessibility tree.</p>
<h3 id="heading-building-the-accessibility-tree">Building the Accessibility Tree</h3>
<p>Based on the structure of the site created in the DOM tree, the browser also creates an accessibility tree.</p>
<p>The accessibility tree is another representation of the site’s content, specifically designed to allow navigation through the site using <a target="_blank" href="https://en.wikipedia.org/wiki/Web_accessibility#Assistive_technologies_used_for_web_browsing">assistive technologies</a>.</p>
<p>In the accessibility tree, each DOM element is represented as an accessible object, containing the following information:</p>
<ul>
<li><p><strong>Name</strong>: An identifier used to refer to the element.</p>
</li>
<li><p><strong>Description</strong>: Additional information about the element.</p>
</li>
<li><p><strong>Role</strong>: The type of element it is, related to its intended use.</p>
</li>
<li><p><strong>State</strong> and other properties: If the element is subject to change, it may include its current state. It can also include other properties specifying other functionality.</p>
</li>
</ul>
<p>In major web browsers, you can access the accessible objects and their information by selecting a node in the DOM tree viewer and the navigating to the “Accessibility” tab.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1731578933460/0a8c7a78-c19a-4d19-a96a-fabd19772156.png" alt="A unordered list selected and the accessibility tab in Chrome Dev Tools." class="image--center mx-auto" width="2400" height="864" loading="lazy"></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1731579023128/85aeb312-1632-49c3-80cb-0d5db8ec8502.png" alt="A unordered list selected and the accessibility tab in Firefox Dev Tools." class="image--center mx-auto" width="2478" height="980" loading="lazy"></p>
<p>Having a well-structured accessibility tree is key in determining whether a site will be navigable using assistive technology, making the difference between inclusion and exclusion.</p>
<h3 id="heading-render-tree">Render tree</h3>
<p>After building the DOM, CSSOM, and accessibility trees, the browser builds the render tree.</p>
<p>This tree is a combination of the DOM and CSSOM trees. The browser processes all nodes and keeps only the visible ones. Then, it combines them with their corresponding CSSOM rules. The result is a collection of all visible elements matched with their computed styles.</p>
<p>Non-visible nodes, such as <code>&lt;script&gt;</code> or <code>&lt;meta&gt;</code> tags, as well as elements hidden with the <code>display: none</code> CSS property, are not included in this tree.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1731501603172/d3467e9a-e75b-4217-875b-58684edfdbc0.jpeg" alt="The render tree is created from the DOM and CSSOM trees." class="image--center mx-auto" width="1332" height="1023" loading="lazy"></p>
<h3 id="heading-layout">Layout</h3>
<p>Once the render tree is computed, the browser runs the layout. In this process, the browser calculates the exact position and size each element will take into the page.</p>
<p>These calculations are based on the viewport size, the browser area that will actually display the site content. The size of the viewport varies based on the device screen size, the browser window size, system settings along other conditions.</p>
<p>The layout output is a box model that captures the size and position that correspond to each element and object present in the render tree. The browser starts processing the document usually from the <code>&lt;body&gt;</code> tag and going through all its descendants.</p>
<p>After the layout calculation, any changes in the size or position of one or more elements in the document will trigger new calculations. Those following calculations are called reflows.</p>
<h3 id="heading-painting">Painting</h3>
<p>Now, the final step is displaying the layout output on the user's screen. During the painting or rasterization phase, the browser converts each layout box element into corresponding pixels on the screen.</p>
<p>A visual representation of the entire page is initially rendered on the screen, and then only the areas affected by changes are re-rendered.</p>
<p>Many factors impact the time it takes for the browser to perform this step, and there are tools that help developers measure and optimize this time.</p>
<p>After painting, and before users can start interacting with the website, the browser may execute any JavaScript that has been deferred using the <code>defer</code> or <code>async</code> attributes to avoid blocking the initial HTML parsing.</p>
<h3 id="heading-a-note-about-javascript-hydration">A Note About JavaScript Hydration</h3>
<p>The steps we described above show the process of rendering all the website’s HTML, CSS, and JavaScript code in the browser. This is known as Client-Side Rendering (CSR). You may have also heard about Server-Side Rendering (SSR).</p>
<p>SSR consists of rendering a website’s content on each request and delivering it to the client as HTML ready to be displayed in the browser.</p>
<p>When a site is rendered using CSR, all the JavaScript is executed before the page is rendered. In SSR, the server-rendered HTML loads and displays quickly in the browser, but JavaScript still needs to be sent to the client to enable user interaction.</p>
<p>JavaScript Hydration is the process where JavaScript is added to a server-rendered HTML page to make it interactive. Once the initial HTML is served and displayed in the browser, JavaScript "hydrates" the static content, attaching event listeners and enabling interactive functionality.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Throughout this article, you enhanced your understanding of what happens from the moment you type a web address into your browser’s address bar until you access the content of the site you’re looking for.</p>
<p>You learned about URLs and the DNS lookup performed by the browser to find the site’s IP address. You also learned how connections are established between the browser and servers and how they communicate.</p>
<p>Finally, you explored what happens from the time the first chunk of data is received from the server until the site is displayed on your screen, along with key concepts such as the accessibility tree and the JavaScript hydration process.</p>
<p>I hope you enjoyed this guide and found it useful. Thanks for reading!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Digital Connectivity – How We Connect to the Internet and IoT Explained ]]>
                </title>
                <description>
                    <![CDATA[ Telephones changed the way we all talked to each other and went about our work (well, the way our great-grandparents did, at any rate). Information could now be communicated instantly, rather than being sent over slow, overland routes.  But that's ha... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/digital-connectivity-internet-and-iot-explained/</link>
                <guid isPermaLink="false">66b995d33cd81de09c96b28a</guid>
                
                    <category>
                        <![CDATA[ internet ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Internet of Things ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ David Clinton ]]>
                </dc:creator>
                <pubDate>Tue, 24 Jan 2023 17:08:41 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/01/pexels-andrea-piacquadio-935743.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Telephones changed the way we all talked to each other and went about our work (well, the way our great-grandparents did, at any rate). Information could now be communicated instantly, rather than being sent over slow, overland routes. </p>
<p>But that's hardly news to anyone these days. The modern network – best known through its internet iteration – similarly boosted communication, although this time it was the movement of data rather than voice that got a boost.</p>
<p>In the fifty years or so since the birth of the internet, it's been trusted with the movement, storage, and management of more and more of our data. </p>
<p>These changes have brought tremendous opportunities, risks, and pressures. Just getting connected is now a basic necessity. Managing all of our many connected devices and leveraging the ways we authenticate to extend our identities also present challenges. We'll discuss all that here.</p>
<p>This article was taken from the book, <a target="_blank" href="https://amzn.to/3FXXAfb">Keeping Up: Backgrounders to All the Big Technology Trends You Can't Afford to Ignore</a>. If you'd prefer to watch this chapter as a video, feel free to follow along here:</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/FnTCMZFe2ww" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<h1 id="heading-how-we-connect-to-the-internet">How We Connect to the Internet</h1>
<p>These days, after food and shelter, pretty much the most basic resource of all is internet connectivity. If you can't access the internet, you'll find it difficult to do your banking, educate yourself, book travel arrangements, or even figure out exactly where you are. </p>
<p>It's not for nothing that widespread, reliable, and relatively fast internet access is critical for a region's general economic development.</p>
<p>Even though the internet was originally build as a decentralized, distributed network of resources, you still need to establish some kind of connection to access it. </p>
<p>The best connections are run by network carriers, known as <em>tier 1 networks.</em> Theses networks can reach all other networks through a peering arrangement that doesn't require payment for IP transit. You can think of these networks as the backbone of the internet, and their network infrastructure is its structure.</p>
<p>Examples of companies managing tier 1 networks include AT&amp;T and Verizon in the US, Tata Communications (India), and Deutsche Telekom (Germany). Those carriers will resell bandwidth to smaller internet service providers (ISPs) who, in turn, sell access to end users like you and me.</p>
<h2 id="heading-broadband-options">Broadband Options</h2>
<p>Individuals looking for broadband access in their homes or small businesses can usually choose between one of four access models:</p>
<ul>
<li><strong>Cable</strong>. Since they're already in the business of providing data to millions of homes over existing physical connections, cable TV providers can easily transmit internet over the same wires.</li>
<li><strong>Digital subscriber line (DSL)</strong>. A family of technologies that permit digital data across copper telephone lines, DSL can provide a roughly similar level of service as cable, but without the need for an underlying cable subscription. In fact, using a "dry copper" connection, you don't even need a telephone landline account.</li>
<li><strong>Fibre optics</strong>. Due to some arcane technical details (including the laws of physics), transmitting digital signals as infrared light can happen faster and require fewer repeaters than comparable electrical cables. A fibre optics internet connection could typically deliver transfer speeds of 10-40Gbit/s – a thousand times faster than currently standard rates using cable or DSL.</li>
<li><strong>Satellite</strong>. Running new cable through densely populated cities is expensive, but companies can quickly make their money back through the many access contracts they'll sign. But sparsely populated rural regions are much more difficult to service. Partly to fill a rural connectivity gap, a number of companies ambitiously working to launch constellations of thousands of orbiting satellites to provide universal internet coverage. As of this writing, SpaceX is furthest along with its project, having already successfully launched more than 500 satellites as part of the Starlink system.</li>
</ul>
<p>Besides those dominant technologies, there have been more than a few alternate connectivity solutions attempted. Some are experimental but promising, and others are a bit more speculative. </p>
<p>Google's Balloon Internet (known officially as Loon LLC), is an attempt to float fleets of high-altitude balloons providing a 1 Mbps signal to anyone within range on the ground. </p>
<p>Loon is designed to provide low-end broadband in hard-to-reach regions where reliable service has been difficult or even impossible. As of 2020, the project seems to be in a late experimental stage.</p>
<p>Broadband over power line (BPL) can take advantage of all the electrical grid that connects power authorities with homes and businesses to provide internet data. Ultimately, the technology delivers limited bandwidth because line noise causes significant data signal loss. </p>
<p>Data carrying power lines can also cause interference with high frequency radio communications. In the end, relatively low signal quality and strong competition from other technologies mean that BPL will probably never be widely adopted.</p>
<p>Networks using forms of wireless Internet service provider (WISP) can service homes and offices across larger geographic areas without the need to physically wire every building. Wired connections are installed in an area's center and, where necessary, connected backhauls are installed in elevated areas to strengthen the wireless signals aimed at consumers. </p>
<p>Existing radio towers or other tall structures can be used for the backhaul repeaters, making a WISP system relatively inexpensive to install.</p>
<p>Smaller-scaled wireless network co-ops can be shared locally using a neighborhood internet service provider (NISP) (using rooftop antennas) or a wireless mesh network (where network-connected devices act as peer nodes) to efficiently share a single physical connection.</p>
<p>Those systems are primarily designed to serve us where we live and work. But mobile data access is definitely also a thing. I'm sure you're already familiar with data plans that mobile phone companies can provide alongside their calling and texting services.</p>
<h2 id="heading-mobile-phone-data-access">Mobile Phone Data Access</h2>
<p>Cell connectivity is distributed through geographic areas (known as "cells") from individual radio transmitters spread throughout the cell. </p>
<p>Since the transmitters within each cell will use different radio frequencies than the cells around it, modern wireless technologies permit a seamless, automated "handover" as a user moves between cells.</p>
<p>The technologies used for wireless telephony have changed since the 80s, when what's now known as 1G ("First Generation") cell phones were introduced. To describe the evolution of cell phones in very general terms, we could say that:</p>
<ul>
<li><strong>1G</strong> phones carried only voice communications and had a maximum transfer speed of 2.4 Kbps.</li>
<li><strong>2G</strong> phones could carry Short Message Service (SMS) and Multimedia Messaging Service (MMS) messaging, which could include short videos and images.</li>
<li><strong>3G</strong> phones had much higher transfer rates (as high as 2 Mbps) than any variant of 2G and was therefore dubbed, "mobile broadband."</li>
<li><strong>4G</strong> phones could reach speeds as high as 100 Mbps, which permitted HD mobile TV, online gaming, and video conferencing.</li>
<li><strong>5G</strong> phones – when used on compatible networks – are expected to reach transfer speeds of up to 20 Gbps at a very low latency, permitting fully immersive virtual environments. Should the 5G rollout be successful (and, at the time of writing, this isn't yet clear), the range and limits of new service categories that could be deployed is not yet known.</li>
</ul>
<p>When it comes to planning a new venture, it's long been the accepted wisdom that there's no replacement for solid market research. Without knowing who your customers will be, where they live, and what they like, how can you properly serve them? </p>
<p>Well, now you can add to that list "how reliable and robust is their internet connectivity," because without digital access, they may never find you or be able to consume your service.</p>
<h1 id="heading-talking-to-the-internet-of-things">Talking to the Internet of Things</h1>
<p>Two recent changes are, more than anything else, responsible for the internet of things (IoT) ecosystem: the availability of cheap, embedded, single-board computers (like the Raspberry Pi) and cheap and always-on internet connectivity.</p>
<p>Those tiny single-boards – often smaller than a credit card – are easy to incorporate into just about anything you're planning to manufacture. </p>
<p>Such devices cost very little – sometimes just a few dollars a piece – and they're generally built to run fully-powered (and free) Linux distributions. And network availability means that the vast streams of data generated by all those on-board cameras, sensors, and other peripherals, can be automatically sent back "home" for processing and analysis.</p>
<h2 id="heading-the-dream-of-iot">The Dream of IoT</h2>
<p>Here are some ways that IoT applications are already actively changing business and consumer practices:</p>
<h3 id="heading-inventory-control">Inventory control</h3>
<p>The very first IoT device was – arguably at least – a Coca-Cola vending machine at Carnegie Mellon University. Back in the early 80s, the machine was modified to digitally report its ongoing inventory. </p>
<p>The simple idea that physical devices can monitor themselves and their surroundings, providing accurate, up-to-the-minute status reports to remote servers, lies at the heart of countless modern industrial solutions. </p>
<p>Modern retail, wholesale, logistics, and manufacturing operations now have constant access to their inventories, allowing them to understand trends and anticipate problems.</p>
<h3 id="heading-agriculture">Agriculture</h3>
<p>Increasingly, modern farming incorporates robotic irrigation, fertilization, planting, and even harvesting technologies. </p>
<p>All those robots running around your property are generating data and, from time to time, getting themselves into trouble. </p>
<p>Moving that data "back" to administration servers is critical for keeping track of what's going on, what might need fixing, and how your actual farm is performing. You can, therefore, expect that each of those devices will be part of someone's IoT.</p>
<h3 id="heading-military">Military</h3>
<p>Communication is key for military operations. But if even weapons, vehicles, and other equipment can communicate autonomously, and if there are servers dedicated to interpreting and acting on that communication, then you're already way ahead of the game. </p>
<p>Sensors connected to each of hundreds of components for, say, a fighter jet, can contribute to giving planners an unprecedented view of what's really going on.</p>
<h3 id="heading-smart-cities">Smart cities</h3>
<p>When sensors embedded in buildings, roads, public lighting, smartphones, and electrical systems are combined with data coming from traffic cameras and public departments, the potential for data-driven insights is huge. </p>
<p>Properly understood data can help cities manage their resources, utilities, and even traffic more efficiently, and better maintain their physical infrastructure.</p>
<h3 id="heading-smart-homes">Smart homes</h3>
<p>On a far smaller scale than smart cities, home appliances can be connected and monitored and controlled through smartphone apps or remote servers. </p>
<p>Smart home devices already include heating and cooling systems, light bulbs, robotic vacuum cleaners, garage doors, and security systems. Smart home devices can be controlled through phone apps but, in many cases, also through voice controlled devices like Amazon Echo (Alexa).</p>
<p>Conversations about IoT are always just one step away from <em>buzzwordism</em> – where words lose meaning and exaggeration becomes an acceptable lifestyle choice. </p>
<p>Not all IoT stuff is actually IoT. Or, to put it another way, not all IoT is worth talking about. But here's one good way to categorize a particular technology: if, hour after hour, something generates more data than any human being could possibly absorb, then it's probably an IoT device.</p>
<p>Effectively dealing with all that data can be a problem. And that's not the only potential for trouble in IoT land.</p>
<h2 id="heading-the-nightmare-of-iot">The Nightmare of IoT</h2>
<p>In the information technology world, as a general rule, the more active network connections you have in your infrastructure, the greater your risk of being successfully attacked. </p>
<p>That's because successful hacker intrusions usually come through badly configured or unpatched devices. The more public-facing devices you're exposing, the greater the chance one of them will have a serious vulnerability.</p>
<p>What kind of vulnerabilities are we talking about? Well, the US government's Common Vulnerabilities and Exposures database contains nearly 140,000 individual entries, each one representing a unique software weakness that could allow unauthorized access to and destruction of an IT system. </p>
<p>There are threats impacting all operating systems (Windows, Linux, macOS), all formats (server, PC, smartphone), and all ages (there are active threats going back to the 1990s). And many hundreds of new entries are added each month.</p>
<p>In that sense, IoT devices are no different than any other kind of computer. But there is one way that they're a whole lot worse. Because you don't normally directly interact with IoT devices on an OS level, and because they're often commodity items that are purchased and deployed by the dozens or thousands, you don't instinctively treat them like computers.</p>
<p>Most of us, as an example, are aware that we should create complex and unique passwords for our laptops and WiFi routers. But your fridge? Just plug it in and it'll be fine! The problem is that many IoT devices – like "smart" fridges – have their own embedded operating systems and, usually, their own network interfaces.</p>
<p>There's a good chance that anyone driving down your quiet residential street can scan for available networks, quickly identify the brand of IoT device you're using, assume that you haven't changed the authentication credentials from their factory defaults, and log in to your private network. </p>
<p>What makes things much worse is that many device manufacturers are still shipping their products with authentication credentials using some variation of admin/admin.</p>
<p>That's a big problem.</p>
<h1 id="heading-leveraging-federated-identities">Leveraging Federated Identities</h1>
<p>All this talk about the dangers presented by authentication and credentials should make you curious about how they can be used to generate some <em>good</em> connectivity stuff. </p>
<p>In a single word, that'd be <em>federation.</em> Identity federation is a technology for linking a single person's identity across multiple network services. Federation is what lets you log in to online gaming or web application sites using, say, your Google account credentials.</p>
<p>The upside of federation is that a single login can be all you'll need as you move between many of the online services you regularly use. That lets you reduce the risk of exposing your password through a vulnerable website. </p>
<p>Of course, it also increases the damage that can come from a serious data breach of the servers used by your federation provider.</p>
<p>Federation can be used to integrate with third party single sign-on (SSO) authentication systems, like Kerberos, the Lightweight Directory Access Protocol (LDAP), and Microsoft's Active Directory (AD). When used with cloud services, SSO systems can securely permit automated as-needed access to private account resources for consumers or processes.</p>
<p>Besides convenience, all this authentication goodness drives opportunities for secure remote collaboration on large, complex projects – itself a fast-growing trend.</p>
<p><em>YouTube videos of all ten chapters from this book <a target="_blank" href="https://www.youtube.com/playlist?list=PLSiZCpRYoTZ6UWl4xialvwLOKyHYYJUiC">are available here</a>. Lots more tech goodness - in the form of books, courses, and articles - <a target="_blank" href="https://bootstrap-it.com">can be had here</a>. And consider taking my <a target="_blank" href="https://www.udemy.com/user/david-clinton-12/">AWS, security, and container technology courses here</a>.</em></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How the Ethernet Protocol Works – A Complete Guide ]]>
                </title>
                <description>
                    <![CDATA[ Whether you’ve been aware of it or not, you’ve probably used the Ethernet in the past. Does this cable look familiar? _(Source: Wikipedia)_ Ethernet is extremely popular, and is the most widely used Data Link Layer protocol, at least where the devic... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/the-complete-guide-to-the-ethernet-protocol/</link>
                <guid isPermaLink="false">66c17c46c711c748ec71e873</guid>
                
                    <category>
                        <![CDATA[ computer networking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ handbook ]]>
                    </category>
                
                    <category>
                        <![CDATA[ internet ]]>
                    </category>
                
                    <category>
                        <![CDATA[ networking ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Omer Rosenbaum ]]>
                </dc:creator>
                <pubDate>Fri, 21 Oct 2022 17:12:40 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/07/The-Ethernet-Protocol-Book-Cover--1-.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Whether you’ve been aware of it or not, you’ve probably used the Ethernet in the past. Does this cable look familiar?</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-94.png" alt="Image" width="600" height="400" loading="lazy">
_(Source: <a target="_blank" href="https://en.wikipedia.org/wiki/Ethernet_physical_layer#/media/File:EthernetCableYellow3.jpg">Wikipedia</a>)_</p>
<p>Ethernet is extremely popular, and is the most widely used Data Link Layer protocol, at least where the devices are linked by physical cables (rather than wireless). </p>
<p>If you need a reminder about the Data Link Layer and its role within the Layers Model, check out <a target="_blank" href="https://www.freecodecamp.org/news/the-five-layers-model-explained/">my previous post</a>.</p>
<p>In this tutorial, you will learn everything about Ethernet – its history, as well as every bit and byte of the Ethernet frame. You will also get to know how protocols are formed, why it is so hard to change them after they are published, and what lessons can be learned for other protocols.</p>
<h2 id="heading-heres-what-well-cover">Here's what we'll cover:</h2>
<ol>
<li><a class="post-section-overview" href="#heading-some-ethernet-history">Some Ethernet History</a></li>
<li><a class="post-section-overview" href="#heading-ethernet-frame-overview">Ethernet Frame Overview</a><br>– <a class="post-section-overview" href="#heading-before-the-frame-preamble-8-bytes">Before the frame – preamble (8 bytes)</a><br>– <a class="post-section-overview" href="#heading-destination-address-and-source-address-6-bytes-each">Destination Address and Source Address (6 bytes each)</a><br>– <a class="post-section-overview" href="#heading-type-length-field-ethernet-ii-type-2-bytes">Type / Length field – Ethernet II (Type) (2 bytes)</a><br>– <a class="post-section-overview" href="#heading-data-and-pad-46-1500-bytes">Data and Pad (46-1500 bytes)</a><br>– <a class="post-section-overview" href="#heading-checksum-crc32-4-bytes">Checksum – CRC32 (4 bytes)</a><br>– <a class="post-section-overview" href="#heading-the-problem-with-the-type-length-field">The Problem with the Type / Length Field</a></li>
<li><a class="post-section-overview" href="#heading-how-ethernet-addresses-work">How Ethernet Addresses Work</a><br>– <a class="post-section-overview" href="#heading-unicast-and-multicast-bits">Unicast and Multicast Bits</a><br>– <a class="post-section-overview" href="#heading-globally-unique-locally-administered-bit">Globally Unique / Locally Administered Bit</a></li>
<li><a class="post-section-overview" href="#heading-why-does-an-ethernet-frame-have-a-minimum-length">Why Does an Ethernet Frame Have a Minimum Length?</a><br>– <a class="post-section-overview" href="#heading-how-are-collisions-handled-in-ethernet">How are Collisions Handled in Ethernet?</a></li>
<li><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></li>
</ol>
<h1 id="heading-some-ethernet-history">Some Ethernet History</h1>
<p>The first version of Ethernet was implemented in 1976. In 1978 a second version was published by DEC, Intel, and Xerox who worked together to publish <strong>DIX</strong> (which stands for DEC, Intel and Xerox). This was also called "Ethernet II". </p>
<p>In 1983, with a change that we will discuss soon, a new Ethernet version was released – the IEEE 802.3 standard, by the IEEE standards association.</p>
<p>Both Ethernet II and IEEE 802.3 are widely used, so we will cover them both. As you will see, they are almost identical. Usually, both are simply referred to as “Ethernet”. </p>
<p>For this tutorial, in order to be precise about what we mean, I will explicitly state whether I'm talking about Ethernet II or IEEE 802.3.  </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-95.png" alt="Image" width="600" height="400" loading="lazy">
_The versions of Ethernet (Source: <a target="_blank" href="https://www.youtube.com/watch?v=SoTRqDLND6Y&amp;ab_channel=Brief">Brief</a>)_</p>
<h1 id="heading-ethernet-frame-overview">Ethernet Frame Overview</h1>
<p>Let's consider the Ethernet Frame format:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-98.png" alt="Image" width="600" height="400" loading="lazy">
_Ethernet Frame Header and Trailer (Source: <a target="_blank" href="https://www.youtube.com/watch?v=SoTRqDLND6Y&amp;ab_channel=Brief">Brief</a>)_</p>
<h2 id="heading-before-the-frame-preamble-8-bytes">Before the Frame – Preamble (8 bytes)</h2>
<p>First comes a <strong>Preamble</strong> consisting of 8 bytes, each containing the bit pattern of alternating <code>1</code>s and <code>0</code>s, that is, <code>10101010</code>. </p>
<p>In Ethernet II, all 8 bytes had this pattern. In 802.3, the seven first bytes carry the value <code>10101010</code>, yet the last bit of the last byte is set to <code>1</code>, so the byte carries the value of <code>1010101**1**</code>. </p>
<p>This last byte is called the <strong>Start of Frame</strong>. The last two <code>1</code> bits tell the receiver that the rest of the frame is about to start. </p>
<p>Sending this bit pattern before a new frame allows devices on the network to easily synchronize their receiver clocks. Note that the preamble is not really a part of the actual frame – it only precedes every frame, and thus you won't see it on many diagrams of the Ethernet protocol.  </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-99.png" alt="Image" width="600" height="400" loading="lazy">
_Ethernet Preamble (Source: <a target="_blank" href="https://www.youtube.com/watch?v=SoTRqDLND6Y&amp;ab_channel=Brief">Brief</a>)_</p>
<h2 id="heading-destination-address-and-source-address-6-bytes-each">Destination Address and Source Address (6 bytes each)</h2>
<p>Next, we have two addresses, each consisting of <strong>6</strong> bytes. I'll describe Ethernet Addresses in more detail later on in this post, but for now, let's notice that a frame starts with a <strong>destination</strong> address, followed by the <strong>source</strong> address. </p>
<p>Why would the frame start with the destination address? Is there a reason for that?</p>
<p>Well, there is. The very first thing a device is likely to do with a frame it has received is to check whether this frame is destined to it, or not. If the frame is not destined to this device, it can be simply dropped. Therefore, the destination address comes in first.</p>
<p>Why is the source address important? Well, to know to whom the receiver should send a reply, if necessary. This source address also plays a role in the way some network devices are implemented, as we will see in future posts.</p>
<h2 id="heading-type-length-field-ethernet-ii-type-2-bytes">Type / Length field – Ethernet II (Type) (2 bytes)</h2>
<p>Next comes a quite problematic field, called the <strong>Type</strong> or <strong>Length</strong> field.</p>
<p>In Ethernet II, this field is called <strong>Type</strong>, and tells the receiver what payload this frame carries. </p>
<p>For instance, if this frame carries an IP layer (that is, the <em>data</em> of the Ethernet layer is an IP packet), then the receiving network card should forward the frame’s payload to the IP handler. If the frame’s payload is ARP, then the ARP handler should deal with it. </p>
<p>By <strong>handler</strong> I mean the code that handles this protocol, for instance the code that parses ARP.</p>
<p>We will come back to the need for Length and how it is dealt within IEEE 802.3 shortly.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-100.png" alt="Image" width="600" height="400" loading="lazy">
_In Ethernet II, the Type field carries the type of the payload (Source: <a target="_blank" href="https://www.youtube.com/watch?v=SoTRqDLND6Y&amp;ab_channel=Brief">Brief</a>)_</p>
<h2 id="heading-data-and-pad-46-1500-bytes">Data and Pad (46-1500 bytes)</h2>
<p>After this field, we get up to 1500 bytes of <strong>Data</strong>. This number was chosen because RAM was expensive back in 1978, and a receiver would have needed more RAM if the frame had been bigger.</p>
<p>This means that if the third layer wants to send more than 1500 bytes of data over Ethernet, it must be sent across multiple frames.</p>
<p>There is also a minimum length of data, which is 46 bytes. Together with the other fields of the frame, the minimum length of an Ethernet frame is 64 bytes in total.</p>
<p>Why would we need a minimum frame length? We will discuss this in a subsequent section.</p>
<p>For now, given that we have a minimum length for an Ethernet frame, what happens if the sender wants to send a very short message, let’s say just one byte? </p>
<p>In that case, the sender has to <strong>pad</strong> the message, for instance with <code>0</code>s until reaching the minimum length. For example, if the sender wants to send only 1 byte of data, such as the letter <code>A</code>, they will have to add 45 bytes of <code>0</code>s.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-101.png" alt="Image" width="600" height="400" loading="lazy">
_46-1500 bytes of data, with padding if needed (Source: <a target="_blank" href="https://www.youtube.com/watch?v=SoTRqDLND6Y&amp;ab_channel=Brief">Brief</a>)_</p>
<h2 id="heading-checksum-crc32-4-bytes">Checksum – CRC32 (4 bytes)</h2>
<p>Last but not least, we have a <strong>Checksum</strong>. This is a <a target="_blank" href="https://en.wikipedia.org/wiki/Cyclic_redundancy_check">32-bit CRC checksum</a>, used to determine whether the bits of the frame have been received correctly. In case of an error, the frame is dropped. </p>
<p>The CRC is computed on <strong>the entire frame</strong> – that is, including the header. Notice that it doesn’t include the preamble, as it is not really a part of the frame.</p>
<p>When we use CRC-32 for the checksum, we set a fixed overhead of 32 bits, or 4 bytes, regardless of the length of the data. In other words, if we send only 1 byte of data, we get a 32-bit checksum, and if we send a thousand bytes of data – we still get 32-bits of checksum.</p>
<h2 id="heading-the-problem-with-the-type-length-field">The Problem with the Type / Length Field</h2>
<p>Earlier, we mentioned that the <strong>Data</strong> field has to be at least 46 bytes long, and if not, we pad it. For simplicity’s sake, let’s assume we pad with <code>0</code>s, as the standard indicates. </p>
<p>Well, we actually have a problem here.</p>
<p>Let’s say the sender wants to send a single byte, consisting of the character <code>A</code>. So they will send an <code>A</code> followed by 45 <code>0</code>s.</p>
<p>What happens in case the sender wants to send <code>A</code> and zero? That is, the data actually consists of <code>A0</code>. In this case, they would also send an <code>A</code>, followed by 45 <code>0</code>s. But this time, the first zero is actually part of the data, and not the padding.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-102.png" alt="Image" width="600" height="400" loading="lazy">
_Whether the sender would like to send <code>A</code> as data or <code>A0</code> as the data, due to padding the frame consists of <code>A</code> and 45 <code>0</code>s (Source: <a target="_blank" href="https://www.youtube.com/watch?v=SoTRqDLND6Y&amp;ab_channel=Brief">Brief</a>)_</p>
<p>As a receiver, you'd need a way to differentiate these cases, and understand which bytes belong to the padding, and which bytes belong to the data, in case of a short frame.</p>
<p>Ethernet II dealt with this problem by… Well, not handling it. That is, the third layer will receive the data and the padding, which would be an <code>A</code> followed by 45 <code>0</code>s in this example. It will then have to figure out on its own which bytes belong to the data and which don’t. </p>
<p>This is doable, of course, if the third layer includes a length field. However, this solution is far from elegant – why would the third layer deal with a padding problem that should be dealt with by the second layer? </p>
<p>This is a clear violation of our layers model (if you would like to see an overview about the Layers Model, refer to <a target="_blank" href="https://www.freecodecamp.org/news/the-five-layers-model-explained/">this tutorial</a>).</p>
<p>For this reason, IEEE decided to change the <strong>Type</strong> field into a <strong>Length</strong> field in IEEE 802.3 . So, for example, a frame carrying a single byte of data, <code>A</code>, will have the Length field set to <code>1</code>, whereas a fame carrying two bytes of data, <code>A0</code>, will have the Length field set to <code>2</code>. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-103.png" alt="Image" width="600" height="400" loading="lazy">
_In 802.3, the Length field sets the data apart from the padding (Source: <a target="_blank" href="https://www.youtube.com/watch?v=SoTRqDLND6Y&amp;ab_channel=Brief">Brief</a>)_</p>
<p>This is an elegant solution, but now two issues arise:</p>
<p>First, if you receive an Ethernet frame, how do you know if it’s an Ethernet II frame, where this field means Type, or an IEEE 802.3 frame, where this field means length?</p>
<p>Second, what happens with the Type field? How would the receiver know what protocol is carried inside the frame?</p>
<p>Let's start with the first question. Just to clarify, by the time IEEE 802.3 was published, many Ethernet cards had already been in use. People didn’t want to replace their network cards just because a new standard was published. </p>
<p>Think about it, would you want to buy a new network card? Or perhaps your friends who are not programmers – would they get a new card as someone told them that "the internet geeks" decided that there was "a new standard" (whatever that means?).</p>
<p>The solution was to allow both Ethernet II and IEEE 802.3 to operate on the same network.</p>
<p>Fortunately, all the <strong>Type</strong> values used at that time had greater values than <code>1500</code>. The solution is thus straightforward: in case this field has a value less than or equal to <code>1500</code>, it actually means Length. In case it has a value greater than or equal to <code>1536</code>, it means Type. The values in between currently have no meaning.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-104.png" alt="Image" width="600" height="400" loading="lazy">
_The Type/Length field is divided: values equal to or lower than 1500 are Length values, and values equal to or greater than 1536 are Type values. (Source: <a target="_blank" href="https://www.youtube.com/watch?v=SoTRqDLND6Y&amp;ab_channel=Brief">Brief</a>)_</p>
<p>For example, if we see a frame where the value of this field is <code>400</code>, it is clear that we have an IEEE 802.3 frame, which is <code>400</code> bytes long.</p>
<p>Now you try: in case we see a frame where this field is set to <code>20</code>, is it an Ethernet II frame or IEEE 802.3 frame? </p>
<p>Indeed, this is an IEEE 802.3 frame, which has <code>20</code> bytes of data, and thus <code>26</code> bytes of padding. And… in case we see a frame where this field is set to <code>2000</code>? </p>
<p>In this case we know that this is an Ethernet II frame, and <code>2000</code> is the Type.</p>
<p>So this is how we know whether we are dealing with an Ethernet 2 or an IEEE 802.3 frame.</p>
<p>Next, how does an IEEE 802.3 frame contain the Type information? That is, given that IEEE 802.3 overrode the Type field, there was no way for the receiver to figure out what to do with an incoming frame. Thus, IEEE 802.3 adds another header of the <a target="_blank" href="https://en.wikipedia.org/wiki/IEEE_802.2">802.2 LLC (Logical Link Control) protocol</a> right before the data. This header conveys the type information.</p>
<p>So an IEEE 802.3 frame will have a destination address field, then a source field, then a length field, and then an LLC header, followed by the data and the checksum.</p>
<h3 id="heading-wait-wasnt-ieee-8023-published-in-1983-why-is-it-relevant">Wait, wasn't IEEE 802.3 published in 1983? Why is it relevant? 🤔</h3>
<p>As mentioned beforehand, in 1978, Ethernet II was published. Not so long later, in 1983, a new format came out – and its authors allowed for backward compatibility, probably believing that in a few years, all devices would be upgraded to the new standard.</p>
<p>Oh, were they wrong.</p>
<p>If you check your own network (given that you are connected to an Ethernet one), I bet you will see Ethernet II frames. </p>
<p>Your device probably supports both versions, but by default it will transmit Ethernet II frames, rather than 802.3. After all, it is guaranteed that any device connected to an Ethernet network can read Ethernet II frames, and it's not guaranteed that the device can read 802.3 ones. If Ethernet II works, why not use it? </p>
<p>All third-layer protocols had to account for the fact that Ethernet doesn't solve the problem of differentiating data from padding. So if all protocols already deal with that, why don't we just...keep things the way they are?</p>
<p>Endpoint devices (such as personal computers) almost always communicate over Ethernet II. IEEE 802.3 is also very common, though, and it's used by default on most modern network devices (such as switches).</p>
<p>This story actually entails a really important lesson.</p>
<p>It is very, very hard to replace protocols after the fact, especially when they are implemented on hardware devices (such as network cards).</p>
<h3 id="heading-whats-an-interpacket-gap">What's an Interpacket Gap?</h3>
<p>After an Ethernet frame is sent, transmitters wait a very short period of time before transmitting the next frame, in order to allow the receiver to know that the transmission of a frame is over. This idle time between frames is called the “Interpacket gap”.</p>
<h1 id="heading-how-ethernet-addresses-work">How Ethernet Addresses Work</h1>
<p>Every Ethernet frame carries two addresses – first, the destination, and second, the source. We mentioned that the destination address appears first so the receiver will be able to tell whether the frame is relevant for it. If not, the frame will be discarded.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-105.png" alt="Image" width="600" height="400" loading="lazy">
_Ethernet addresses within the Ethernet Frame (Source: <a target="_blank" href="https://www.youtube.com/watch?v=sGZzU4U39Bw&amp;ab_channel=Brief">Brief</a>)_</p>
<p>What does an Ethernet address look like?</p>
<p>An Ethernet address consists of 6 bytes – that is, 48 bits. Usually, they are presented in hexadecimal base, delimited either by dashes or colons, as you can see in these examples:   </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-106.png" alt="Image" width="600" height="400" loading="lazy">
_Two representations of the same Ethernet Address (Source: <a target="_blank" href="https://www.youtube.com/watch?v=sGZzU4U39Bw&amp;ab_channel=Brief">Brief</a>)_</p>
<pre><code><span class="hljs-number">00</span>:<span class="hljs-number">01</span>:<span class="hljs-number">42</span>:a9:c2:dd
<span class="hljs-number">00</span><span class="hljs-number">-01</span><span class="hljs-number">-42</span>-a9-c2-dd
</code></pre><p>These are two representations of the exact same Ethernet address, and there is no real difference between the two.</p>
<p>In general, Ethernet addresses are supposed to be globally unique. That is, no two Ethernet devices share the same address (at least, in theory). </p>
<p>The first 3 bytes of any address is called the <strong>OUI</strong> – Organizationally Unique Identifier. To make sure the addresses are unique, IEEE assigns these OUIs to various manufacturers, such as Dell, HP or IBM. </p>
<p>This part of the address is also called the <strong>Vendor ID</strong> (with the exception of the two least significant bits, as we will see). Then, the manufacturers assign the remaining 3 bytes to specific hosts. This part is also called the <strong>Host ID</strong>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-107.png" alt="Image" width="600" height="400" loading="lazy">
_The most significant 3 bytes are the Vendor ID, and the least significant 3 bytes are the Host ID (Source: <a target="_blank" href="https://www.youtube.com/watch?v=sGZzU4U39Bw&amp;ab_channel=Brief">Brief</a>)_</p>
<p>For example, the OUI <code>00:01:42</code> belongs to Cisco. Now, Cisco can manufacture a network card and assign it the address <code>00:01:42:00:00:01</code>. Next, it can manufacture another card and assign it the address <code>00:01:42:00:00:02</code>, and so on. These two addresses share the same <strong>Vendor ID</strong>, but have different <strong>Host IDs</strong>.</p>
<p>Since a single OUI leaves 3 bytes to be used for the host IDs, we have <code>2^24</code> host IDs per OUI – that is, 16,777,216 host IDs. Of course, big manufacturers need many more addresses, and thus they are assigned additional OUIs. For example, <code>00:01:64</code> is another OUI that belongs to Cisco.</p>
<h2 id="heading-unicast-and-multicast-bits">Unicast and Multicast Bits</h2>
<p>Ethernet addresses also consist of two special bits.</p>
<p>The first special bit indicates whether the address is a unicast or a multicast address. Unicast means that the address represents a single device. Multicast addresses represent a group of devices – such as all printers on the network, or all devices in the same local network. </p>
<p>The bit representing whether the address is unicast or multicast is the least significant bit within the most significant byte. Wait, what?</p>
<p>Consider the following Ethernet address:</p>
<p><code>06:b2:d9:a2:32:9e</code></p>
<p>The most significant byte is <code>06</code>.</p>
<p>Let’s convert this to binary:</p>
<p><code>00000110</code></p>
<p>Now we look at the least significant bit – that is, this <code>0</code>:  </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-108.png" alt="Image" width="600" height="400" loading="lazy">
_When the least significant bit within the most significant byte is set to <code>0</code>, this is a Unicast address (Source: <a target="_blank" href="https://www.youtube.com/watch?v=sGZzU4U39Bw&amp;ab_channel=Brief">Brief</a>)_</p>
<p>This bit is off. This means that this is a <strong>unicast</strong> address. In other words, it belongs to a single device, such as a computer’s network card.</p>
<p>Let’s consider another address:</p>
<p><code>11:c0:ff:ee:d8:ab</code></p>
<p>The most significant byte is <code>11</code> (in hexadecimal base).</p>
<p>Let’s convert this to binary:</p>
<p><code>00010001</code></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-109.png" alt="Image" width="600" height="400" loading="lazy">
_When the least significant bit within the most significant byte is set to <code>1</code>, this is a Multicast address (Source: <a target="_blank" href="https://www.youtube.com/watch?v=sGZzU4U39Bw&amp;ab_channel=Brief">Brief</a>)_</p>
<p>The least significant bit is this one. Since it is on, we can tell that this is a <strong>multicast</strong> address. That is, it’s an address of a group. You can send a frame to this address, and all devices that belong to this group will consider the frame as sent to them.</p>
<p>One very famous multicast address is called the <strong>broadcast</strong> address, that is – the group that contains all machines. The address of this group is:</p>
<p><code>FF:FF:FF:FF:FF:FF</code><br>In other words, the address where all bits are on.</p>
<p><strong>All</strong> the machines are part of the broadcast group.</p>
<h3 id="heading-globally-unique-locally-administered-bit">Globally Unique / Locally Administered Bit</h3>
<p>The second special bit indicates whether the address is indeed globally unique. This bit is the second least significant bit within the most significant byte. Um, what?</p>
<p>Well, again, consider the first address from before:</p>
<p><code>06:b2:d9:a2:32:9e</code></p>
<p>The first byte is <code>06</code>.</p>
<p>Converted to binary, we get:</p>
<p><code>00000110</code></p>
<p>So the second least significant bit is the one right here:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-110.png" alt="Image" width="600" height="400" loading="lazy">
_When the second least significant bit within the most significant byte is set to <code>1</code>, this address is <strong>not</strong> globally unique (Source: <a target="_blank" href="https://www.youtube.com/watch?v=sGZzU4U39Bw&amp;ab_channel=Brief">Brief</a>)_</p>
<p>This bit is on, and thus we know that this address is actually <strong>not</strong> globally unique. IEEE will never assign this address to any vendor. So what is this address? Well, in this case it’s just one that I’ve made up. If I wanted to, I could assign it to a specific device. The fact that this bit is on declares that it is not globally unique.</p>
<p>Consider another address:</p>
<p><code>00:01:42:a9:c2:dd</code></p>
<p>The first byte is <code>00</code>, so the second least significant bit is <code>0</code>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-111.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>This is indeed a globally unique address, assigned to Cisco.</p>
<h3 id="heading-ethernet-addresses-recap">Ethernet Addresses – Recap</h3>
<p>So, all in all, an Ethernet address has two main parts: The vendor ID, and the host ID.</p>
<p>There are also two special bits: the least significant bit within the most significant byte states whether the address is unicast or multicast. The second least significant bit within the most significant byte states whether the address is globally unique.</p>
<h1 id="heading-why-does-an-ethernet-frame-have-a-minimum-length">Why Does an Ethernet Frame Have a Minimum Length?</h1>
<p>This is more of a "bonus" part of this post, and concerns collisions. Collisions is a very interesting topic, but since this post focuses on the Ethernet protocol, collisions will not be of our focus. I will therefore address this issue just briefly. While it's not crucial to understand in order to understand Ethernet frames, I promised a <em>complete</em> overview of the Ethernet protocol. </p>
<p>In the overview, I mentioned that an Ethernet frame consists of minimum 46 bytes of data and maximum 1500 of data. I already explained why we have that maximum limit, but what about the minimum?</p>
<p>To simplify our discussion, let's consider a network using classic Ethernet where all computers are attached to a single cable.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-112.png" alt="Image" width="600" height="400" loading="lazy">
_A "classic Ethernet" network with four devices connected via a single cable (Source: <a target="_blank" href="https://www.youtube.com/watch?v=ECl8DnWeVD4&amp;ab_channel=Brief">Brief</a>)_</p>
<p>Let’s say A wants to send a message to B, and C wants to send a message to D. Let’s say that while A is transmitting its frame, C is also transmitting its frame. In this case, the frames will <em>collide</em>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-113.png" alt="Image" width="600" height="400" loading="lazy">
_In case two devices transmit data on the same time - their frames will collide (Source: <a target="_blank" href="https://www.youtube.com/watch?v=ECl8DnWeVD4&amp;ab_channel=Brief">Brief</a>)_</p>
<p>When this happens, we get errors – much like the case where two people start to speak in the same time, and it is impossible to understand either of them. </p>
<h2 id="heading-how-are-collisions-handled-in-ethernet">How are collisions handled in Ethernet?</h2>
<p>Ethernet uses two main mechanisms to deal with collisions. The first is called <strong>CSMA</strong>, which stands for <strong>Carrier Sense Multiple Access</strong>. This basically means that when a station wants to transmit data, it first senses the channel to see if anyone else is transmitting by checking the signal level of the line. If the channel is in use, the station will wait and try again.</p>
<p>So, if A is transmitting, and C wants to send data, C will wait until A finishes its transmission before starting to transmit.</p>
<p>This is just like the case in a human conversation, where one person waits until the other stops talking, and only then does that person talk.</p>
<p>Yet, just like the case where two people might start talking at the same time, two Ethernet machines might start transmitting data at the same time. In this case, <strong>CD</strong> – <strong>Collision Detection</strong> – comes into play. Collision Detection means that the transmitting devices detect the fact that a collision has occurred. This is achieved by listening to the channel while transmitting.</p>
<p>For example, assume that station A transmits the bit stream <code>11001010</code>. While transmitting, A is also listening to the channel. If no collision occurred, A would also read the signal <code>11001010</code> from the line.  </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-114.png" alt="Image" width="600" height="400" loading="lazy">
_With <strong>Collision Detection</strong>, A is listening to the channel while transmitting data. In case no collision occurred, A will sense exactly the bitstream it has sent (Source: <a target="_blank" href="https://www.youtube.com/watch?v=ECl8DnWeVD4&amp;ab_channel=Brief">Brief</a>)_</p>
<p>If, however, a collision occurred, say with a frame sent by C, then A would read something different from the line – for instance, <code>11011010</code>. This way, machine A realizes that its frame has collided.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-115.png" alt="Image" width="600" height="400" loading="lazy">
_With <strong>Collision Detection</strong>, A is listening to the channel while transmitting data. In case of a collision, A reads a different bitstream than that it has sent (Source: <a target="_blank" href="https://www.youtube.com/watch?v=ECl8DnWeVD4&amp;ab_channel=Brief">Brief</a>)_</p>
<p>Machine A can realize that a collision has occurred even before it finished transmitting the frame. Then, machine A stops transmitting and issues a JAM signal to tell the other station that a collision has occurred. As a result, both stations stop transmitting and wait a random interval of time before trying to submit again. </p>
<p>The amount of time that the stations wait increases with the number of collisions in the network. So on the first collision, A and C wait for a relatively short amount of time before transmitting again. If another collision occurs, they might wait longer.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-116.png" alt="Image" width="600" height="400" loading="lazy">
_After a collision occurs, the amount of time that the stations wait increases with the number of collisions in the network (Source: <a target="_blank" href="https://www.youtube.com/watch?v=ECl8DnWeVD4&amp;ab_channel=Brief">Brief</a>)_</p>
<p>Now, back to Ethernet. Ethernet requires that valid frames must be at least 64 bytes long, from destination address to checksum, including both. So, that data has to be at least 46 bytes long. If the frame is too short, then it must be padded.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-117.png" alt="Image" width="600" height="400" loading="lazy">
_The minimum length of an Ethernet frame consists of 46 bytes of data, or 64 bytes overall (Source: <a target="_blank" href="https://www.youtube.com/watch?v=ECl8DnWeVD4&amp;ab_channel=Brief">Brief</a>)_</p>
<p>One reason for having this minimum is directly related to the collision detection mechanism stated above.</p>
<p>Let's consider the following scenario. Host A wants to transmit a really really short frame to B, a frame that is only 1 byte long. I am exaggerating of course, this can’t really happen in Ethernet, but it will be helpful for the explanation. </p>
<p>Host A transmits this frame, which consists of 8 <code>1</code>s. Then, A listens to the channel while transmitting, and also reads 8 <code>1</code>s from it, reaching the conclusion that the frame has been transmitted successfully. </p>
<p>However, before the frame reaches the other end of the network, D starts transmitting a very short frame, one byte long, consisting of 8 <code>0</code>s. D listens to the channel while transmitting, and also reads 8 <code>0</code>s from it, concluding that the frame has been transmitted successfully.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-118.png" alt="Image" width="600" height="400" loading="lazy">
_Both A and D send a really short frame, and they finish transmitting without realizing a collision is liable to take place (Source: <a target="_blank" href="https://www.youtube.com/watch?v=ECl8DnWeVD4&amp;ab_channel=Brief">Brief</a>)_</p>
<p>Now, these two really short frames collide. Yet, neither A nor D are aware of this collision, as they have already concluded that the frame has been successfully delivered.</p>
<p>In order to avoid such cases, the frame must be long enough to prevent a station from completing its transmission before the first bit of the frame reaches the far end of the line. Having a minimum length for Ethernet frames solves this issue.</p>
<p>This was a very short discussion of collisions. If you’d like to know more about this topic, refer to the "additional resources" section below.</p>
<h1 id="heading-conclusion">Conclusion</h1>
<p>In this tutorial, we covered every bit and byte of the Ethernet protocol. You should now have a good understanding of this protocol, as well as a reference to consult when needed. </p>
<h2 id="heading-about-the-author"><strong>About the Author</strong></h2>
<p><a target="_blank" href="https://www.linkedin.com/in/omer-rosenbaum-034a08b9/">Omer Rosenbaum</a> is <a target="_blank" href="https://swimm.io/">Swimm</a>’s Chief Technology Officer. He's the author of the Brief <a target="_blank" href="https://youtube.com/@BriefVid">YouTube Channel</a>. He's also a cyber training expert and founder of Checkpoint Security Academy. He's the author of <a target="_blank" href="https://data.cyber.org.il/networks/networks.pdf">Computer Networks (in Hebrew)</a>. You can find him on <a target="_blank" href="https://twitter.com/Omer_Ros">Twitter</a>.</p>
<h3 id="heading-additional-references"><strong>Additional References</strong></h3>
<ul>
<li><a target="_blank" href="https://www.youtube.com/playlist?list=PL9lx0DXCC4BMS7dB7vsrKI5wzFyVIk2Kg">Computer Networks Playlist - on my Brief channel</a></li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Carrier-sense_multiple_access_with_collision_detection">Carrier-sense multiple access with collision detection - Wikipedia</a></li>
<li><a target="_blank" href="https://www.itprc.com/carrier-sense-multiple-access-collision-detect-csmacd-explained/">Carrier Sense Multiple Access Collision Detect (CSMA/CD) Explained - ITPRC</a></li>
</ul>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ DNS Server Not Responding – Service Unavailable DNS Failure [Solved] ]]>
                </title>
                <description>
                    <![CDATA[ Sometimes, you might suddenly discover that you can’t access the internet on your computer because of the error “DNS server not responding”.  If you run a troubleshooter for the issue, you'll get a message like the below: In your Chrome browser, you... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/dns-server-not-responding-service-unavailable-dns-failure-solved/</link>
                <guid isPermaLink="false">66adf0bbf452caf50fb1fde8</guid>
                
                    <category>
                        <![CDATA[ dns ]]>
                    </category>
                
                    <category>
                        <![CDATA[ error ]]>
                    </category>
                
                    <category>
                        <![CDATA[ internet ]]>
                    </category>
                
                    <category>
                        <![CDATA[ servers ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Kolade Chris ]]>
                </dc:creator>
                <pubDate>Mon, 11 Apr 2022 15:59:55 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/04/binary-g3068c576e_1920.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Sometimes, you might suddenly discover that you can’t access the internet on your computer because of the error “DNS server not responding”. </p>
<p>If you run a troubleshooter for the issue, you'll get a message like the below:
<img src="https://www.freecodecamp.org/news/content/images/2022/04/ss1-1.png" alt="ss1-1" width="600" height="400" loading="lazy"></p>
<p>In your Chrome browser, you might also get an error like the one below:
<img src="https://www.freecodecamp.org/news/content/images/2022/04/ss2-2.png" alt="ss2-2" width="600" height="400" loading="lazy"></p>
<p>This is because the Domain Name System (DNS) server is crucial in getting an internet connection on your computer.</p>
<p>As far as websites are concerned, the “DNS server not responding” error could be caused by DNS gaps and a DDoS (Distributed Denial of Service) attack. If this is the problem, you might have to wait for 72 hours for domain gaps to be fixed or the website admins to fix the security issues with the website.</p>
<p>On the user’s end, the “DNS server not responding” error could be caused by numerous reasons such as misconfigured DNS settings and outdated browsers. </p>
<p>If this is the cause, I will show you 7 ways to fix the error so you can restore your internet connection.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ul>
<li><a class="post-section-overview" href="#heading-how-does-the-dns-system-work">How Does the DNS System Work?</a></li>
<li><a class="post-section-overview" href="#heading-7-ways-to-fix-the-dns-server-not-responding-error">7 Ways to Fix the DNS Server Not Responding Error</a><ul>
<li><a class="post-section-overview" href="#heading-solution-1-switch-browsers">Solution 1: Switch Browsers</a></li>
<li><a class="post-section-overview" href="#heading-solution-2-temporarily-disable-your-antivirus">Solution 2: Temporarily Disable Your Antivirus</a></li>
<li><a class="post-section-overview" href="#heading-solution-3-restart-your-router-or-modem">Solution 3: Restart your Router or Modem</a></li>
<li><a class="post-section-overview" href="#heading-solution-4-flush-your-dns-cache">Solution 4: Flush your DNS Cache</a></li>
<li><a class="post-section-overview" href="#heading-solution-5-manually-change-your-dns-server">Solution 5: Manually Change your DNS Server</a></li>
<li><a class="post-section-overview" href="#heading-solution-6-update-your-network-adapter-driver">Solution 6: Update Your Network Adapter Driver</a></li>
<li><a class="post-section-overview" href="#heading-solution-7-disable-ipv6">Solution 7: Disable IPv6</a></li>
</ul>
</li>
<li><a class="post-section-overview" href="#heading-final-thoughts">Final Thoughts</a><h2 id="heading-how-does-the-dns-system-work">How Does the DNS System Work?</h2>
</li>
</ul>
<p>Whenever you try to access a website, like freeCodeCamp.org, you type in the URL like “freecodecamp.org” to the address bar and hit <code>ENTER</code>. </p>
<p>Under the hood, the DNS server looks up the numerical address for freeCodeCamp.org. This numerical address is called an Internet Protocol (IP) address.</p>
<p>Once the browser gets this IP address, the website (freeCodeCamp.org or any other) will be shown to you. If the browser fails to find this address, then you might get the “DNS server not responding” error.</p>
<h2 id="heading-7-ways-to-fix-the-dns-server-not-responding-error">7 Ways to Fix the DNS Server Not Responding Error</h2>
<p>Now let's go through seven ways you can use to get rid of the “DNS server not responding” error so your internet connection can be restored.</p>
<h3 id="heading-solution-1-switch-browsers">Solution 1: Switch Browsers</h3>
<p>The “DNS server not responding” error could be showing up because of the browser you’re currently using. Some browsers have their own DNS cache and if there’s an issue with the cache, your internet experience on that browser could be negatively affected. </p>
<p>So, a non-complicated fix is to change to a different browser and see if the error persists. </p>
<p>For example, if you are using Chrome, switch to Edge if you are on Windows or Safari if you are using Mac. </p>
<p>If the website loads up in another browser, then you might need to update your other browser or reinstall it.</p>
<h3 id="heading-solution-2-temporarily-disable-your-antivirus">Solution 2: Temporarily Disable Your Antivirus</h3>
<p>Antivirus programs are notorious for interfering with applications and stopping them from working properly.</p>
<p>If you are getting the “DNS server not responding” error, consider disabling your antivirus program to see if your internet connection works fine. </p>
<p>If you are able to access the internet after disabling the antivirus, then it is the reason you’re getting the error. </p>
<p>In this case, you may want to consider getting another antivirus program.</p>
<p>If you are on Windows 10, you can disable Windows Security (AKA Windows Defender) by following the steps below:
<strong>Step 1</strong>: Press <code>ALT</code> + <code>SHIFT</code> + <code>ESC</code> on your keyboard to open the Task Manager</p>
<p><strong>Step 2</strong>: Switch to the Startup tab</p>
<p><strong>Step 3</strong>: Locate your Antivirus Program in the list, right-click on it and select "Disable".
<img src="https://www.freecodecamp.org/news/content/images/2022/04/ss3-1.png" alt="ss3-1" width="600" height="400" loading="lazy"></p>
<h3 id="heading-solution-3-restart-your-router-or-modem">Solution 3: Restart your Router or Modem</h3>
<p>If your internet connection relies on a router or modem, restarting it could help you get rid of the “DNS server not responding” error. </p>
<p>This is because turning off and then turning on a router or modem clears the cache of IP addresses. This could fix the error in the long run.</p>
<p>To restart your router or modem, locate the power button and long press to turn it off, then turn it on again.</p>
<h3 id="heading-solution-4-flush-your-dns-cache">Solution 4: Flush your DNS Cache</h3>
<p>If the “DNS server not responding” error is due to misconfiguration on your device, flushing your DNS is one of the most reliable ways to fix it. This is because the process would remove invalid IP configurations and outdated information in the DNS cache.</p>
<p>To flush your computer’s DNS on Windows, follow the steps highlighted below:</p>
<p><strong>Step 1</strong>: Hit the <code>WIN</code> button on your keyboard and search for "cmd". Then select "Run as Administrator" on the right.</p>
<p><strong>Step 2</strong>: Enter and execute the following commands one after the other:</p>
<ul>
<li><code>ipconfig /flushdns</code></li>
<li><code>ipconfig /release</code></li>
<li><code>ipconfig /renew</code>
<img src="https://www.freecodecamp.org/news/content/images/2022/04/ss4.png" alt="ss4" width="600" height="400" loading="lazy"></li>
</ul>
<p><strong>Step 3</strong>: Restart your computer</p>
<h3 id="heading-solution-5-manually-change-your-dns-server">Solution 5: Manually Change your DNS Server</h3>
<p>Using the default DNS server of your internet service provider could be the reason you are getting the “DNS server not responding” error.</p>
<p>You can change your DNS server to one of the free ones provided by the likes of Google and Cloudflare.</p>
<p>The steps below show you how to change your DNS server to Google's: </p>
<p><strong>Step 1</strong>: Right-click on Start and select “Network Connections”:
<img src="https://www.freecodecamp.org/news/content/images/2022/04/ss5.png" alt="ss5" width="600" height="400" loading="lazy"></p>
<p><strong>Step 2</strong>: Scroll down and select “Change adapter options”:
<img src="https://www.freecodecamp.org/news/content/images/2022/04/ss6.png" alt="ss6" width="600" height="400" loading="lazy"></p>
<p><strong>Step 3</strong>: In the pop-up that appears, right-click on the network you are connected to and select “Properties”:
<img src="https://www.freecodecamp.org/news/content/images/2022/04/ss7.png" alt="ss7" width="600" height="400" loading="lazy"></p>
<p><strong>Step 4</strong>: In the next pop-up that appears, double-click on “Internet Protocol Version 4 (TCP/IPv4)”:
<img src="https://www.freecodecamp.org/news/content/images/2022/04/ss8.png" alt="ss8" width="600" height="400" loading="lazy"></p>
<p><strong>Step 5</strong>: In the following pop-up that appears, click the radio button that says “Use the following DNS server addresses”:
<img src="https://www.freecodecamp.org/news/content/images/2022/04/ss9.png" alt="ss9" width="600" height="400" loading="lazy"></p>
<p><strong>Step 6</strong>: Enter 8.8.8.8 for “Preferred DNS server” and 8.8.4.4 for “Alternate DNS server”:
<img src="https://www.freecodecamp.org/news/content/images/2022/04/ss10.png" alt="ss10" width="600" height="400" loading="lazy"></p>
<p>This is the free DNS server provided by Google.</p>
<p><strong>Step 7</strong>: Click “Ok”, and “Ok” again.</p>
<p>N.B.: If your computer is configured to use IPv6 instead of IPv4, then in step 4, you should choose “Internet Protocol Version 6 (TCP/IPv6)” instead of “Internet Protocol Version 4 (TCP/IPv4)”.</p>
<h3 id="heading-solution-6-update-your-network-adapter-driver">Solution 6: Update Your Network Adapter Driver</h3>
<p>Updating your network adapter driver can fix a lot of technical issues – including the “DNS server not responding” error, since the new driver could include bug fixes.</p>
<p>To update your network adapter driver, you can do it with the steps below:</p>
<p><strong>Step 1</strong>: Click on Start and select Device Manager.</p>
<p><strong>Step 2</strong>: Expand Network Adapters.</p>
<p><strong>Step 3</strong>: Right-click on the affected driver and select Update driver:
<img src="https://www.freecodecamp.org/news/content/images/2022/04/ss11.png" alt="ss11" width="600" height="400" loading="lazy"></p>
<p><strong>Step 4</strong>: Choose Search automatically for updated driver software:
<img src="https://www.freecodecamp.org/news/content/images/2022/04/ss12.png" alt="ss12" width="600" height="400" loading="lazy"></p>
<p><strong>Step 5</strong>: Allow your computer to search for a driver online and install it for you. When it is done installing, restart your computer.</p>
<h3 id="heading-solution-7-disable-ipv6">Solution 7: Disable IPv6</h3>
<p>If your current network is configured to use IPv4 and IPv6 is turned on on your computer, it could lead to negative interference which could make you get the “DNS server not responding” error.</p>
<p>To disable IPv6, the following steps can help you:</p>
<p><strong>Step 1</strong>: Right-click on Start and select “Network Connections”:
<img src="https://www.freecodecamp.org/news/content/images/2022/04/ss5.png" alt="ss5" width="600" height="400" loading="lazy"></p>
<p><strong>Step 2</strong>: Scroll down and select “Change adapter options”:
<img src="https://www.freecodecamp.org/news/content/images/2022/04/ss6.png" alt="ss6" width="600" height="400" loading="lazy"></p>
<p><strong>Step 3</strong>: In the pop-up that appears, right-click on the network you are connected to and select “Properties”:
<img src="https://www.freecodecamp.org/news/content/images/2022/04/ss7.png" alt="ss7" width="600" height="400" loading="lazy"></p>
<p><strong>Step 4</strong>: In the next pop-up that appears, uncheck “Internet Protocol Version 6 (TCP/IPv6)”:
<img src="https://www.freecodecamp.org/news/content/images/2022/04/ss13.png" alt="ss13" width="600" height="400" loading="lazy"></p>
<p><strong>Step 6</strong>: Click “Ok”, and “Ok” again.</p>
<h2 id="heading-final-thoughts">Final Thoughts</h2>
<p>The “DNS server not responding” error can be frustrating and disturb your internet experience. But in this article you've learned how to fix it if the error is caused by misconfiguration of DNS from the user’s end. </p>
<p>I hope one of the solutions to the error explained in this article helps you fix the error.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Computer Networking Tutorial – How Network Applications Talk Over the Internet ]]>
                </title>
                <description>
                    <![CDATA[ By Sahil Gupta Network applications are computer applications that participate in a computer network. These applications talk to each other by plugging into the network.  For example, when you visit google.com, your browser acts as a network applicat... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/computer-networking-how-applications-talk-over-the-internet/</link>
                <guid isPermaLink="false">66d460c5264384a65d5a95d1</guid>
                
                    <category>
                        <![CDATA[ computer network ]]>
                    </category>
                
                    <category>
                        <![CDATA[ computer networking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ internet ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 18 Jan 2022 19:54:27 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/01/network-applications-article-image.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Sahil Gupta</p>
<p>Network applications are computer applications that participate in a computer network. These applications talk to each other by plugging into the network. </p>
<p>For example, when you visit google.com, your browser acts as a network application that leverages the <a target="_blank" href="https://en.wikipedia.org/wiki/Internet">Internet</a> to talk to the network application running on Google's computer. </p>
<p>Usually, the mechanics of this communication are abstracted away from an application developer.</p>
<p>On the surface, this communication might look like an <a target="_blank" href="https://en.wikipedia.org/wiki/Inter-process_communication">Inter-Process Communication</a> between <a target="_blank" href="https://en.wikipedia.org/wiki/Unix_domain_socket">two applications running on the same computer</a>. But, network communication has a different set of challenges. </p>
<p>For example, communication can take an eternity in computer time. It takes 0.1337 secs (2 <em> 3.14 </em> 6400 / 30000) for light to travel around earth. Assuming a modest CPU that runs at 1GHz, it can perform 10^9 ops in 1 sec. </p>
<p>Suppose it takes a few ops for processes (running on the same machine) to communicate, roughly 10^-7 - 10^-8 secs. That translates to ~1 million times slower communication times with a computer sitting on the other side of Earth!</p>
<p>This article will look at how network applications talk to each other, specifically over the Internet. For a high-level overview of the Internet, see <a target="_blank" href="https://blog.devgenius.io/how-does-the-internet-work-256891cdbb77">this article</a>.</p>
<h2 id="heading-introduction-to-computer-networks">Introduction to Computer Networks</h2>
<p>An additional complexity involved in network communication is the diversity of end systems out there (mobile phones, laptops, windows, mac). This complexity is managed by <a target="_blank" href="https://en.wikipedia.org/wiki/Abstraction_(computer_science)">abstracting</a> the differences and introducing a uniform set of rules called <a target="_blank" href="https://en.wikipedia.org/wiki/Communication_protocol"><strong>Protocols</strong></a>. </p>
<p>Protocols are the building blocks of communication between network applications. Some of the popular protocols include HTTP, TCP, IP, SMTP. Like how a human language (such as English) enables diverse people to communicate meaningfully, Protocols fill a similar gap in network communication.</p>
<p>Network communication is challenging due to the scale and uncertainty inherent in the network. </p>
<p>For example, links can be clogged, which results in the dropping of packets. One strategy to solve a complicated problem is to divide the problem into subproblems, solve the subproblems, and combine them to solve the original problem. </p>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/Protocol_stack">The Protocol Stack</a> uses this idea to solve network communication.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/1-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>Protocol Stack</em></p>
<p>Imagine you are building a website to sell pizza. When the user interacts with your website, the frontend needs to communicate with your backend server. Wouldn't it be nice if you could focus on building your online pizza store without having to worry about how that data is passed from the frontend to the backend server over the Internet? </p>
<p>The protocol stack takes care of the network communication for us. An application (frontend) uses the Application Layer to communicate with another application (backend). </p>
<p>The application layer uses the "services" provided by the Transport Layer to transmit information across the network. Transport Layer also uses services provided by the Network Layer to fulfill its service agreement. </p>
<p>In this way, the higher layer uses the services provided by the lower layers to communicate with other applications over the network. The Physical Layer constitutes the wires which carry the electrical signal.</p>
<p>In essence, the protocol stack contains various layers, where each layer focuses on solving part of the bigger problem.</p>
<p>Protocols describe the solution to the sub-problems, which gives us the name protocol stack. Generally, protocols define the rules of communication between two entities such as,</p>
<ul>
<li>Types of messages, for example, request and response messages</li>
<li>Syntax of various message types such as fields in the messages</li>
<li>The semantics of fields, that is the meaning of information in fields</li>
<li>Rules for determining when and how messages are sent and responded to</li>
</ul>
<p>Let's dive deeper into the protocol stack, starting from the top.</p>
<h2 id="heading-the-application-layer">The Application Layer</h2>
<p>Business applications use the Application Layer to communicate over a network. For example, placing an order on your online pizza store is done using the Application Layer. <a target="_blank" href="https://en.wikipedia.org/wiki/POST_(HTTP)">HTTP</a> is one option to post the information on your backend server.</p>
<p>Application Layer Protocols define how applications running on different end systems pass messages to each other. In addition to the rules of communication (protocol), the applications also need a way to find each other, that is, to address each other. The address of an application is defined by:</p>
<ol>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/IP_address">IP Address</a>: numerical label assigned to an end system</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Port_(computer_networking)">Port Number</a>: an identifier that specifies the receiving process in the destination host. Port numbers are essential to account for multiple network applications running on a host. For example, <a target="_blank" href="https://superuser.com/questions/1055281/do-web-browsers-use-different-outgoing-ports-for-different-tabs">two tabs in a web browser act as two different processes</a>.</li>
</ol>
<p>The address of an application defines its identity on the network, and the protocol defines the rules for communication. Together, these form the <a target="_blank" href="https://en.wikipedia.org/wiki/Network_socket">Socket</a> address (protocol type, IP address, port number). </p>
<p>A <strong>socket</strong> is an <a target="_blank" href="https://en.wikipedia.org/wiki/Interface_(computing)">interface</a> between the application layer and the transport layer. It acts as an entry point into the network, that is an application sends messages into and receives network messages through its Socket.</p>
<p>In summary, applications talk to each other using Application Layer protocols. The Application Layer relies on the services provided by the Transport Layer to pass data between end systems. Pair of IP address and port number identifies an application. The information flows from an application into the network through its Socket.</p>
<p>Let's look at an example of two applications communicating over the Internet using HTTP. </p>
<p>HTTP is a popular application layer protocol. The communication is between my web browser and an application server (<a target="_blank" href="http://ilovecookies.com/">ilovecookies.com</a>). When I enter this address in my web browser, it sends an HTTP request message to the application server.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/2-2.png" alt="Image" width="600" height="400" loading="lazy">
<em>HTTP request message sent by my web browser to ilovecookies.com server</em></p>
<p>A few things to notice about this request message:</p>
<ul>
<li>The type of request is GET</li>
<li>The host it sends the message to is ilovecookies.com (human-readable version of IP addresses called <a target="_blank" href="https://en.wikipedia.org/wiki/Hostname">hostnames</a>)</li>
<li>The source machine accepts specific response formats, languages, and so on.</li>
</ul>
<p>This structure is part of the <a target="_blank" href="https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#HTTP/1.1_request_messages">HTTP</a> that defines communication rules between two applications. When the host application receives this message, it responds with a response message.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/3-3.png" alt="Image" width="600" height="400" loading="lazy">
<em>HTTP response message received by my web browser from ilovecookies.com server that contains the HTML for generating the webpage</em></p>
<p>We can observe that the response message contains protocol-specific data such as status code (200), content type, and so on and the HTML data (truncated to fit). The request-response pair constitutes the network communication between two applications that successfully lays out the webpage (ilovecookies.com) on my screen.</p>
<h2 id="heading-the-transport-layer">The Transport Layer</h2>
<p>Next, let's go one level down the protocol stack and understand how the transport layer helps network communication.</p>
<p>The transport layer provides <a target="_blank" href="https://www.pcmag.com/encyclopedia/term/logical-vs-physical"><strong>logical</strong></a> communication between applications running on different hosts: from an applications' perspective, it's as if the two hosts are directly connected. Note that the communication provided by the transport layer is logical and not physical: there's no direct link or wire between the end hosts.</p>
<p>The transport layer converts the application messages into smaller chunks, encapsulates each piece in a transport message containing headers, and passes the chunk to the network layer.</p>
<p>The reason behind breaking down information into pieces is efficient network utilization. The Internet is so vast that several parallel paths transmit data between two end hosts. </p>
<p>For example, there are two possible paths to travel between New York and Stamford. The Internet is a slightly extreme version of this idea.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/4-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>Two alternative routes between New York and Stamford</em></p>
<p>The relative ordering of packets is a natural question around chunking and efficient network utilization: the chunks need to be put back in the same order at the receiving host. The transport layer in the receiving host is responsible for the stitching of pieces back in the proper order.</p>
<p>The transport layer also needs some additional data relevant to its functions. For example, relative sequence numbers are added to the chunks to stitch back the application message. </p>
<p>Another example of transport layer-specific information is the port number. On the receiving host, the destination port number is helpful to route the message to the correct application.</p>
<p>The Internet makes available two transport layer protocols:</p>
<ul>
<li>User Datagram Protocol (UDP)</li>
<li>Transmission Control Protocol (TCP)</li>
</ul>
<p>The two protocols vary slightly in the transport services they provide to the application layer.</p>
<table>
  <tbody><tr>
    <th>TCP</th>
    <th>UDP</th>
  </tr>
  <tr>
    <td>Reliable data transfer</td>
    <td>Unreliable data transfer</td>
  </tr>
  <tr>
    <td>Lost or corrupted information is recovered by retransmission</td>
    <td>No mechanisms to recover lost or corrupted data</td>
  </tr>
  <tr>
    <td>Higher latency at the cost of reliable communication</td>
    <td>Lower latency at the cost of unreliable communication</td>
  </tr>
</tbody></table>

<p>The service requirements of an application govern what protocol you choose. For example, a payment system will need reliable communication (TCP), whereas a video streaming service might be okay with losing some information for faster streaming (UDP).</p>
<p>In summary, the transport layer splits the application messages into chunks and encapsulates them in messages containing transport layer-specific information. The pieces are put back in the correct order on the receiving system to recreate the message and passed to the appropriate application using the port number.</p>
<p>Let's continue the HTTP example communication between my web browser and application server.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/5-2.png" alt="Image" width="600" height="400" loading="lazy">
<em>TCP packet encapsulating HTTP request message and headers</em></p>
<p>You can observe the decoded bytes in the bottom right representing the HTTP GET request my browser makes for the application server. We see the HTTP request as a TCP payload field in this packet. </p>
<p>In addition, the packet is first in relative ordering with a sequence number of 1. It also contains the port number (65012) associated with the tab on my web browser and the destination port number (<a target="_blank" href="https://en.wikipedia.org/wiki/Port_(computer_networking)#Common_port_numbers">80</a>) on the application server.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/08/sequence-1-and-1449.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>First (sequence number 1) and second (sequence number 1449 that starts at end of packet 1) TCP packets corresponding to HTTP response message received from ilovecookies.com server</em></p>
<p>The first two packets from the HTTP response (57 TCP packets)  are displayed here. In the bottom right of both images, we can see the HTTP-specific information and some HTML corresponding to the webpage ilovecookies.com. </p>
<p>You can also see the transport layer-specific information such as the port numbers and the sequence numbers. Notice that the source and destination port numbers are flipped compared to the request message packets.</p>
<h2 id="heading-the-network-layer">The Network Layer</h2>
<p>In contrast to the transport layer, the network layer provides logical communication between two end hosts. Note the subtle difference between the transport and network layer services.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/08/network-layer-hosts.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Left: logical communication provided by the transport layer, Right: logical communication provided by the network layer</em></p>
<p>The network layer takes a transport packet from the transport layer and encapsulates it in a network packet. The encapsulation is helpful to add information specific to the functioning of network layer protocol.</p>
<p>The network layer provides a <a target="_blank" href="https://en.wikipedia.org/wiki/Best-effort_delivery">best-effort service</a> (timing, relative ordering, eventual delivery are not guaranteed) to move data between two hosts. The best-effort service is the motivation behind TCP. As the network layer protocols are inherently unreliable, TCP contains additional logic to ensure reliable data transfer.</p>
<p>The network layer is responsible for moving packets from a sending host to a receiving host. In addition to the end hosts, the network layer protocols also run on <strong>Routers</strong>, part of the <a target="_blank" href="https://en.wikipedia.org/wiki/Backbone_network">network core</a>. Routers are packet switching devices that are responsible for forwarding packets.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/08/packet-switching-and-small-network.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Left: packet switching device, Right: a small network consisting of 3 end hosts and 1 router connecting them together</em></p>
<p>Suppose end host 1 wants to send a packet to end host 2. End host 1 passes the packet to the router. The router looks at the information in the network packet and figures out that it needs to forward the packet on link 2, to which end host 2 is connected. </p>
<p>Every router has a forwarding table stored in RAM (<a target="_blank" href="https://en.wikipedia.org/wiki/Routing_protocol">built dynamically</a>) to resolve the correct forwarding link for the packet. For example, the routing table for the above setup will look like this:</p>
<table>
  <tbody><tr>
    <th>Address</th>
    <th>Link</th>
  </tr>
  <tr>
    <td>192.168.1.1</td>
    <td>Link 1</td>
  </tr>
  <tr>
    <td>168.134.1.1</td>
    <td>Link 2</td>
  </tr>
  <tr>
    <td>172.158.1.2</td>
    <td>Link 3</td>
  </tr>
</tbody></table>

<p>Routers use the information (destination host address) from the network packet to index (<a target="_blank" href="https://en.wikipedia.org/wiki/Exclusive_or#Truth_table">bitwise XOR</a>) into this table. You can see the routing table on your computer by running the following commands:</p>
<p><code>Mac: netstat -nrf inet</code>
<code>Linux: netstat -nr</code>
<code>Windows: Get-NetRoute -AddressFamily IPv4</code></p>
<p>Notice a particular entry in your routing table, default or 0.0.0.0, called the <a target="_blank" href="https://en.wikipedia.org/wiki/Default_gateway">default gateway</a>. A packet is routed to the default gateway if none of the entries match the destination address.</p>
<p>The Internet contains tons of such devices which forward packets to enable logical communication between two end hosts. </p>
<p>As everyone shares the routers and wires carrying the data on the Internet, routers contain queues that hold incoming packets as outgoing packets are processed (/forwarded) by the router. Unreliability is introduced in the network layer protocols if the queues are full, which can get packed as the traffic increases.</p>
<p>The Internet network protocol is called Internet Protocol (IP). The major components of the Internet network layer are,</p>
<ol>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Internet_Protocol">IP</a>: defines addressing conventions (IPv4, IPv6), packet format, packet handling convention</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Routing_protocol">Routing protocols</a>: determine the path a packet takes from source to host</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol">ICMP</a>: facility to report errors in packets and respond to requests for certain network layer information</li>
</ol>
<p>In summary, the network layer provides logical communication between two end hosts. Network layer protocols run on end hosts and network core devices such as routers. Routers forward network packets, which help form the logical communication between two end hosts.</p>
<p>Let's continue with our example of communication with ilovecookies.com. </p>
<p>We have seen that my web browser creates an HTTP request message (application layer protocol) and passes it down to the transport layer, which uses TCP protocol for end-to-end communication between my web browser application and a server application (ilovecookies.com).</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/12.png" alt="Image" width="600" height="400" loading="lazy">
<em>An IP packet encapsulates a TCP packet</em></p>
<p>We can see that the network packet encapsulates the TCP packet, which encapsulates the application packet. The green highlighted text represents the contents of the network packet, yellow the transport packet, and the remaining text starting at GET is the application packet. </p>
<p>The network packet fields are relevant to its functioning. For example, the source address is my machines' IP address, and the destination address is the ilovecookies.com <a target="_blank" href="https://mxtoolbox.com/SuperTool.aspx?action=a%3ailovecookies.com&amp;run=toolpage">server address</a>.</p>
<p>The encapsulation and the layer-specific information contained in the packets also relate to the idea of logical communication between hosts and applications running on them. </p>
<p>For instance, the network packet includes the IP addresses of the end machines, whereas the transport packet only contains the port numbers. The transport layer relies on the network layer to move data between the end machines. Once the data reaches the receiving device, the transport layer takes over and routes the packet to the correct application using the port numbers contained in the transport packet.</p>
<h2 id="heading-the-link-layer">The Link Layer</h2>
<p>Compared to the layers we have seen so far, the link layer has a narrower scope: it provides services to move packets over the individual links in the end-to-end path.</p>
<p>For example, links are the red dotted lines (see above illustrations). The link-layer enables the node-to-node movement of network layer packets over a single link in the path.</p>
<p>A link-layer protocol defines:</p>
<ul>
<li>format of packets exchanged between nodes at ends of the link</li>
<li>actions taken on packets by those nodes</li>
</ul>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/Adapter_(computing)#Network_adapter">A network adapter</a> implements the link layer protocols. Network adapter constitutes the physical hardware that enables a computer to connect to a network and exchange information. </p>
<p>Try running this command to see the list of network adapters in your computer:</p>
<p><code>Mac: networksetup -listallhardwareports</code>
<code>Linux: lshw -class network -short</code>
<code>Windows: Get-NetAdapter -Name *</code></p>
<p>In the output, you will notice that each device has a link-layer address known as the MAC address. The adapters' <a target="_blank" href="https://en.wikipedia.org/wiki/Read-only_memory">ROM</a> contains MAC addresses assigned at the time of manufacture that are considered permanent. Each node (hosts and routers) has a link-layer address along the path.</p>
<p>Earlier we talked about IP address, which are also an identifier for the devices. The situation is similar to having multiple identifiers: home address and social security number. There are several reasons why nodes have MAC addresses and network-layer addresses.</p>
<ul>
<li>The protocols in different layers are supposed to be substitutable. For example, <a target="_blank" href="https://en.wikipedia.org/wiki/IPX/SPX">IPX</a> doesn't use a network layer address.</li>
<li>IP addresses are stored in RAM and <a target="_blank" href="https://en.wikipedia.org/wiki/IPX/SPX">reconfigured every time the adapter is moved or powered up</a>, that is, temporary.</li>
<li>Suppose the protocol omits MAC addresses. The adapter would need to pass each packet it receives up the protocol stack. The network layer would check for an IP address match. But, this can be inefficient if done too many times: <a target="_blank" href="https://en.wikipedia.org/wiki/Interrupt">Interrupts</a> help pass packets which can be <a target="_blank" href="https://en.wikipedia.org/wiki/Interrupt#Performance">expensive</a>.</li>
</ul>
<p>In summary, for the layers to be largely independent building blocks in network architecture, many layers need to have their addressing scheme. </p>
<p>As a quick recap, we have come across three types of address until now:</p>
<ul>
<li>Hostnames for the application layer (ilovecookies.com). These are converted into corresponding IP addresses using <a target="_blank" href="https://en.wikipedia.org/wiki/Domain_Name_System">DNS</a>.</li>
<li>The IP address for the network layer</li>
<li>MAC address for the link layer</li>
</ul>
<p>Like the Domain Name System, which helps resolve IP addresses from hostnames, Address Resolution Protocol (<a target="_blank" href="https://en.wikipedia.org/wiki/Address_Resolution_Protocol">ARP</a>) is useful for determining (destination) MAC addresses from an IP address. </p>
<p>ARP builds a table in RAM which contains a mapping of IP address to MAC address. The protocol includes specifications (such as <a target="_blank" href="https://en.wikipedia.org/wiki/Address_Resolution_Protocol#Packet_structure">a particular packet</a>) for creating this table automatically.</p>
<p>The network layer passes the packet and MAC address (from the ARP table) of the destination node to the link layer. The link-layer encapsulates the packet in a link-layer packet and moves it along the link to the destination node. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/13-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>A network containing two hosts and one router</em></p>
<p>Suppose in the above setup the host 222.222.222.220 wants to send a packet to the other host 222.222.222.222. The network layer uses ARP to resolve the corresponding MAC address as 49-BD-D2-C7-56-A2 and passes the packet and MAC address to the link layer. The link layer moves the packet over the link between the two hosts.</p>
<p>Next, consider a more complex scenario where a host wants to send a packet to another host on a different network. For example, a packet from my computer to ilovecookies.com travels from my <a target="_blank" href="https://en.wikipedia.org/wiki/Home_network#Infrastructure_devices">home network</a> to another network.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/14-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>A router connecting two subnets. The router contains two adapters for linking and two IP addresses, identifying it on each subnet</em></p>
<p>There are two things to notice about this picture. First, the router has two IP addresses. As the router participates in two different networks, it requires two IP addresses to identify it in the respective network. For more details, see <a target="_blank" href="https://askleo.com/your-routers-two-ip-addresses/">this</a>.</p>
<p>Second, the two separate networks are known as <a target="_blank" href="https://en.wikipedia.org/wiki/Subnetwork">subnets</a>. A subnet is a logical grouping of network devices that makes network device management more accessible.</p>
<p>Suppose in this setup the host 222.222.222.222 wants to send a packet to the host 111.111.111.111, which involves making a cross-network trip. It will not locate the destination host (111.111.111.111) in its subnet, and it forwards the packet to the default gateway (router). </p>
<p>The network layer uses the ARP table to resolve the MAC address as 88-B2-2F-54-1A-0F. The router uses its routing table to deliver the packet to the link connecting to the other subnet. Once again, the ARP table helps resolve the MAC address of the destination host, and the packet moves along the link.</p>
<p>In summary, the adapter part of your computer hardware implements the link layer protocols. The link-layer protocol defines an addressing scheme called MAC addresses, and the ARP is used to map IP addresses to MAC addresses. The link-layer encapsulates network layer packets and moves them over a link.</p>
<p>One of the popular link layer protocols is <a target="_blank" href="https://en.wikipedia.org/wiki/Ethernet">Ethernet</a>. Let's continue our example (ilovecookies.com) to examine the Ethernet protocol in action.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/15-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>An Ethernet packet encapsulating an IP packet</em></p>
<p>We can observe the Ethernet packet contains destination and source MAC addresses (omitted), and it encapsulates the IP packet.</p>
<h2 id="heading-recap">Recap</h2>
<p>Let's summarize what we saw in this article using the picture below.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/16.png" alt="Image" width="600" height="400" loading="lazy">
<em>End to end network communication between host A and host B</em></p>
<p>Computer applications running on two different systems (called hosts) communicate using protocols. </p>
<p>Protocols are rules which govern the communication between two hosts. The protocol stack solves multiple sub-problems to solve the problem of network communication. Each layer focuses on solving a sub-problem using the services offered by the lower layers in the abstraction hierarchy.</p>
<p>The application layer protocols work at the highest level of abstraction. An application communicates by sending messages that adhere to the rules of an application protocol (for example HTTP). </p>
<p>DNS is used to map hostname (www.ilovecookies.com) to an IP address. These messages are pushed through the socket interface to be transmitted over the network using the transport layer.</p>
<p>The transport layer exposes a logical communication between two applications running on different hosts. It breaks down application messages into smaller pieces and encapsulates them in packets containing extra information (<a target="_blank" href="https://en.wikipedia.org/wiki/Header_(computing)">headers</a>).</p>
<p>The application message is created from these packets and pushed through the socket interface using the port number on the packet. These packets are sent over the network by relying on the network layer.</p>
<p>Next, the network layer takes over, providing logical communication between two hosts. It also encapsulates the transport packet in a network packet. </p>
<p>The Internet contains packet switching devices that forward network packets, using routing tables stored in RAM and built dynamically using routing protocols. The network layer relies on the link layer to move packets.</p>
<p>Link-layer is responsible for moving packets over individual links. Hardware devices, called adapters, implement link-layer protocols and have a permanent address associated with them, called MAC address. MAC address serves as the identifier for this layer. The Address Resolution Protocol (ARP) maps IP addresses to MAC addresses.</p>
<p>Finally, the link layer passes packets to the physical layer, which constitutes the wires over which the information travels.</p>
<p>Thank you for reading! I hope you learned something new about computer networks today.</p>
<h3 id="heading-sources">Sources</h3>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://www.pearson.com/us/higher-education/program/Kurose-Computer-Networking-A-Top-Down-Approach-7th-Edition/PGM1101673.html">https://www.pearson.com/us/higher-education/program/Kurose-Computer-Networking-A-Top-Down-Approach-7th-Edition/PGM1101673.html</a></div>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://www.wireshark.org/">https://www.wireshark.org/</a></div>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Windows 10 Network Adapter Missing – How to Install Ethernet Driver on PC ]]>
                </title>
                <description>
                    <![CDATA[ On Windows 10 and other versions of the Windows operating system, you need a network adapter to connect to the internet through a wired or wireless network. Sometimes, you might get an error that your network adapter is missing. This can be very frus... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/windows-10-network-adapter-missing-how-to-install-ethernet-driver-on-pc/</link>
                <guid isPermaLink="false">66adf28efebac312b73075e0</guid>
                
                    <category>
                        <![CDATA[ internet ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Windows 10 ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Kolade Chris ]]>
                </dc:creator>
                <pubDate>Fri, 07 Jan 2022 16:34:05 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/01/adapter-g446e52e4c_1280.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>On Windows 10 and other versions of the Windows operating system, you need a network adapter to connect to the internet through a wired or wireless network.</p>
<p>Sometimes, you might get an error that your network adapter is missing. This can be very frustrating because you won't be able to connect to the internet.</p>
<p>There are some simple fixes you can use to fix this issue, including:</p>
<ul>
<li>removing and reinserting your computer battery</li>
<li>turning off Antivirus and VPN apps</li>
<li>restarting your computer</li>
</ul>
<p>But these might not be enough to fix the issue.</p>
<p>So, in this article, I'm going to show you 5 better ways you can fix the network adapter missing error so you can start connecting your computer to the internet again.</p>
<h2 id="heading-how-to-fix-network-adapter-missing-by-using-the-built-in-network-reset-tool">How to Fix Network Adapter Missing by Using the Built-in Network Reset Tool</h2>
<p>Windows 10 has a built-in network reset tool that can reset your settings to default. This often fixes this issue for you.</p>
<p>To fix the network adapter missing error with this solution, follow the detailed steps below:</p>
<p><strong>Step 1</strong>: Click on Start and select Settings.
<img src="https://www.freecodecamp.org/news/content/images/2022/01/opensettings.jpg" alt="opensettings" width="600" height="400" loading="lazy"></p>
<p><strong>Step 2</strong>: Choose Network and Internet from the menu tiles.
<img src="https://www.freecodecamp.org/news/content/images/2022/01/ss-1-1.jpg" alt="ss-1-1" width="600" height="400" loading="lazy"></p>
<p><strong>Step 3</strong>: Under “Status”, click the Network reset link.
<img src="https://www.freecodecamp.org/news/content/images/2022/01/ss-2-1.jpg" alt="ss-2-1" width="600" height="400" loading="lazy"></p>
<p><strong>Step 4</strong>: Click the Reset now link.
<img src="https://www.freecodecamp.org/news/content/images/2022/01/ss-3-1.jpg" alt="ss-3-1" width="600" height="400" loading="lazy"></p>
<p>If you use this fix, be aware that you have to reinstall any VPN app on your computer and also reenter WiFi passwords.</p>
<h2 id="heading-how-to-fix-network-adapter-missing-by-checking-the-drivers-power-management-settings">How to Fix Network Adapter Missing by Checking the Driver's Power Management Settings</h2>
<p>Windows 10 is optimized for better power management, so when your laptop battery is low, some devices could be turned off to save power. </p>
<p>You could experience the network adapter missing error due to this power optimization.</p>
<p>To turn off this feature for your network adapter driver, follow the steps below:</p>
<p><strong>Step 1</strong>: Right-click on Start and select Device Manager.
<img src="https://www.freecodecamp.org/news/content/images/2022/01/devicemanager-1.jpg" alt="devicemanager-1" width="600" height="400" loading="lazy"></p>
<p><strong>Step 2</strong>: Expand Network Adapters.
<img src="https://www.freecodecamp.org/news/content/images/2022/01/ss-4-1.jpg" alt="ss-4-1" width="600" height="400" loading="lazy"></p>
<p><strong>Step 3</strong>: Right-click on the affected network adapter and select Properties.
<img src="https://www.freecodecamp.org/news/content/images/2022/01/ss-5-1.jpg" alt="ss-5-1" width="600" height="400" loading="lazy"></p>
<p><strong>Step 4</strong>: Switch to the Power Management tab and uncheck "Allow the computer to turn off this device to save power" and click "Ok". 
<img src="https://www.freecodecamp.org/news/content/images/2022/01/ss-6-1.jpg" alt="ss-6-1" width="600" height="400" loading="lazy"></p>
<h2 id="heading-how-to-fix-network-adapter-missing-by-resetting-winsock-settings-in-the-command-line">How to Fix Network Adapter Missing by Resetting Winsock Settings in the Command Line</h2>
<p>Winsock is a program that determines how network services are used on a Windows computer.</p>
<p>If things go wrong with Winsock, it could cause the network adapter missing error.</p>
<p>To reset Winsock, follow the steps below: </p>
<p><strong>Step 1</strong>: Click on Start and search for "cmd", then select "Run as Administrator" on the right.
<img src="https://www.freecodecamp.org/news/content/images/2022/01/cmd-admin.jpg" alt="cmd-admin" width="600" height="400" loading="lazy"></p>
<p><strong>Step 2</strong>: In the command line, type in "netsh winsock reset" and hit <code>ENTER</code>.
<img src="https://www.freecodecamp.org/news/content/images/2022/01/ss-7.png" alt="ss-7" width="600" height="400" loading="lazy"></p>
<p><strong>Step 3</strong>: Restart your computer.</p>
<h2 id="heading-how-to-fix-network-adapter-missing-by-reinstalling-or-updating-the-network-adapter-driver">How to Fix Network Adapter Missing by Reinstalling or Updating the Network Adapter Driver</h2>
<p>If the solutions already discussed fail to work for your computer, then you should try and reinstall or update your network adapter driver to fix the issue.</p>
<p>To reinstall your network adapter driver, you should follow the steps below:</p>
<p><strong>Step 1</strong>: Click on Start and select Device Manager.
<img src="https://www.freecodecamp.org/news/content/images/2022/01/devicemanager-1.jpg" alt="devicemanager-1" width="600" height="400" loading="lazy"></p>
<p><strong>Step 2</strong>: Expand Network Adapters.
<img src="https://www.freecodecamp.org/news/content/images/2022/01/ss-4-1.jpg" alt="ss-4-1" width="600" height="400" loading="lazy"></p>
<p><strong>Step 3</strong>: Right-click on the affected driver and select Uninstall device.
<img src="https://www.freecodecamp.org/news/content/images/2022/01/ss-8-1.jpg" alt="ss-8-1" width="600" height="400" loading="lazy"></p>
<p><strong>Step 4</strong>: Choose Search automatically for updated driver software. 
<img src="https://www.freecodecamp.org/news/content/images/2022/01/ss-10-1.jpg" alt="ss-10-1" width="600" height="400" loading="lazy"></p>
<p><strong>Step 5</strong>: Restart your computer and the driver will be automatically reinstalled for you.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In this detailed guide, you learned how you can fix the network adapter missing error so you can connect to the internet again with your computer.</p>
<p>If you find this article helpful, consider sharing it with your friends and family so it can help them too.</p>
<p>Thank you for reading.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Learn the History of the Internet in Dr. Chuck's 9-Hour Course ]]>
                </title>
                <description>
                    <![CDATA[ The impact of networks and technology continues to increase. Understanding technology makes it easier to function in an information-centric world. We just published a massive course about Internet history and technology on the freeCodeCamp.org YouTub... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/learn-the-history-of-the-internet-in-dr-chucks/</link>
                <guid isPermaLink="false">66b20540a5be9a107f43417e</guid>
                
                    <category>
                        <![CDATA[ internet ]]>
                    </category>
                
                    <category>
                        <![CDATA[ youtube ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Beau Carnes ]]>
                </dc:creator>
                <pubDate>Mon, 20 Dec 2021 14:10:44 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/12/internethistory2.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>The impact of networks and technology continues to increase. Understanding technology makes it easier to function in an information-centric world.</p>
<p>We just published a massive course about Internet history and technology on the freeCodeCamp.org YouTube channel.</p>
<p>In this course you will learn how the Internet was created, who created it, and how it works. Along the way you will see interviews with many of the innovators who developed the Internet and Web technologies that we use today.</p>
<p>Charles Severance (a.k.a. Dr. Chuck) created this course. He is a Clinical Professor at the University of Michigan School of Information, where he teaches various technology-oriented courses including programming, database design, and Web development.</p>
<p>After this course you will not take the Internet and web for granted. You will be better informed about important technological issues currently facing society. You will realize that the Internet and Web are spaces for innovation and you will get a better understanding of how you might fit into that innovation.</p>
<p>Here are the sections in this information-packed course:</p>
<ul>
<li>High Stakes Research in Computing and Communication</li>
<li>IEEE Computer: Alan Turing at Bletchley Park</li>
<li>The "First" Electronic Computers Around the World</li>
<li>Monash Museum of Computing History Interviews</li>
<li>Post-War Computing and Communication</li>
<li>Early Academic Networking Research</li>
<li>Len Kleinrock: The First Two Packets on the Internet</li>
<li>Packet Switched Networks</li>
<li>Computing Conversations: Len Kleinrock on the Theory of Packets</li>
<li>Packet Switching and the ARPANET</li>
<li>Katie Hafner on the history of the ARPANET project</li>
<li>Supercomputers as Technology Drivers</li>
<li>Networked Computing, lecture by Larry Smarr on Scientific Computing</li>
<li>From Super Computers to NSFNet</li>
<li>Doug Van Houweling: Building the NSFNet</li>
<li>Expanding NSFNet Around the World</li>
<li>Nii Quaynor: Bringing the Internet to Africa</li>
<li>The World-Wide-Web Emerges at CERN</li>
<li>Building the Web Around the World</li>
<li>Steve Job's Second-Order Effects (High resolution)</li>
<li>Mosaic at NCSA - The Browser for Everybody</li>
<li>Joseph Hardin: NCSA Mosaic</li>
<li>Reflecting on Mosaic</li>
<li>Computing Conversations with Brendan Eich</li>
<li>Computing Conversations: Mitchell Baker on the Mozilla Foundation</li>
<li>The Web, the World, and the Economy</li>
<li>Computing Conversations: Brian Behlendorf on the Apache Software Foundation</li>
<li>Open Source Wrap Up</li>
<li>Introduction: Link Layer</li>
<li>Computing Conversations: Bob Metcalfe on the First Ethernet LAN</li>
<li>The InterNetwork Protocol (IP)</li>
<li>Computing Conversations: Vint Cerf on the History of Packets</li>
<li>DNS - The Domain Name System</li>
<li>Transport Layer</li>
<li>Van Jacobson: The Slow-Start Algorithm</li>
<li>TCP Wrap Up</li>
<li>Application Layer</li>
<li>Security Introduction</li>
<li>Bruce Schneier: The Security Mindset</li>
<li>Understanding Security</li>
<li>Encryption and Confidentiality</li>
<li>Cryptographic Hashes and Integrity</li>
<li>Bruce Schneier: Building Cryptographic Systems</li>
<li>Hashing and Digital Signatures</li>
<li>Security Public/Private Key - Secure Sockets</li>
<li>Security - Integrity and Certificate Authorities</li>
</ul>
<p>Watch the full course below or <a target="_blank" href="https://www.youtube.com/watch?v=47NRaBVxgVM">on the freeCodeCamp.org YouTube channel</a> (9-hour watch):</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/47NRaBVxgVM" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Ethernet Doesn't Have a Valid IP Configuration – How to Fix Invalid Connection in Windows 10 ]]>
                </title>
                <description>
                    <![CDATA[ Every computer or device that you can use to surf the web has an IP address assigned to it. This IP address allows the device to be identified on the internet or within a local area network. But sometimes, you might get an error that says your Ethern... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/ethernet-doesnt-have-a-valid-ip-configuration-how-to-fix-invalid-connection-in-windows-10/</link>
                <guid isPermaLink="false">66adf0c92d0eb5bfdd6b0c1a</guid>
                
                    <category>
                        <![CDATA[ internet ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Windows 10 ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Kolade Chris ]]>
                </dc:creator>
                <pubDate>Wed, 17 Nov 2021 18:40:14 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/11/network-g101278015_1280.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Every computer or device that you can use to surf the web has an IP address assigned to it. This IP address allows the device to be identified on the internet or within a local area network.</p>
<p>But sometimes, you might get an error that says your Ethernet doesn't have a valid IP configuration.</p>
<p>This error is caused by various problems with the network interface card (NIC) - the hardware that connects a computer to a network. It can also happen because of faulty drivers and an improperly configured router or modem.</p>
<p>In this guide, I will show you four ways you can fix the problem of your Ethernet not having a valid IP configuration.</p>
<h2 id="heading-how-to-fix-ethernet-ip-configuration-issues-by-disabling-fast-startup">How to Fix Ethernet IP Configuration Issues by Disabling Fast Startup</h2>
<p>Windows 10 is optimized for fast recovery from sleep, shutdown, and hibernation. If this feature isn't turned off, it could take a toll on your device's performance because it might not be well prepared to resume working.</p>
<p>If you turn this feature off, it might fix this error for you.</p>
<p><strong>Follow each step below to disable fast startup in Windows 10:</strong></p>
<p><strong>Step 1</strong>: Launch the Control Panel by pressing the <code>WIN</code> button on your keyboard, typing "control panel" (without quotes), and hitting <code>ENTER</code> to open up the first search result.
<img src="https://www.freecodecamp.org/news/content/images/2021/11/ss-1-1.png" alt="ss-1-1" width="600" height="400" loading="lazy"></p>
<p><strong>Step 2</strong>: In the Control Panel, change the view mode to large icons.
<img src="https://www.freecodecamp.org/news/content/images/2021/11/ss-2-8.jpg" alt="ss-2-8" width="600" height="400" loading="lazy"></p>
<p><strong>Step 3</strong>: Select "Power Options".
<img src="https://www.freecodecamp.org/news/content/images/2021/11/ss-3-8.jpg" alt="ss-3-8" width="600" height="400" loading="lazy"></p>
<p><strong>Step 4</strong>: Click on “Choose what the power buttons do”.
<img src="https://www.freecodecamp.org/news/content/images/2021/11/ss-4-9.jpg" alt="ss-4-9" width="600" height="400" loading="lazy"></p>
<p><strong>Step 5</strong>: Open the "Change settings that are currently unavailable" link.
<img src="https://www.freecodecamp.org/news/content/images/2021/11/ss-5-7.jpg" alt="ss-5-7" width="600" height="400" loading="lazy"></p>
<p><strong>Step 6</strong>: Uncheck "Turn on fast startup (recommended) and click on Save changes.
<img src="https://www.freecodecamp.org/news/content/images/2021/11/ss-6-8.jpg" alt="ss-6-8" width="600" height="400" loading="lazy"></p>
<h2 id="heading-how-to-fix-ethernet-ip-configuration-issues-by-updating-your-network-adapter-driver">How to Fix Ethernet IP Configuration Issues by Updating your Network Adapter Driver</h2>
<p>You can also fix this issue by updating or reinstalling your network adapter driver. If your driver is faulty, outdated, or corrupt, it can cause problems.</p>
<p><strong>Step 1</strong>: On your desktop, right-click on Start (Windows logo) and click "Device Manager".
<img src="https://www.freecodecamp.org/news/content/images/2021/11/ss-1-9.jpg" alt="ss-1-9" width="600" height="400" loading="lazy"></p>
<p><strong>Step 2</strong>: Expand Network Adapters.</p>
<p><strong>Step 3</strong>: Right-click on Ethernet connection and select “update driver”.
<img src="https://www.freecodecamp.org/news/content/images/2021/11/ss-7-4.jpg" alt="ss-7-4" width="600" height="400" loading="lazy"></p>
<p><strong>Step 4</strong>: Select “Search automatically for updated driver software”.
<img src="https://www.freecodecamp.org/news/content/images/2021/11/ss-8-3.jpg" alt="ss-8-3" width="600" height="400" loading="lazy"></p>
<p><strong>Step 5</strong>: Restart your PC.</p>
<h2 id="heading-how-to-fix-ethernet-ip-configuration-issues-by-clearing-your-computer-network-cache-in-the-command-line">How to Fix Ethernet IP Configuration Issues by Clearing your Computer Network Cache in the Command Line</h2>
<p>Clearing your network cache can remove invalid IP configurations and outdated information. But you can't do this simply by clearing your browser's data like history and cache.</p>
<p><strong>Follow the steps below to clear your network cache:</strong></p>
<p><strong>Step 1</strong>: Hit the <code>WIN</code> button on your keyboard and search for "cmd". This time around, you have to use the Command Prompt as an administrator, so you should select "Run as Administrator" on the right.
<img src="https://www.freecodecamp.org/news/content/images/2021/11/ss-9-3.jpg" alt="ss-9-3" width="600" height="400" loading="lazy"></p>
<p><strong>Step 2</strong>: Enter and execute the following commands one after the other:</p>
<ul>
<li><code>ipconfig /release</code></li>
<li><code>ipconfig /flushdns</code></li>
<li><code>ipconfig /renew</code>
<img src="https://www.freecodecamp.org/news/content/images/2021/11/ss-10.png" alt="ss-10" width="600" height="400" loading="lazy"></li>
</ul>
<p><strong>Step 3</strong>: Restart your computer.</p>
<h2 id="heading-how-to-fix-ethernet-ip-configuration-issues-by-resetting-your-computers-tcp-and-ip-in-the-command-line">How to Fix Ethernet IP Configuration Issues by Resetting your Computer's TCP and IP in the Command Line</h2>
<p>The Transmission Control Protocol (TCP) is designed to convey data from one device to another, while the Internet Protocol (IP) acts as the ID of a computer on the internet.</p>
<p>Resetting your Computer's IP and TCP can sometimes fix your "Ethernet doesn't have a valid IP configuration" error for you.</p>
<p><strong>Go through the steps below to reset your IP and TCP in the command line:</strong></p>
<p><strong>Step 1</strong>: Click on Start and search for "command prompt", then select "Run as Administrator" on the right.
<img src="https://www.freecodecamp.org/news/content/images/2021/11/ss-9-3.jpg" alt="ss-9-3" width="600" height="400" loading="lazy"></p>
<p><strong>Step 2</strong>: Type in <code>netsh winsock reset</code> (without quotes) and hit <code>ENTER</code> to reset your TCP.</p>
<p><strong>Step 3</strong>: Type in <code>netsh int IP reset</code> and hit <code>ENTER</code> to reset your IP address.
<img src="https://www.freecodecamp.org/news/content/images/2021/11/ss-11.png" alt="ss-11" width="600" height="400" loading="lazy"></p>
<p><strong>Step 4</strong>: Restart your PC.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In this article, you learned how to fix the "Ethernet doesn't have a valid IP configuration" error in 4 different ways.</p>
<p>Apart from these fixes we discussed, I would also recommend you restart all devices you're using to access the internet. This includes your computer, modem, or router.</p>
<p>Thank you for reading and have a nice time.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What is IPTV? IPTV Service Guide ]]>
                </title>
                <description>
                    <![CDATA[ IPTV stands for Internet Protocol Television. It's a service you can use to watch your favorite TV shows without needing to sign up for cable. But how does it work exactly? In this article, I will break down the different types of IPTV services inclu... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-is-iptv-ip-tv-service-guide/</link>
                <guid isPermaLink="false">66b8da7608ff3854c30d1f2d</guid>
                
                    <category>
                        <![CDATA[ internet ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tv ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Jessica Wilkins ]]>
                </dc:creator>
                <pubDate>Mon, 15 Nov 2021 20:45:25 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/11/julian-o-hayon-w4znns7NTA0-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>IPTV stands for Internet Protocol Television. It's a service you can use to watch your favorite TV shows without needing to sign up for cable. But how does it work exactly?</p>
<p>In this article, I will break down the different types of IPTV services including free and paid services. </p>
<h2 id="heading-what-is-iptv">What is IPTV?</h2>
<p>IPTV services provide you access to multiple TV channels using your internet connection. Some of the services are free while others will charge a monthly subscription fee. </p>
<p>IPTV services are typically cheaper than high priced cable subscriptions. These services also allow you to watch videos on your own schedule as opposed to the prearranged times from the cable provider.</p>
<p>A lot of the paid IPTV services will offer live TV channels which include live sporting events. IPTV services will also offer a collection of movies. </p>
<h2 id="heading-types-of-iptv-services">Types of IPTV services</h2>
<p>Here are some popular types of IPTV services.</p>
<h3 id="heading-video-on-demand-vod">Video on Demand (VOD)</h3>
<p>The Video on Demand service allows you to watch your favorite TV shows and movies whenever you want to. </p>
<p>Here are some popular paid VOD services </p>
<ul>
<li><a target="_blank" href="https://www.disneyplus.com/welcome/subscribe-now">Disney+</a></li>
<li><a target="_blank" href="https://www.hulu.com/welcome?orig_referrer=https%3A%2F%2Fwww.google.com%2F">Hulu</a></li>
<li><a target="_blank" href="https://www.netflix.com/">Netflix</a></li>
<li><a target="_blank" href="https://www.amazon.com/amazonprime">Amazon Prime</a></li>
</ul>
<p>Here are some popular free VOD services</p>
<ul>
<li><a target="_blank" href="https://www.peacocktv.com/collections/watch-free">Peacock</a></li>
<li><a target="_blank" href="https://pluto.tv/en/live-tv/bet-pluto-tv">Pluto TV</a></li>
<li><a target="_blank" href="https://tubitv.com/">Tubi</a></li>
<li><a target="_blank" href="https://www.crackle.com/">Crackle</a></li>
</ul>
<h3 id="heading-live-television">Live Television</h3>
<p>There are IPTV services where you can watch live events including award shows and sporting events. This content is broadcasted over the internet instead of traditional cable. </p>
<p>Here are some popular paid options for Live TV</p>
<ul>
<li><a target="_blank" href="https://www.sling.com/">Sling TV</a></li>
<li><a target="_blank" href="https://www.hulu.com/live-tv">Hulu Live</a> </li>
<li><a target="_blank" href="https://www.foxsports.com/live">Fox Sports Live</a></li>
</ul>
<h3 id="heading-tv-on-demand">TV on Demand</h3>
<p>This IPTV option is where you have to pay for each TV show and movie. Most of these options allow you to pay for each episode you are interested in or pay for the whole season.</p>
<p>The <a target="_blank" href="https://play.google.com/store?hl=en_US&amp;gl=US">Google Play Store</a> and <a target="_blank" href="https://www.apple.com/itunes/">Apple iTunes</a> are examples of TV on Demand IPTV services. </p>
<p>If you plan on watching multiple TV shows and movies, then it would be cheaper to go for the Video on Demand IPTV services. </p>
<p>If you are only interested in watching a couple of movies or a TV show, then the TV on Demand option would work. </p>
<h2 id="heading-are-iptv-services-available-in-all-countries">Are IPTV services available in all countries?</h2>
<p>IPTV services are available in most countries, but you still need to check if it is available in your country. It is always best to go with a trusted provider with an established reputation.</p>
<h2 id="heading-should-you-use-a-vpn-with-iptv-services">Should you use a VPN with IPTV services?</h2>
<p>VPN stands for Virtual Private Network and it allows you to use the internet in a secure and anonymous fashion. VPN's also work well with IPTV services.</p>
<p>Some IPTV services have been blocked by their Internet Service Provider, but using a VPN ensures that your streaming content will not get blocked. </p>
<p>VPN's also sometimes have better performance for streaming content.</p>
<p>Before you consider using a VPN, you need to check on two things:</p>
<ol>
<li>Does your country allow the use of VPNs?</li>
<li>Does your IPTV service support VPNs?</li>
</ol>
<h2 id="heading-devices-that-work-with-iptv-services">Devices that work with IPTV services</h2>
<p>IPTV services can work with a variety of devices including computers, smart TVs, mobile phones, tablets, and more. You can also use internet TV sticks and boxes for IPTV services.</p>
<p>These internet TV sticks and boxes are small digital media players that are easy to setup and use with your favorite IPTV services. </p>
<p>Here is a list of popular internet TV sticks and boxes</p>
<ul>
<li><a target="_blank" href="https://www.amazon.com/fire-tv-stick-with-3rd-gen-alexa-voice-remote/dp/B08C1W5N87">Amazon Fire TV stick</a></li>
<li><a target="_blank" href="https://www.nowtv.com/ie/smart-tv-stick">Now TV Smart Stick</a></li>
<li><a target="_blank" href="https://www.roku.com/products/streaming-stick">Roku Streaming Stick</a></li>
<li><a target="_blank" href="https://www.apple.com/tv-home/">Apple TV</a></li>
<li><a target="_blank" href="https://store.google.com/us/product/chromecast_google_tv?hl=en-US">Chromecast with Google TV</a></li>
</ul>
<h2 id="heading-what-should-you-consider-when-choosing-an-iptv-service">What should you consider when choosing an IPTV service</h2>
<p>There are many options out there for IPTV services and you want to make sure you are choosing the right service for you. </p>
<p>Here are some important points to consider.</p>
<h3 id="heading-price">Price</h3>
<p>While there are a lot of free IPTV services, most of them will have commercials built into the content. If you want to watch your content commercial free, then you will have to pay for it.</p>
<p>Make sure to do comparison shopping for pricing and the types of content they offer. Some subscriptions can be as little as $5 a month and upwards of $20 or more a month. </p>
<h3 id="heading-good-customer-support">Good Customer Support</h3>
<p>It can be frustrating when your service is not working and there is no good way to get in contact with the service provider. You want to make sure that your IPTV service has good customer support to help troubleshoot the issues you are having.</p>
<p>Make sure to read through customer service reviews before deciding on an IPTV service. </p>
<h3 id="heading-does-it-work-with-a-vpn">Does it work with a VPN?</h3>
<p>Not all IPTV services support the use of VPNs. You want to double check with the IPTV service provider before signing up with them.</p>
<p>I hope you found this article helpful. </p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What is my IP Address for my Router? How to Find your Wifi Address ]]>
                </title>
                <description>
                    <![CDATA[ Sometimes you might need to know your router’s IP address. This will give you access to the setup page so you can make configuration changes like changing passwords, kicking out unwanted users, limiting users, and so on. In this article, I will show ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-is-my-ip-address-for-my-router-how-to-find-your-wifi-address/</link>
                <guid isPermaLink="false">66adf27b7550d4f37c2019dd</guid>
                
                    <category>
                        <![CDATA[ internet ]]>
                    </category>
                
                    <category>
                        <![CDATA[ wifi ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Kolade Chris ]]>
                </dc:creator>
                <pubDate>Wed, 20 Oct 2021 19:36:40 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/10/router-image.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Sometimes you might need to know your router’s IP address. This will give you access to the setup page so you can make configuration changes like changing passwords, kicking out unwanted users, limiting users, and so on.</p>
<p>In this article, I will show you how to find out what your router IP address is on a Windows machine and Android smartphone.</p>
<h2 id="heading-what-is-an-ip-address">What is an IP Address?</h2>
<p>But before we jump in, let's clarify – what is an IP address?</p>
<p>The abbreviation IP stands for “internet protocol”. The internet protocol is a set of rules governing how computers, phones, and other devices share data over the internet or local networks. </p>
<p>An IP address is a special numerical identifier that allows information to be sent between various devices on a network. </p>
<h2 id="heading-how-to-find-your-wifi-address-on-a-windows-computer">How to Find your Wifi Address on a Windows Computer</h2>
<p>To find out what the IP address of your router is (or of any other device on which you have access to its Wifi), you can either use the command prompt or gain access to it through the control panel.</p>
<h3 id="heading-how-to-find-your-wifi-address-on-a-windows-computer-through-the-command-prompt">How to Find your Wifi Address on a Windows Computer through the Command Prompt</h3>
<p><strong>Step 1</strong>: Click on Start (Windows logo) or press the <code>WIN</code> on your keyboard.
<strong>Step 2</strong>: Search for “cmd” and hit <code>ENTER</code> to launch the command prompt.
<img src="https://www.freecodecamp.org/news/content/images/2021/10/ss-1-6.jpg" alt="ss-1-6" width="600" height="400" loading="lazy"></p>
<p><strong>Step 3</strong>: Right inside the command prompt, type in “ipconfig” and hit Enter. 
The number assigned to “Default Gateway” is your router’s IP address. 
<img src="https://www.freecodecamp.org/news/content/images/2021/10/ss-2-7.jpg" alt="ss-2-7" width="600" height="400" loading="lazy"> </p>
<h3 id="heading-how-to-find-your-wifi-address-on-a-windows-computer-through-the-control-panel">How to Find your Wifi Address on a Windows Computer through the Control Panel</h3>
<p><strong>Step 1</strong>: Click on Start and search for “Control Panel”, then click on the first search result or hit <code>ENTER</code> to launch the Control Panel.
<img src="https://www.freecodecamp.org/news/content/images/2021/10/ss-3-5.jpg" alt="ss-3-5" width="600" height="400" loading="lazy"> </p>
<p><strong>Step 2</strong>: Under “Network and Internet”, click on “View network status and tasks”.
<img src="https://www.freecodecamp.org/news/content/images/2021/10/ss-4-6.jpg" alt="ss-4-6" width="600" height="400" loading="lazy"></p>
<p><strong>Step 3</strong>: You will see your router name on the right. Click on it and a small window will pop up.
<img src="https://www.freecodecamp.org/news/content/images/2021/10/ss-5-2.jpg" alt="ss-5-2" width="600" height="400" loading="lazy"></p>
<p><strong>Step 4</strong>: In the pop-up box, click on “Details”.
<img src="https://www.freecodecamp.org/news/content/images/2021/10/ss-6-4.jpg" alt="ss-6-4" width="600" height="400" loading="lazy"></p>
<p>After clicking on the “Details” button, another small window will pop up showing various information about your router. The value assigned to IPv4 is your router's IP address.
<img src="https://www.freecodecamp.org/news/content/images/2021/10/ss-7-2.jpg" alt="ss-7-2" width="600" height="400" loading="lazy"></p>
<h2 id="heading-how-to-find-your-wifi-address-on-an-android-smartphone">How to Find your Wifi Address on an Android Smartphone</h2>
<p>Android devices do not have a built-in option to check the router’s addresses out of the box. But you can use a third-party app like Wifi Analyzer.</p>
<p>If you have Wifi Analyzer installed on your Android smartphone, launch the app.
<img src="https://www.freecodecamp.org/news/content/images/2021/10/InkedScreenshot_20211020-105514-2.jpg" alt="InkedScreenshot_20211020-105514-2" width="600" height="400" loading="lazy"></p>
<p>You will see the channel graph tab immediately.
<img src="https://www.freecodecamp.org/news/content/images/2021/10/InkedScreenshot_20211020-105529.jpg" alt="InkedScreenshot_20211020-105529" width="600" height="400" loading="lazy"></p>
<p>Swipe to the Access Points tab and you will see the IP address of your router.
<img src="https://www.freecodecamp.org/news/content/images/2021/10/InkedScreenshot_20211020-105543.jpg" alt="InkedScreenshot_20211020-105543" width="600" height="400" loading="lazy"></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In this article, you learned how to find the IP address of your router on a Windows computer and Android smartphone. </p>
<p>You can use your router without knowing what the IP address is, but knowing it gives you more control over it and you can personalize it.</p>
<p>Thank you for reading. If you find this article helpful, please share it with your friends and family.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ IPV4 vs IPV6 – What is the Difference Between IP Addressing Schemes? ]]>
                </title>
                <description>
                    <![CDATA[ The Internet is one of our greatest inventions. Millions of people use the Internet every second of the day, and it has changed many aspects of our lives – from creating new jobs and a new way of working to influencing how news is consumed and how de... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/ipv4-vs-ipv6-what-is-the-difference-between-ip-addressing-schemes/</link>
                <guid isPermaLink="false">66b1e44596a9e0a75592bbc6</guid>
                
                    <category>
                        <![CDATA[ computer network ]]>
                    </category>
                
                    <category>
                        <![CDATA[ computer networking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ internet ]]>
                    </category>
                
                    <category>
                        <![CDATA[ ipv6 ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Dionysia Lemonaki ]]>
                </dc:creator>
                <pubDate>Fri, 15 Oct 2021 16:30:13 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/10/nasa-1lfI7wkGWZ4-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>The Internet is one of our greatest inventions.</p>
<p>Millions of people use the Internet every second of the day, and it has changed many aspects of our lives – from creating new jobs and a new way of working to influencing how news is consumed and how decisions are made.</p>
<p>Although it's been around for quite a while now, the underlying technologies that power it have not changed that much since its invention.</p>
<p>In this article you'll learn about the Internet Protocol, or IP - what it is, how it works, and the differences between its different versions. </p>
<h2 id="heading-how-computers-communicate-over-the-internet">How computers communicate over the Internet</h2>
<p>Computers, and devices in general, connect and communicate with one another on the Internet in a couple different ways: either with the help of a large number of undersea cables or wirelessly.</p>
<p>Information gets broken down into packets, or smaller pieces of data, that get transferred by routers to the correct destination and back.</p>
<p>However, for computers to communicate in the first place, there needs to be a set and universally agreed upon common language of communication that all devices understand.</p>
<p>This need for a standardized method of communication during data exchange led to the creation of protocols.</p>
<p>One of the key protocols is the <em>Internet Protocol</em>, or IP.</p>
<p>The Internet Protocol has a particular syntax that defines a set of rules and a specified format for how communication will take place between devices over various networks. It essentially makes communication between computers possible.</p>
<p>Those rules cover a large number of things, like:</p>
<ul>
<li>identifying and locating each device on a network</li>
<li>having devices then talk to each other</li>
<li>dictating how the format and transfer of packets of data will look like</li>
<li>determining how each packet will reach the desired destination</li>
<li>choosing the fastest and most efficient path possible for the router to take, and</li>
<li>deciding how to handle errors when they occur.</li>
</ul>
<p>Each and every device connected to a network needs a way to identify itself across various networks.</p>
<p>When you want to send a letter to someone, you need a way of identifying that person's home so the postal service knows where to deliver the letter. You don't want the letter to be delivered to the wrong person! </p>
<p>This is why, when sending a letter, you include the recipient's unique home address as the destination address and also your unique home address, which is the return address. </p>
<p>Each house has a unique address that sets it apart and identifies it.</p>
<p>Similarly, the way to identify computers and devices on the Internet so we can transmit and exchange data, is by knowing their IP address. </p>
<p>To send an e-mail to someone, you need to know their computer's IP address. The e-mail gets broken down into smaller chunks, or packets. The way they  reach the correct destination is because each packet also includes IP information. </p>
<p>When sending something over the Internet there needs to be a destination address and a return address on each packet. IP addresses are how computers find one another and know their respective locations.</p>
<p>The Internet Protocol is in charge of defining the format of IP addressing.</p>
<h2 id="heading-what-is-an-ip-address">What is an IP address?</h2>
<p>An IP address is a network address, and every device that connects to a computer network gets one.</p>
<p>An IP address is a unique sequence of numbers assigned to a device that's written in a certain format. It globally identifies every device in the interconnected network.</p>
<p>As mentioned earlier, packets get routed to the correct and intended destination and devices are able to send and receive information over the Internet because each device is assigned a unique IP address.</p>
<p>You'll likely not ever have to deal directly with IP addresses or know any by heart in order to send information over the Internet - it's all happening behind the scenes.</p>
<p>If you're curious and want to know your IP address, head to Google.com and type in "What's my IP" and you'll see your unique address in the first result.</p>
<p>That being said, there are are few different types of IP addresses, which you'll see in the following sections.</p>
<h3 id="heading-private-vs-public-ip-addresses">Private vs Public IP addresses</h3>
<p>Everyone has two kinds of IP addresses: public and private.</p>
<p>The public one is given to your home router by your Internet Service Provider (ISP) and it's the primary address for your whole local network.</p>
<p>In your home you may have more than one laptop, smartphone, or tablet. Each device has its own IP address, but they are all also under the same main, public IP address. </p>
<p>This is how all devices in your home get connected to the Internet – via the main public IP address. </p>
<p>A public IP address is unique, meaning there are no two identical IP addresses used at a given moment.</p>
<p>As mentioned above, if you have many devices in your home, then each has its own IP address. This address is a private IP address, and it cannot access the Internet directly.</p>
<p>As these devices connect to the Internet via the router (which has a public IP address), the router needs a way to identify and recognise each device separately, before it connects it to the Internet.</p>
<p>The way the router does this is by assigning an individual private IP address to each device. Then it remembers that address each time the device wants to get connected to the Internet.</p>
<h3 id="heading-dynamic-vs-static-ip-addresses">Dynamic VS Static IP Addresses</h3>
<p>Public IP addresses are split into two categories: dynamic and static.</p>
<p>Once a device gets connected to the Internet, your Internet Service Provider gives you one of their available IP addreses for the duration of the time you stay connected. This is how the device will be able to send and receive data.</p>
<p>The next time you connect to the Internet, your ISP will provide you with a <em>different</em> IP address. This means that each time you connect to the Internet, you have a different IP address. This is why this type of IP address is called dynamic - it's ever changing.</p>
<p>On the other hand, a static IP address never changes. It's a permanent address. The address is provided once and you can expect it to stay the same.</p>
<p>Static IP addresses are often used by DNS Servers. A DNS server is a large computer that stores files that make up a website. Their job is to send those files each time they are requested by a user who wants to view the website.</p>
<h2 id="heading-ipv4-vs-ipv6-whats-the-difference">IPv4 vs IPv6 – What's the Difference?</h2>
<h3 id="heading-what-is-an-ipv4-address">What is an IPv4 address?</h3>
<p>IPv4 is the first, and most widely used, version of the Internet Protocol.</p>
<p>It was first launched in  1980 and is used to this day.</p>
<p>It's a 32-bit address and it's made up of 4 blocks – with each block being separated by a dot. </p>
<p>It looks something like this:</p>
<pre><code>XXX.XXX.XXX.XXX
</code></pre><p>Each block can fit up to 3 digits, and the numbers in the block range from 0 to 255, in <em>decimal</em> values.</p>
<p>An example of an IP address is:</p>
<pre><code><span class="hljs-number">142.250</span><span class="hljs-number">.185</span><span class="hljs-number">.206</span>
</code></pre><p>Here's another example:</p>
<pre><code><span class="hljs-number">69.171</span><span class="hljs-number">.250</span><span class="hljs-number">.35</span>
</code></pre><p>These decimal numbers are converted to binary, a machine language, which is the only language computers can directly understand. </p>
<p>These decimal numbers, in binary, are actually 4 blocks of 8 binary digits (or bits).</p>
<p>This is why it is called a 32-bit address – it's an address made up of a sequence of 32 binary digits. </p>
<p>For example, the address you saw earlier,<code>142.250.185.206</code> is:</p>
<pre><code><span class="hljs-number">10001110.11111010</span><span class="hljs-number">.10111001</span><span class="hljs-number">.11001110</span>
</code></pre><p>in binary, under the hood.</p>
<p>So, <code>2^32</code> is a total of 4,294,967,296 unique addresses. That is the limit  of IP addresses IPv4 can provide for each device to connect to the Internet.</p>
<p>You would think that this large number is more than enough. But, as the population continues to grow and each person owns more and more devices (and each device needs its own IP address) we have been running out of addresses for quite some time now.</p>
<h3 id="heading-what-is-ipv6">What is IPv6?</h3>
<p>IPv6 is the latest version of the Internet Protocol which was first deployed in 1998.</p>
<p>It's the successor of IPv4 and there will be a slow shift towards it in the future.</p>
<p>Whereas IPv4 is a numeric address, IPv6 uses hexadecimal, alphanumeric characters - meaning it contains numbers <em>and</em> letters.</p>
<p>In the way IPv4 uses 4 blocks that each contain up to 3 digits, IPv6 uses 8 blocks that contain 4 hexadecimal characters each.</p>
<p>In IPv4, each block is separated by a do t(<code>.</code>). In IPv6 each block is separated by a colon (<code>:</code>).</p>
<p>So, an IPv6 address looks something like this:</p>
<pre><code>XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX
</code></pre><p>For example:</p>
<pre><code><span class="hljs-number">2001</span>:<span class="hljs-number">0</span>db8:<span class="hljs-number">85</span>a3:<span class="hljs-number">0000</span>:<span class="hljs-number">0000</span>:<span class="hljs-number">8</span>a2e:<span class="hljs-number">0370</span>:<span class="hljs-number">7334</span>
</code></pre><p>It's a 128-bit address, meaning that there are <code>2^128</code> addresses available.</p>
<p>That means there are 340,282,366,920,938,463,463,374,607,431,768,211,456 addresses we can use on the Internet. </p>
<p>That is 340 <em>undecillion</em> addresses, which we hope will be more than enough for everyone!</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>And there you have it! You now know the basics of the Internet Protocol. It's the underlying technology all computers and devices use to be able to connect with one another and receive and exchange information.</p>
<p>You also learned the basic differences between IPv4 and IPv6. And in a nutshell, IPv6 provides far more IP addresses than IPv4 does.</p>
<p>If you are interested in learning more about how the Internet works, check out this <a target="_blank" href="https://www.youtube.com/watch?v=zN8YNNHcaZc&amp;t=1s">video on freeCodeCamp's YouTube channel</a> that explains the fundamentals of computer networking.</p>
<p>Thanks for reading and happy learning 😊</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How does the internet work? ]]>
                </title>
                <description>
                    <![CDATA[ The internet is a big part of our daily lives and we use it constantly. But how does it actually work? We just published a course on the freeCodeCamp.org YouTube channel that will teach you how the internet works along with basic networking principle... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-does-the-internet-work/</link>
                <guid isPermaLink="false">66b202cc297cd6de0bd54643</guid>
                
                    <category>
                        <![CDATA[ internet ]]>
                    </category>
                
                    <category>
                        <![CDATA[ youtube ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Beau Carnes ]]>
                </dc:creator>
                <pubDate>Mon, 02 Aug 2021 17:39:24 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/08/howinternet.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>The internet is a big part of our daily lives and we use it constantly. But how does it actually work?</p>
<p>We just published a course on the freeCodeCamp.org YouTube channel that will teach you how the internet works along with basic networking principles. </p>
<p>Ian Frost teaches this course. He is an experienced teacher and is excellent at creating diagrams to simply explain complex topics.</p>
<p>You don't need any prior knowledge to follow this course since it teaches you everything from scratch.</p>
<p>The internet is actually more than what it appears to be. In this course you will learn all the key concepts related to the internet in a very visual way. You will see exactly how the Internet works. </p>
<p>In this course you will learn:</p>
<ul>
<li>how the internet works</li>
<li>fundamental network devices</li>
<li>how electronic devices in different parts of the world communicate with each other.</li>
<li>what is going on in the background when you watch a video on YouTube</li>
<li>what is the ISP?</li>
<li>fundamental networking concepts</li>
<li>and more!</li>
</ul>
<p>Watch the full course below or <a target="_blank" href="https://www.youtube.com/watch?v=zN8YNNHcaZc">on the freeCodeCamp.org YouTube channel</a> (2-hour watch).</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/zN8YNNHcaZc" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<h2 id="heading-transcript">Transcript</h2>
<p>(autogenerated)</p>
<p>This course will help someone with no technical knowledge.</p>
<p>Understand how the internet works in frost teaches this course with tons of visuals, just like he hastaught 1000s of people on Udemy.</p>
<p>The internet is a part of our daily life, and we use it constantly.</p>
<p>But what is the internet? Have you ever really thought about it? Have you ever wondered what happens inthe background? Then you enter a web page? If your answer to all these questions is yes, you are definitely looking at the right course in this course, I assume you don't know anything.</p>
<p>And I am slowly explaining what the internet is, you don't need any prior knowledge to follow this course,since this course tells you everything from scratch, which mean abstractions, these abstractions will allow you to understand the subject without knowing details.</p>
<p>I think everyone who uses the internet should know its basic features.</p>
<p>Everyone who uses the internet needs to know the ISP, everyone who uses the internet needs to know thatthe internet is just cables spread all over developed.</p>
<p>And in this course, we will go on a journey together.</p>
<p>And we will look at all these concepts in a very visual way.</p>
<p>I mean, you will see exactly how the internet works, which are eyes.</p>
<p>In addition, at the end of the course, there are some questions related to this course.</p>
<p>And by answering them, you can benefit from this course, at the maximum level.</p>
<p>Okay.</p>
<p>regardless of your age or profession, this course is for everyone, you will absolutely understand what theinternet is when you finish this course.</p>
<p>So let's dive into it.</p>
<p>Now, we are going to talk about a scenario.</p>
<p>Let's say you are the system administrator of a small company, and your boss wants you to enable all thesecomputers to communicate with each other.</p>
<p>I'm in PC, one should be able to communicate with PC seven, our PC five should be able to communicate withPC four, and so on.</p>
<p>He's got the point.</p>
<p>But the question is, how do we do such a task.</p>
<p>And this is where the solution device comes into play.</p>
<p>The switch is the device we use for computers in the same environment to communicate with each other.</p>
<p>When I say in the same environment, what I mean is that I'm talking about computers in the same officehouse or at work close distance to each other.</p>
<p>And this scenario is a good example for such a situation, there is an office and in this office, we haveseven computers that communication of them is required.</p>
<p>Wonderful.</p>
<p>We have a switch to accomplish the communication of computers.</p>
<p>This is good.</p>
<p>However, the question is, Can these seven computers communicate with each other right now? And the answeris big.</p>
<p>Now, because first of all, these seven computers need to interact with the switch somehow.</p>
<p>But how can we do that? I know that you have some ideas and you are probably guessing right we must usecables to connect computers to the switch.</p>
<p>As you can see, we are connecting all the computers to the switch with the help of cables.</p>
<p>We generally use copper cables for this task.</p>
<p>And the type of these copper cables can generally be cat five cable or cat six cable in smallenvironments.</p>
<p>By the way, cat six cables are faster than cat five cables and cat represents category okay.</p>
<p>On the other hand, in addition to copper cables, some switches support fiber optic cables as well.</p>
<p>And it is important to note that fiber optic cables are generally much faster compared to copper cables indata transmission.</p>
<p>This is very important.</p>
<p>And for switch devices, there is a crucial point to be aware of.</p>
<p>Please note that if there is a switch in the environment, and if you want to connect computers to thatswitch, we must definitely use a cable that has generally a copper cable or fiber optic cable.</p>
<p>What I have tried to say is with wireless technology, you cannot connect computers to a switch switchesonly work with cables.</p>
<p>This is very vital guys.</p>
<p>If you want to use a switch device, you have to use cable to connect your devices to the switch.</p>
<p>It's that simple.</p>
<p>However, if you want to connect computers in the same environment to each other, by using all the wirelesstechnology, you can use an access point device in If I switch device, I mean, you can use both a switch device or an access point device.</p>
<p>In order to connect all the seven computers, both of them separately is acceptable for this purpose.</p>
<p>The only difference between these devices is access points use wireless technology while switches usecables.</p>
<p>Okay, there are seven computers in this environment.</p>
<p>And we can connect these seven computers.</p>
<p>By using switches and cables, just like you see in the picture.</p>
<p>Or in the same way, we can use an access point device instead of a switch device.</p>
<p>And if you use an access point device access point uses wireless technology instead of cables whilecommunicating with devices.</p>
<p>In summary, both the switch device or an access point device enable these seven computers to communicatethis is obvious, but one uses cable and the other one uses wireless technology.</p>
<p>Anyway, what I just want you to know right now is we generally use copper cables in order to connectcomputers to the switch in the environment such as a home or office.</p>
<p>By the way, I want to focus on the source device instead of the access point device in discourse,wherever.</p>
<p>And at this moment, all these computers can communicate with each other which is because they connected tothe switch by using cables.</p>
<p>And this means that they created a network.</p>
<p>In other words, the reason that these computers can communicate with each other is all of them are in thesame network and we call this special network as local area network or briefly, LAN.</p>
<p>A local area network is a collection of devices connected together in non physical location, such as abuilding, office or harm.</p>
<p>As I just said, if you want to create a LAN, this location must be a restricted location in terms of area,I mean, you cannot create a LAN between computers located in United States and computers located in Russia.</p>
<p>On the other hand, this area is very suitable area in order to create a LAN.</p>
<p>Therefore, these computers can communicate with each other because all of them are on the same land.</p>
<p>With the help of this search search, we can deduce that if you want to create a LAN, when it is the wishdevice.</p>
<p>By using a switch device, we can create a local area network.</p>
<p>And if we consider the millions of local area network all over the world, we can easily understand howimportant is swish device is, you might think that all the houses in the world are actually a local area network, you have a LAN in your house or your neighbor's home also has a LAN or there is also a LAN in the office where you work.</p>
<p>Okay, you catch the idea.</p>
<p>And now let's take a closer look at the communication of computers.</p>
<p>And what this event actually represent.</p>
<p>Let's say pc one was to send a message to the PCs six.</p>
<p>By the way, the messages generated by computers has a few special names, some people call them as packetand some people call them as frame both of them is okay but in this course, I prefer to use packet instead of frame.</p>
<p>Okay, PC one, you set a packet to the PC six.</p>
<p>As you see in Division, the packet first goes to the switch, and then the switch looks at the inside ofthe packet or learns the destination of the packet.</p>
<p>And finally, the switch sends the packet to its destination.</p>
<p>And if pc one can set a packet to the PC six, this means that PC One and PC six can communicate with eachother.</p>
<p>The logic is basically this if a computer can send a packet to another computer, this refers to these twocomputers are on the same network and they can communicate with each other.</p>
<p>This information is so crucial guys, okay.</p>
<p>However, maybe by looking at only this switch image, what the switch device actually is may not be fullyvisualized in your mind.</p>
<p>For this reason, we will now examine this slide for you to understand the event better.</p>
<p>This is the real version of a switch device.</p>
<p>And as you can see, there are many ports on a switch device This is important also the number of portsvaries from one switch device to another switch device.</p>
<p>I mean different switches have different numbers of ports.</p>
<p>Some switches have 10 ports, while some switches have more than transports and of course, this generallyleads to an increase in price.</p>
<p>Okay.</p>
<p>By the way, these ports have a special name and they are called LAN ports.</p>
<p>This probably makes sense to you because as you know, we create lands by using 3g devices.</p>
<p>For this reason, I think it is so reasonable to call these ports LAN ports.</p>
<p>Because by connecting these computers to these ports, we can create a LAN.</p>
<p>And in addition to this, there are LAN ports on the back of our computers, or on the side of our laptops,just like these LAN ports, you can see the Related regionals on the right side.</p>
<p>And to establish a connection between computers and the switch, we connect the LAN port on the computerand the LAN port on the switch with the help of a cable.</p>
<p>So let's do this.</p>
<p>Let's start with this port and PC one, then, let's connect this port and P theater.</p>
<p>After that, let's connect this port and PC three.</p>
<p>And finally, I want to make a connection between this port and PC four.</p>
<p>Wonderful.</p>
<p>And currently, these computers can communicate with each other.</p>
<p>But how exactly does this communication happen? From a switch perspective, let's take a look at this,let's say pc one master communicate with PC far saw, it will send a packet to the PC far this packet will go to this part of the switch first.</p>
<p>And there we go.</p>
<p>Afterwards, that part, we will give the packet to the hardware inside the switch Okay.</p>
<p>Then, this switch, we look inside this packet, our loves his destination.</p>
<p>After that the switch give this packet to this port that is connected to PC far.</p>
<p>And finally, the switch says the packet to the PC far.</p>
<p>Okay, wonderful.</p>
<p>And to summarize, currently, we have connected these four computers to each other thanks to this switch.</p>
<p>This means we have created a local area network.</p>
<p>And these computers can easily communicate with each other.</p>
<p>Since they're on the same LAN.</p>
<p>I hope everything is quite good software.</p>
<p>And the switch device is visualized spreader in your mind, thanks to this slide.</p>
<p>But there is a little issue here.</p>
<p>Let me explain.</p>
<p>If you are aware, our computers were in the same network.</p>
<p>And we have only talked about the communication between dos devices.</p>
<p>We have never talked about how these computers can connect to the internet.</p>
<p>Right? So the question is, Can these computers communicate with the internet just by having a switchdevice? And this my friends will be the question that we are looking for an answer in the next lesson.</p>
<p>See you guys soon.</p>
<p>Bye.</p>
<p>In our previous lesson, we briefly talked about how to connect computers in our office, and how do wecreate a network and I said that we can create a LAN with the help of a service device.</p>
<p>But the problem is currently these computers can only communicate amongst themselves, they cannotcommunicate with the internet, because the all the task of the switch is to create a LAN and enable the communication of the devices in the same land.</p>
<p>Great.</p>
<p>And by the way, I would like to remove this lamp statement from the visual because you can understand thatthere is a LAN here, thus, we can work more comfortably.</p>
<p>Wonderful.</p>
<p>And the main question is, how do we connect these computers to the internet.</p>
<p>And this is where the router device comes into play.</p>
<p>Let me explain.</p>
<p>The main task of the router is to enable computers to connect to the internet.</p>
<p>Without a router it is impossible for us to connect to the internet.</p>
<p>And in order to provide this connection.</p>
<p>I mean, in order to provide a connection to the Internet.</p>
<p>First of all, we must connect this switch to this router.</p>
<p>And this cable is a copper cable.</p>
<p>Just like other cables.</p>
<p>This is good.</p>
<p>But currently, what we have to do isn't over we still can't connect to the internet in this situationbecause we need a connection between the water and the internet as well.</p>
<p>And as you know, a special cable comes to our homes or offices and this cable is given us by internetservice provider and takes to this cable.</p>
<p>We connect to the internet if you have never heard of internet service service provider.</p>
<p>Don't worry, we will talk about it in detail.</p>
<p>But for now, all you need to know is the internet service provider is giving us this cable for a certainamount of money so that we can connect to the internet easily.</p>
<p>Okay, so currently, we have everything necessary to connect to the internet.</p>
<p>By using these computers, hams, let's see the basic tasks of the switch and router one by one on theanimation.</p>
<p>These seven computers in the office can communicate with each other thanks to the switch.</p>
<p>For example, let's say pc one was to communicate with PC five, for this purpose, PC, one will send apacket to the PC five, sir, is you know, the packet firstly goes to the switch.</p>
<p>And afterwards, this switch learns the destination of the packet.</p>
<p>And finally, this switch sends the packet to its destination.</p>
<p>And there we go.</p>
<p>This is how two computers in the same land communicate with each other.</p>
<p>And please always remember, a switch device is enough for us in order for communication of devices in thesame land.</p>
<p>On the other hand, a router has no role in the communication of different devices in the same line, likePC One and PC five.</p>
<p>This is very vital.</p>
<p>Okay.</p>
<p>I hope I could explain the events.</p>
<p>And however guys, what if pc one was to communicate with the internet? In other words, what will happen ifpc one first to send a packet to the internet? Let's see.</p>
<p>First of all, you should remember this information.</p>
<p>If a computer can send packets to the internet.</p>
<p>This means that this computer communicates with the internet.</p>
<p>For the speaking I believe that you exactly understand the logic of this event anymore.</p>
<p>If we can send packets from one point to another point, these two points can communicate.</p>
<p>It's that simple.</p>
<p>But the question is, how will pc one send packets to the internet.</p>
<p>To be able to do this first PC, one must start its packet to the switch just like before, because there isno other way for PC one to be able to eat the router, right? I mean, if pc one was to send a packet to the internet, this packet must reach the router no matter what, because the router is a door to access the internet.</p>
<p>This is obvious.</p>
<p>Hence, if pc one wants to communicate with the router, it must start its packet to the switch first.</p>
<p>After that, the switch looks at inside of the packet and understand that the packet wants to go to theinternet.</p>
<p>So it sends the packet to the router.</p>
<p>And there we go.</p>
<p>And then the router firstly looks at the inside of the packet and understand that the packet wants to goto the internet.</p>
<p>And afterwards, it sends the packet to the internet over this part.</p>
<p>And there we go.</p>
<p>By the way, if you're aware, we have plucked this cable that we purchased from the ISP into this port,this is our base.</p>
<p>I believe that currently you can easily imagine in an intuitive manner, how the cables coming to routerlike this or like this are plugged into the ports.</p>
<p>I mean, there are some ports on router, and you need to put the cables into that box.</p>
<p>It's that simple.</p>
<p>I will not show this visually, because detailed information about the ports isn't important for you.</p>
<p>At this moment, you just must understand the logic behind the router.</p>
<p>Okay.</p>
<p>And as a result, PC one sent its packet to the internet.</p>
<p>In other words, PC one and the internet communicated.</p>
<p>And the device that helped us to connect to the internet is durata.</p>
<p>Wonderful.</p>
<p>I believe that you understand the most basic tasks of the sewage and water.</p>
<p>And I hope the information may be useful for better understanding.</p>
<p>However, I want to ask you two questions.</p>
<p>My first question is, can you visualize the internet in your mind? And the second question is, whatexactly does the internet meme and these will be the equations that we are going to discuss in the next lessons.</p>
<p>See you guys.</p>
<p>Before discussing the meaning of connecting to the internet, from a computer perspective, I think it ishelpful to know what the internet exactly stands for.</p>
<p>Because if you're really starting from scratch, I mean I assume that you are real newbies, you may notknow exactly what the internet is.</p>
<p>For this reason, I want to visualize the internet for a better understanding.</p>
<p>To do this, in this lesson, we are going to see how a packet moves on the internet.</p>
<p>By the way, keep in mind that this model USA is a simplified model designed to make the concept is thejohn deere stat.</p>
<p>So this structure in real life is much more complex than you see individual.</p>
<p>But with this simplified model, you will understand the logic of the event very well, I promise you.</p>
<p>And I believe that's all you need right now is you can see, there are many routers on the internet, right.</p>
<p>And there is a special reason for this.</p>
<p>So at this moment, I would like to give you another piece of information about errata.</p>
<p>irata is a device required for a computer or electronic device to connect to the internet, you know thisdefinition.</p>
<p>On the other hand, you can think of the router is the device we use to communicate with your computer inanother part of the world, or you can think of the router is the device we use to communicate with a computer in a different plan.</p>
<p>I mean, if you are aware, there is a LAN here, right.</p>
<p>And there is another LAN here, this is obvious.</p>
<p>Therefore, we can draw the following conclusion connecting to the internet actually can stand forconnecting to the another computer located anywhere in the world.</p>
<p>I mean, you can think of the internet is the structure that connects all the lands all over the world.</p>
<p>I want to repeat this again, you can think of the internet is a structure that connects all lamps, allover devout.</p>
<p>And as you know, there are millions of lamps connected to the internet, except these lands.</p>
<p>Wonderful.</p>
<p>I hope that everything is good so far, but there's a thing that we need to consider.</p>
<p>So I want to ask you a question.</p>
<p>Why are there so many routers here? Let me explain it in a simple manner.</p>
<p>First, you should know that these routers are distributed around the world in an organized manner.</p>
<p>However, routers aren't the only devices in the structure.</p>
<p>This is important.</p>
<p>There are tons of routers, and other different devices in this structure, distributed pre divide layer.</p>
<p>But focusing on only routers is enough for us in order to understand the concept behind the internet.</p>
<p>And the first question that comes to your mind is probably why routers are so important to the internet.</p>
<p>As a matter of fact, the answer to this question is hidden in the core task of errata.</p>
<p>The device we use to enable different lands to communicate with each other is dhiraj.</p>
<p>Right? And text to the internet, we can connect all the laughs in the world to each other.</p>
<p>You know, for this reason, it makes perfect sense to use many routers to connect millions of local areanetworks together.</p>
<p>These last few see are just two of the millions of local area networks all over the world.</p>
<p>In summary, if the internet must connect millions of local area networks, it is obvious that it needsrouters.</p>
<p>I hope you got this.</p>
<p>And once you understand the importance of the router for the internet, you probably think of anotherquestion.</p>
<p>And the second question that probably comes to your mind is why there are so many routers instead of justone router.</p>
<p>And I think this is a more critical question than the first question and let me answer it on the ratio.</p>
<p>But before answering this question, there is something in this picture that should catch your attention.</p>
<p>Please look carefully at the picture and try to find this difference.</p>
<p>As you can see these last on the visual one device instead of a switch and a router.</p>
<p>So if there is no switch in the environment, how can there be a LAN or if there is no router in theenvironment? How can it be connected to the Internet, and this is where the home router comes into play.</p>
<p>The home router is a common device consisting of a router and switch combination hands these devices inthe last hour mix of the switch and router.</p>
<p>This means that if we have a home router, we don't need an additional switch.</p>
<p>And Roger, this device is enough for small and moments like a home or small office.</p>
<p>This is important.</p>
<p>I won't repeat this again, a home router is enough for us in small environments, or if there are very fewdevices in the environment, okay, I showed you home router, because most of you have these devices in your home, and you connect to the internet by using home routers.</p>
<p>For this reason, I wanted to tell you what these devices are in order to avoid confusion.</p>
<p>However, please note that if there are too many devices in the environment, the home router will beinsufficient.</p>
<p>And you may need additional switch and router, you catch the idea.</p>
<p>And now let's go back to our question, why there are so many routers, instead of just a single router.</p>
<p>Imagine that there is a single router in the middle of the world, instead of 1000s of routers distributedall over the world.</p>
<p>In this case, millions of electronic devices around the world will tell to be connected to the samerouter.</p>
<p>This is obvious, this means that this single router needs millions of parts, isn't it.</p>
<p>And it is impossible to design such a device.</p>
<p>But this is not done the problem.</p>
<p>In addition to it, if there was only one router, the entire lot of the all devices in the world won't beon that router.</p>
<p>And this is another problem.</p>
<p>Because in computer science, we don't want to give all too lot on a single point.</p>
<p>We even call this problem, the single point of failure.</p>
<p>And this is a problem that needs to be considered to be able to teach it better.</p>
<p>Let me give you an example.</p>
<p>Imagine this router is broken somehow.</p>
<p>This means that the Internet of the whole world is crashing down at the same time, right? Because we onlyuse a single router to connect all this around the world.</p>
<p>Rule two broke down and the whole internet crashed down.</p>
<p>It's that simple.</p>
<p>Just think about the consequences of this problem.</p>
<p>In a second, this will be terrible, right.</p>
<p>And so far, we have talked about two vital problems.</p>
<p>But it isn't our another major problems is the cable length problem.</p>
<p>Imagine how long the cable must be if there was all one giant router in the middle of the world,especially LANs that are the furthest from the giant router will need very long cables.</p>
<p>This is obvious, right? Therefore, this design is a very problematic design.</p>
<p>And the solution for all these problems is this distributed structure all over developed, you catch theidea.</p>
<p>But to make sure you fully understand the main logic of this structure, I want you to do an exercise, Iwant you to determine why such a structure eliminates the problems we talked about shortly before, I'm sure that you can handle this.</p>
<p>Just do it guys.</p>
<p>I asked you a question at the end of the previous lesson.</p>
<p>And I know that you were all analyzing the situation.</p>
<p>But let's do it together just in case is you know, if he used a single router in the middle of the world,we will have problems with the overloading of the router.</p>
<p>On the other hand, we will need made alone cables for less that are the furthest from the giant router.</p>
<p>But as you can see in this structure, the cables don't have to be that long.</p>
<p>And this is an important advantage.</p>
<p>Actually, of course, we can need long cables in this structure too, but not as much as in the otherstructure.</p>
<p>After all in this structure, there can be many kilometers between two routers, this is reasonable However,this is by no means laying cables from one end of the world to the other end right.</p>
<p>And while we only connect two routers with one cable in this structure, we will connect millions of lampsto the giant router in the other structure.</p>
<p>So we will need a lot of Furlong cables to a single point and it creates a huge mess.</p>
<p>Imagine cables coming to the giant router from millions of lamps that locate in the farthest area.</p>
<p>He got the point by using this structure.</p>
<p>we minimize the cable mess and be avoid overloading of errata everything is good.</p>
<p>But what about a lot of rodding since there are many routers load balanced process is very efficient inthe distributed structure, I mean, this system works very well.</p>
<p>And in addition to load balancing, it solves the single point of failure problem as well.</p>
<p>For example, this router, this router, this router and this router are broken somehow, in this case, theinternet continues to work properly, right? Only its efficiency decreases a bit.</p>
<p>On the other hand, when there is only one router, and if this router is broken, the whole internet crushesdown and this was very bad.</p>
<p>So I believe that consistency is very important for such a huge structure, like the internet.</p>
<p>And now, I want to show you a visual that shows the cables between different countries and differentcontinents.</p>
<p>With this visual, you will understand much better what the internet is.</p>
<p>These cables are very important, especially for the communication of countries that there is an oceanbetween them.</p>
<p>And this visual represents real life itself.</p>
<p>Unlike the simplified model, we use 99% of all international communication on the internet is provided bythese 468 cable lies late under the water.</p>
<p>This is very crucial guys.</p>
<p>Some of these cables are only 131 kilometers long, while others are around 20,000 kilometers long, and soon.</p>
<p>And the funny thing is breaking one of these cables can cause the Internet of a whole continent to go awayin a flash time.</p>
<p>In fact, it was happen such an event in 2018.</p>
<p>And I want to show this on a different image.</p>
<p>Okay, I want you to focus on this red cable.</p>
<p>This is an almost 17,000 blog cable that starts in France or reaches third Africa.</p>
<p>And this cable connects down to two countries on the west coast of Europe and Africa to each other and tothe internet.</p>
<p>And the Internet of 10 of these countries crashed down when efficient port accidently cut the cable.</p>
<p>And I think this was a definitely a tragic karmic event.</p>
<p>In addition to this is you can imagine this is not the only problem that happens to cables, because we aretalking about 4 million kilometer long cables spread all over the world.</p>
<p>So, there must be something more as a matter of fact, nearly 200 problems are encountered each year.</p>
<p>And these are substantially related to shifts or natural disasters.</p>
<p>And there is a fun reason that I prefer to use substantially words, let me explain in 2007, see piratesstall 11 kilometers of a cable connecting Thailand, Vietnam and Hong Kong to each other.</p>
<p>And they sold this long cable as scrap by dividing it.</p>
<p>And I think this event is more surprising than the incredible infrastructure of the internet.</p>
<p>Now, I have back to the first slide, because there is something I want to show here.</p>
<p>These colorful cables generally represent intercontinental connections under waters.</p>
<p>But for example, if you look at Russia, land cables are not visible on this image.</p>
<p>Please don't be confused about it.</p>
<p>Of course, there are cables and routers distributed all over Russia, they are just ignored in this image.</p>
<p>I mean, the main purpose of this image was to show you how devices from different continents areinterconnected under the water, okay.</p>
<p>Also not that all of these cables under waters are fiber optic cables.</p>
<p>Because the fastest data transmission cable type is fiber optic cables.</p>
<p>And intercontinental data transmission must occur at the highest speed, right.</p>
<p>And another reason of why we don't use copper cables is well the length of the copper cables increases,the probability of errors in data transmission increases as well.</p>
<p>On the other hand, even if the fiber optic cables are very long, they transmit the data to its destinationalmost without error.</p>
<p>And this is another reason that why fiber optic cables are used over long distances.</p>
<p>Great.</p>
<p>I think it is important for you to understand what the internet really is.</p>
<p>It is very vital to be able to visualize it in your Might, because no matter what area of it you aredealing with, you need to grasp this basic subject.</p>
<p>Actually, there was something else I wanted to show in this lesson.</p>
<p>But I don't want to extend this lesson any further, we will continue where we left off in the next lesson,that will be a very important lesson.</p>
<p>See you guys in a moment.</p>
<p>In this lesson, we are going to discuss how a packet moves over the internet.</p>
<p>In this way, you will understand how to devices in different countries communicate with each other, wewill see this on an example, let's say this computer in LAN one was to communicate with this computer in Atlanta.</p>
<p>Okay.</p>
<p>In other words, let's assume that this computer first to send a special packet to this computer.</p>
<p>So, this packet must go to this router to exit from the land one you know, because our destination is theart of land one I mean it is a different network, our destination is Atlanta, and we can set our packet over the Internet to land and now, we are going to do this exactly first, this computer sends the packet to the switch after the switch receives the packet, this switch looks at the destination address of the packet and understand that it has to send the packet to the router and after the raw to receive the packet.</p>
<p>Reuter looks at the content of it and learns his destination address.</p>
<p>Hence, it understand that it must send the packet to the internet because the destination of the packet isin a different network than LAN one.</p>
<p>So, router must start the packet to this router that is connected because this router is the key routerfor LAN one to connect to the internet, I mean, if this router needs to send a packet to the internet, it must send the packet to this router no matter what there is no other option right and you can think of this link is the connection of land one to the internet.</p>
<p>And if this link is cut somehow the devices in land one cannot access the internet.</p>
<p>It's that simple.</p>
<p>After this point, things will get a little complicated.</p>
<p>So please listen to me very carefully.</p>
<p>After packet reaches this router, the packet has three options to go this path, this path or this pathright this is obvious but the question is which path is better option to go for the packet? And in order to answer this question, first we need to discuss what what the table is each router must have a special table inside called routing table.</p>
<p>And after receiving a packet, a router looks at its routing table to learn which path it must send thepacket.</p>
<p>For this router, it should be this path, this path or this path.</p>
<p>right this is obvious.</p>
<p>And if you're aware, firstly, draw to receives the packet from one of its ports.</p>
<p>I hope that you can imagine all these cables that come to the router are plugged into a port on therouter.</p>
<p>And after the raw to receive the packet rotor learns the destination of the packet and sends the packet toan appropriate port according to the information on the routing table.</p>
<p>And we call this operation forwarding is the result every router needs to look at its routing table tolearn which part it must forwards the packet.</p>
<p>In other words, we can easily understand that routing tables need to have information that which part apacket will got okay.</p>
<p>It is very important to know this fundamental task of the rhotic table.</p>
<p>Each router has a special processor.</p>
<p>And information in the routing table is created by this special processor using many different algorithms.</p>
<p>These algorithms determine the path that's a packet mascar.</p>
<p>And the results of these algorithms are added to the routing table.</p>
<p>Okay, is the result.</p>
<p>This router will look at its routing table or learn which path the packet must be forwarded one, two, orthree.</p>
<p>Meanwhile, when a router makes this decision, it always ignores the path that the packet came from,because it makes no sense to forward the packet back the way it came from.</p>
<p>Right.</p>
<p>And let's say according to the routing table of this router, the packet must be forwarded over path tree.</p>
<p>And there we go.</p>
<p>After that, this router needs to look at its routing table to decide Which paths the packet mascot? Assumethat routing table save the packet must be forwarded over patter.</p>
<p>So the packet will go to this route, right.</p>
<p>And there we go.</p>
<p>If you are aware, the event is always the same.</p>
<p>And it will continue to be the same in every router until the packet reaches lanter.</p>
<p>Anyway, let's get going very left off this router must look at its routing table to determine which paththe packet will be forwarded, let's say router choose patwon.</p>
<p>So the packet will go to this route, right? Wonderful.</p>
<p>And at this moment, please listen to me very carefully because there is a tricky part here.</p>
<p>When you look at the packets for the current position of the packet, you probably think of the mostreasonable option as pactor.</p>
<p>Because the shortest path to be able to access this router that is connected to this router seems to bepatter, right.</p>
<p>And if we choose path one, for example, we have to go to this router first.</p>
<p>From here, we can go to this route.</p>
<p>Or if we choose path three, we will go to this router first.</p>
<p>And from here, we can go to this router similarly.</p>
<p>But if we choose path two, we can go directly to this router.</p>
<p>And this is what we want.</p>
<p>But is this really the case? Let's see together.</p>
<p>First of all, never forget that routers always want to deliver the packet to its destination as fast aspossible.</p>
<p>So if this router chooses path three, instead of patter, it may seem unreasonable to you at the beginning,I understand that because you decide with a very simple logic, you are just using your eyes.</p>
<p>However, routers use many algorithms when creating the routing tables.</p>
<p>And these algorithms have many variables, I mean, routers have to take into account many situations whenthey are creating routing tables, for example, let's call every router is a point in this structure, okay.</p>
<p>So when routers create the routing tables, they are not only concerned with the number of points whenchoosing the shortest route to the destination, this is really, really important.</p>
<p>And I want to give an example to you to understand this subject better.</p>
<p>In some cases, routers control the traffic of the links they are connected to.</p>
<p>And if a path is still busy in terms of packet density, rotor will not set the packet over that part.</p>
<p>I mean, for instance, there may be an excessive density on the path to line, even if it seems the bestoption.</p>
<p>Okay.</p>
<p>And syst Road who knows this line is too busy that creating its routing table, it may decide that it ismore convenient set the packet or pantry instead of Patra.</p>
<p>And we call this situation congestion control.</p>
<p>Okay, I think that I could get to the point.</p>
<p>As a result, the router says the packet over pantry.</p>
<p>And here we go.</p>
<p>As you can see, the number of points that the packet went through has increased.</p>
<p>However, with the selection of path three, the packet can probably reach its destination faster.</p>
<p>Don't forget this.</p>
<p>And after this moment, let the packet go to this right and there we go.</p>
<p>And this router knows that the packet will go to the lamp and it sends the packet to the router in thehalf.</p>
<p>Okay, by the way you can think of this line is a straight line like that.</p>
<p>And this router knows that the packet came to this computer.</p>
<p>So it sends the packet to the related computer.</p>
<p>Wonderful.</p>
<p>As you can see, two devices located in this study areas basically communicate with each other.</p>
<p>Thanks to the internet, we can communicate in milliseconds with a device on the other side of the belttext to the internet.</p>
<p>I'm talking about milliseconds, guys, this is a huge thing.</p>
<p>And that's the main reason of why the internet is one of the most important things that mankind created.</p>
<p>I hope I was able to explain intuitively what the internet represents.</p>
<p>However, there is also something else very important that I have to say.</p>
<p>I want to tell you the bookish definition of the internet.</p>
<p>The internet is the network of networks.</p>
<p>Let me repeat the internet is the network of networks.</p>
<p>I believe that you got this but I would like to make this definition more meaningful to you.</p>
<p>Firstly Think about your own heart, maybe you have a lot of devices that can connect to the internet, forexample, computers, mobile phones, televisions, game consoles, tablets, and many, many more.</p>
<p>Similarly, most people have many devices with an internet connection in their home, just like you, right?In the same way, you can think about a company or an enterprise that has a huge number of devices.</p>
<p>And you know that there are many companies and enterprises in all over the world.</p>
<p>So as you notice, there are many small or medium sized labs spread all over developed.</p>
<p>And all these lands on the visual represent these networks.</p>
<p>As a result, the combination of all these networks stand for the internet itself, this is very important,the combination of all these networks stands for the internet itself.</p>
<p>In other words, we are talking about a huge system in which almost all electronic devices in the worldused to communicate with each other.</p>
<p>By the way, there is a very important part here to understand on the visual, we call this the structurethat is in the middle of the visual as the Internet, and you will see such a representation.</p>
<p>In many resources, you can usually see a club logo in order to represent the internet.</p>
<p>But in fact, the internet is the spec structure, you say, formed by a combination of all these networksand this structure in the middle.</p>
<p>Okay, this is very crucial guys.</p>
<p>What I'm trying to say is, when you only see such a representation, you should think that there aremillions of ladders that are connected to it, even if these lands don't appear individual, okay.</p>
<p>And the internet is a huge system that includes all lands in the world.</p>
<p>So I hope that you understand better reason have to bookish definition of the internet, the internet isthe network of networks.</p>
<p>Wonderful.</p>
<p>And you can think of this attractor is the heart of the internet.</p>
<p>For example, when we connect this land, to the heart of the internet, with this cable, this LAN will beincluded in the internet, and it can communicate other devices that are connected to the internet, you catch the idea.</p>
<p>So far we have learned what the internet is and how important routers are.</p>
<p>But what exactly does connecting to the internet look like from a computer's perspective? And we are goingto discuss this question in the next lesson.</p>
<p>See you guys soon.</p>
<p>Bye.</p>
<p>Now, we are going to discuss the meaning of connecting to the internet from the computer's perspective.</p>
<p>And I believe that it is very important to understand this event, assume that we are in a home instead ofan office and we have only one computer.</p>
<p>Therefore, to be able to connect to the internet.</p>
<p>What we only need is a home router, isn't it, there is no need for a switch.</p>
<p>Since we don't have other devices to connect to each other in this home.</p>
<p>Wherever it by the way, if you want, we could use a router device instead of a home router device.</p>
<p>Because if you are aware, we want to use only the router feature of the home router.</p>
<p>We don't need to use the switch feature of the home router right because there is only one computer in theenvironment.</p>
<p>I believe currently you know which device actually does what this should be logical to you.</p>
<p>Therefore, I will assume that you know what basic networking devices are doing from now on.</p>
<p>And so far, you have learned that the connection situation of the internet is determined by whetherrelated computer can send a packet to the internet or not.</p>
<p>And now, I will try to make this situation more meaningful to you.</p>
<p>You are watching this video on the udemy.com website.</p>
<p>Right? I mean, let's say you are turning on your computer and entering udemy.com on your favorite webbrowser.</p>
<p>Then you click on the video you are watching right now or any video you want to watch.</p>
<p>And as soon as you click on one of these videos, your computer creates a packet and says this packet toudemy.com over the internet.</p>
<p>The packet firstly is sent to home router.</p>
<p>And then the home router says the packet is To udemy.com over the Internet, and we can think of this greenpacket as your request message to use the.com request message gives information to udemy.com about, you want to watch the related video, okay, this is very crucial.</p>
<p>And after udemy.com receives your request message about watching a specific video, it's naturally realizesthat you want to watch every year hands you the muscles, the related video to you over the internet.</p>
<p>And there we go.</p>
<p>These red Packers represent the pieces of the video that you may sell to you.</p>
<p>In other words, the video you are watching right now, by the way, there is a very important thing aboutthis process.</p>
<p>Let me explain.</p>
<p>While you are watching any video on Udemy Udemy sells it to you piece by piece.</p>
<p>And we call this process streaming.</p>
<p>I think you have heard of this concept before.</p>
<p>And with the help of streaming technology you can most videos uninterruptedly are without any problem.</p>
<p>And to be able to solve this piece by piece sunning process better.</p>
<p>Now, I have opened a random video on udemy.com you can see that the video is being sent to my computerfrom udemy.com piece by piece.</p>
<p>Thanks to the ability to send videos piece by piece, we can most video without requirement for all thevideo to reach our computer.</p>
<p>For example, imagine you want to watch a one hour video and assume that your internet speed is so slow.</p>
<p>If you couldn't watch this video, before the whole video reached your computer, it will be very bad foryou, right? Fortunately, the process doesn't work like that.</p>
<p>Okay.</p>
<p>And in addition, this transmission time varies depending on the speed of our internet.</p>
<p>The first or our internet speed is, the sooner the video will reach our computer.</p>
<p>It's that simple.</p>
<p>I hope in this way you have a better understanding of what these red packets are great is a resultconnecting to the internet refers to you can send some packets to the Internet, and you can receive some packets from the internet.</p>
<p>And here, the water or home router in this situation plays a very important role.</p>
<p>The home router gives the packets it receives from the computer to the Internet, and gives the packets itreceives from the internet to the computer.</p>
<p>In summary, packet transmission is the basis of connecting to the internet or communicating with acomputer on the other side of the world.</p>
<p>Meanwhile, when we enter udemy.com, we communicate with very powerful computers that actually belong tothe udemy.com.</p>
<p>And we call these special computers, server servers do not differ fundamentally from normal computers.</p>
<p>However, since the servers will exchange packets with 1000s of normal computers at the same time, serversmust be much more powerful computers in terms of hardware compared to normal computers.</p>
<p>Because as you know, too many people access udemy.com at the same time.</p>
<p>I mean, too many people access servers of udemy.com at the same time.</p>
<p>And at this moment, let me tell you what I mean, when I say servers after you demand, if you remember, wetalked about the importance of the single point of failure and load balancing before.</p>
<p>And this is true for servers, a few Demeter, there is not a single Udemy server in the world.</p>
<p>Udemy has a lot of servers distributed around different parts of the world, the location of one of theseservers is the best for you and you communicate with this best suited server.</p>
<p>It's that simple is the result, when you want to enter udemy.com you are actually communicating with oneof the suitable Udemy servers for you.</p>
<p>So while some of you communicate with the same server, some of you will communicate with a differentserver.</p>
<p>But at the end of the day, you will all get the same content, therefore takes the distributed serversUdemy prevents single point of failure and provide load balancing.</p>
<p>Please think about it lol.</p>
<p>Okay.</p>
<p>By the way, of course, there are many details behind the transmission of packets.</p>
<p>But you can think of it in this way is the simplest logic and That's all I need to say in this lesson.</p>
<p>See you guys soon.</p>
<p>Bye.</p>
<p>In this lesson, we will shortly talk about the white area network or briefly van, which is a veryimportant type of network for the internet in a simple manner, you can think of van is a network consisting of a combination of different plants.</p>
<p>For example, with the combination of these two lands, we can create a van, or combination of this land,this land, and this lesson, we can create another van.</p>
<p>Okay.</p>
<p>And in order to understand better the logical van, we can talk about the company example.</p>
<p>Let's say we have a growing company, and reopened some offices in different parts of the world.</p>
<p>And we want these offices to be in the same network, even if they are far apart.</p>
<p>And this is where the wide area network comes into play.</p>
<p>By using van, we can create a special network for our requirements.</p>
<p>Let's say this is one of our land.</p>
<p>And this is our another land.</p>
<p>And they are located in different parts of the world.</p>
<p>And we want to create a van for our company by using these two lands.</p>
<p>But the question is, how do we do that? Let's see.</p>
<p>Let's say our boss wants us to establish a special network for these lands.</p>
<p>I mean, he wants the computers in these two different offices to work as if they are in the sameenvironment.</p>
<p>So our guy is van, if we create a van, these lads can communicate as if they're in the same environment.</p>
<p>But there's an important point to consider here.</p>
<p>Thanks to the internet, we can already enable these last two communicate right? If you know the internetstands for the network of networks.</p>
<p>This means that the internet itself represents connecting millions of flats together.</p>
<p>Hence, if these last are already connected to the internet, computers in land one and computers in landtwo can already communicate over the internet.</p>
<p>This is obvious, sir, the question is if these offices can already communicate with each other over theinternet, why we need another special network is a van.</p>
<p>Please be careful communication over the internet directly.</p>
<p>And communication over a special van belongs to a company is a whole different tank.</p>
<p>So I want you to think about that question for a short time and try to answer it.</p>
<p>If you have noticed, the internet is a public network.</p>
<p>I mean, the internet has no owner and it belongs to everyone.</p>
<p>Any person can connect to the internet whenever and wherever he wants.</p>
<p>For this reason, it is obvious that this public and huge network can have security related problems ininformation transfer between different locations.</p>
<p>You know, hackers are everywhere, and they are in this public and huge network.</p>
<p>And to be able to answer the question I just asked better, I want to give you a very good example.</p>
<p>Let's say this computer wants to send an important file related to the company to this computer.</p>
<p>And after the file is sent to this computer, there will be no problem.</p>
<p>Because this transmission process took place within this land.</p>
<p>This land is a private network for this office, an outsider cannot read access this land without yourpermission.</p>
<p>This is very important.</p>
<p>Hence, file transmission operation in this land is a secure operation.</p>
<p>in general.</p>
<p>Everything is good so far.</p>
<p>But what will happen if this file was sent to the other office over the internet.</p>
<p>Let's see.</p>
<p>Now the scenario is the same again, we need to send a file related to the company but this time, we mustsend this file to the other office of the company.</p>
<p>As we can see the file persists through the public network, isn't it? And this is where the problemsappear.</p>
<p>Just think about it.</p>
<p>This part of the internet is an absolute public network.</p>
<p>This means that if you sell the file over the internet like that, there is no guarantee that no one fromthe outside sight can't see this file or worst, no one from the outside can change this file.</p>
<p>As I said before, hackers are everywhere and the possibility of these issues are generally not low.</p>
<p>Hence, it is important to remember that there is a possibility for a problem when you send this file aboutthe company over the internet directly, especially, if it is a very important file about the company, it is very vital to be careful, and a special man for the company is a solution to such problems.</p>
<p>In general, setting up a van is a costly and not easy task.</p>
<p>But fortunately, there are various methods of setting up a van.</p>
<p>And now, we will only talk about the most popular and cost effective van methods and this method is van byusing VPN.</p>
<p>I am sure that you have heard of VPN before.</p>
<p>It stands for virtual private network.</p>
<p>And people usually use VPN to access restricted websites, because we pn ensures our anonymity, and itencrypts our data before sending the packet Hance.</p>
<p>This gives us high security in general.</p>
<p>And while creating grants by using VPN technology, we take advantage of these features of VPN.</p>
<p>But the most important feature you should know about VPN is the tunneling.</p>
<p>This feature of VPN provides privacy and anonymity and security to us by creating a special networkconnection over a public network.</p>
<p>This is really, really important.</p>
<p>I want to repeat this again.</p>
<p>VPN tunnel link provides privacy, anonymity and Security Trust by creating a special network connectionover a public network.</p>
<p>However, frankly speaking, a physical tunnel isn't created here.</p>
<p>This is very crucial.</p>
<p>tunneling technology makes the packet acts as if it is going through a physical tunnel.</p>
<p>But I won't repeat it.</p>
<p>Again, this is not a physical tunnel.</p>
<p>This tunnel visual just represents the high security connection between land one and lanter.</p>
<p>You can think of it in this way.</p>
<p>This tunnel visual just stands for the high security for the connection between these routers.</p>
<p>It's that simple.</p>
<p>By the way, of course, the packet will pass through many routers on the internet in order to reach itsdestination, just as you have learned before.</p>
<p>However, since VPN uses tunneling, it will be almost impossible to interfere with this packet from theoutside.</p>
<p>Great.</p>
<p>I hope that you get the tunneling conceptually, but I want to take a closer look at it.</p>
<p>So first, we start our file to the right.</p>
<p>And there we go.</p>
<p>And at this moment, there will be some changes on the packet.</p>
<p>But before doing these changes, first of all, you should know that VPN tunneling is set up between theserouters, this is very crucial.</p>
<p>And we call this site to site VPN.</p>
<p>This method is very popular while creating a van between offices and take the tunneling our file safereaches lanter.</p>
<p>You know, but the question is, if tunneling is not a physical tunnel, as shown in the picture, whatexactly is it? Let's see, I will use an analogy.</p>
<p>To explain this.</p>
<p>Let's say you need to send a letter from land one to lanter.</p>
<p>So, you should give the letter you wrote to a postman, right, the postman can take this letter to itsdestination.</p>
<p>And suppose you are not putting this letter in an envelope.</p>
<p>This means that the postman can read the letter if he wants.</p>
<p>This is obvious, you can think of the postman in this example, is the public Internet.</p>
<p>On the other hand, if you had put this letter in an envelope first and gave it to the postman in this way,the postman wouldn't be able to read it.</p>
<p>This is obvious.</p>
<p>Hence, the process of putting the letter in an envelope represents the tunneling itself.</p>
<p>So in the real scenario, we had to put this yellow packet into another packet.</p>
<p>And there we go.</p>
<p>Assume that the yellow packet is in the red packet is just like putting glitter in an envelope.</p>
<p>That's the whole idea about tunneling wanderful.</p>
<p>And in this moment, I want to ask you a question.</p>
<p>And my question is that is this packet, really in safe right now? I mean, kept the postman open theenvelope and find out the information in it.</p>
<p>If he really wants to just think about it.</p>
<p>He got the point right.</p>
<p>Even though We have increased the security of the packet by applying tunneling, there are still someproblems.</p>
<p>And this is where encryption comes into play.</p>
<p>Suppose that you encrypt your letter in a way that only people working in your company can understand.</p>
<p>In this case, even if the postman opens the envelope, he cannot obtain the information, because he willsee none understandable data, he will not understand the encrypted information.</p>
<p>So, what we have to do is very simple, right, we must encrypt the original packet before putting it intoanother packet.</p>
<p>So, let me back one step on Dynamesh.</p>
<p>And for this scenario, we encrypt the yellow packet before putting it in the red packet.</p>
<p>And then we put this encrypted packet into the red packet.</p>
<p>Now, finally, this packet is sent to them to over the internet safely.</p>
<p>And there we go.</p>
<p>It's that simple guys.</p>
<p>We encrypted the origin of packets and put it in another packet.</p>
<p>Thus, we maximized the security of the pact, okay.</p>
<p>The term of tunneling comes from here, because packet is safe is if it was moving in your own privatetunnel.</p>
<p>I hope that I made this concept understandable to you.</p>
<p>And at this moment, the writer needs to get the original packet.</p>
<p>And to be able to do this router first eliminates the outside packed right and then it needs to decryptthe encrypted packet so that it cannot be in the original packet.</p>
<p>And after the router gets the original packet, it looks inside the packet and loves his destination andsays the packet to his destination.</p>
<p>And there we go is the result with the help of the van.</p>
<p>By using VPN, we can securely search company related information from one LAN to another.</p>
<p>But never forget that there is no such thing as 100% security.</p>
<p>This means there may be always a security vulnerability for every system.</p>
<p>However, currently, Van networks built by using VPN technology are quite satisfactory, in terms of bothbudget and sacred.</p>
<p>Okay.</p>
<p>I believe everything is good so far.</p>
<p>But some of you curious can think about equation, you probably think like, I constantly use the internetin daily life.</p>
<p>I sent mail to my friends, I use e commerce website, and I do all of these over the internet.</p>
<p>So since the internet is a public network, are all these operations insecure? The answer is both Yes.</p>
<p>And now, let me explain.</p>
<p>Assume that you want to make an operation on amazon.com.</p>
<p>And let's say you had to enter some information about your credit card.</p>
<p>While purchasing a product says this information will be sent as a packet over the Internet to one of theservers of amazon.com.</p>
<p>We absolutely don't want anyone from the outside to see the information about our credit card is asolution to this.</p>
<p>And add to add encryption method is used between our computer and the destination server.</p>
<p>And since the packet is encrypted, nobody from the outside can see the information about our credit cardsexcept the server of amazon.com.</p>
<p>This is the main logic behind the answer and encryption.</p>
<p>All of the endpoints can decrypt the packet and obtain to original data.</p>
<p>Okay.</p>
<p>However, this kind of encryption was not used in the past.</p>
<p>And this situation made it easy for hackers.</p>
<p>Imagine that the information about your credit card was directly obtained by a hacker in pure text.</p>
<p>This is terrible, right? But text to add to add encryption, we eliminate this problem.</p>
<p>And finally, I'm going to ask you a question.</p>
<p>And then I'm going to finish the lesson.</p>
<p>Now, you know what when is right, in summary van repossessed the networks we create by combining differentplans in this case.</p>
<p>My question is, what is the largest wide area network in the world? The answer comes to your mind rapidlyisn't it? The internet itself is the largest wide area network in the world.</p>
<p>However, I want to remind you again, please note that a company's van created with VPN is different fromthe internet.</p>
<p>While one of these vans is completely special to the company.</p>
<p>The internet is owned by everyone in the world.</p>
<p>And yeah, that's all I will say about Ron.</p>
<p>See you guys soon.</p>
<p>We have learned a lot of information about network devices until now.</p>
<p>And in this lesson, we will look at a few more cases, by using these devices.</p>
<p>Let's say we have two offices belongs to the same company.</p>
<p>And suppose that there are 100 meters between these offices.</p>
<p>If you are aware, this distance is very short.</p>
<p>In this case, what I'm wondering is whether or not we can connect switch one and switch two directly toeach other to create a LAN.</p>
<p>And the answer is, we can definitely do this because as you know that we use switches to create a class.</p>
<p>Therefore, we can create a LAN by connecting these switches to each other, even if they are not in thesame environment.</p>
<p>But please note that the distance is very short between these offices.</p>
<p>If this distance, were not too short, it is impossible to connect these switches and create a LAN.</p>
<p>Meanwhile, these types of lands can be called campus Area Network, or briefly can since these types ofnetworks are generally used on university campuses, okay.</p>
<p>On the other hand, you know that we can also connect these two offices by using van with VPN.</p>
<p>But please note that when our LAN or different kinds of network types, this is important, and you can seethe packet sent with tunneling in the animation.</p>
<p>And there we go.</p>
<p>Yep, I believe so far, everything is good.</p>
<p>But I want to ask you a question.</p>
<p>Which one do you think is more secure? When which VPN or LAN created by connecting villages directly?Please think about that for a short time and try to answer it.</p>
<p>The answer is source.</p>
<p>Simple, isn't it? a LAN is always more secure than a van.</p>
<p>Because in the communication within the land, the packet never passes over the internet, the packet alwaysmoves on our own cable.</p>
<p>On the other hand, even if the packet is protected in the van, the packet still persists over theinternet.</p>
<p>And as you know, there is never such a thing as 100% security, even if the packet is protected with tunnellink and encryption.</p>
<p>So to summarize, both of these methods are secure.</p>
<p>But LAN is more secure.</p>
<p>This is obvious.</p>
<p>However, there is a condition that event is almost a secure SLR and we call private van for this type offan.</p>
<p>By the way, we haven't talked about this van type before.</p>
<p>I mean, this is different from manmad VPN, because the line between offices is dedicated for the company,you request this line from the ISP and give a special money for this line does.</p>
<p>The ISP gives you a private line that only your company can use? We call the van created in this way, hisprivate van.</p>
<p>Okay.</p>
<p>And please remember that we were using public internet network environment VPN.</p>
<p>And that's why we also call them each VPN is public van This is very crucial.</p>
<p>In addition, even if private van sounds great, it the first glance, it can be quite costly.</p>
<p>For this reason, it makes sense for an average company to prefer a public van instead of private van, youknow, public van provides us security that we definitely cannot underestimate right, wonderful.</p>
<p>Now, I want you to pay attention to one point.</p>
<p>Some of you may have already noticed this, but it will be good to mention.</p>
<p>In any case, we will switch devices to create a LAN while we use routers to create a van.</p>
<p>This is very vital.</p>
<p>I want to repeat this again, we use switches to create a LAN while we use Rogers to create a van.</p>
<p>This means we cannot create a van by using service devices.</p>
<p>Because a van fundamentally represents connection of different plans with the help of Van different glasscan act as if they are in the same environment.</p>
<p>And you know that if you want to connect different plants, we definitely need a router for this task.</p>
<p>He's got the point.</p>
<p>And now I want to talk a little bit about ratar o until now.</p>
<p>I have always explained the router is an internet related device.</p>
<p>However, it isn't the main task of the router is to connect different networks.</p>
<p>That said, you should realize that these networks may be in different parts of the world, or maybe in thesame office, it really doesn't matter.</p>
<p>And in this slide, you can see that two different plants in the same office are connected to each otherthanks to the router device.</p>
<p>Suppose that one of these networks is related to the marketing unit of the company, and the other relateto the software unit.</p>
<p>And as you know, if we want different networks to communicate with each other, we should use erasure inthe animation, you can see that land one Outland, through communicate through Roger, and there we go.</p>
<p>Great.</p>
<p>And here, I want to give you additional information about Roger, I want you to focus on the cables of therouter.</p>
<p>If you are aware, each cable is connected to a different network.</p>
<p>I mean, one of the cables is connected to LAN one, one of the cables is connected to and to and one of thecables is connected to the internet.</p>
<p>This is the case for the router.</p>
<p>The router connects different networks, you know, for this reason, each cable connected to a port on therouter represents a different network.</p>
<p>Okay.</p>
<p>By the way, you may have wondered why different networks are needed within the same office.</p>
<p>As a matter of fact, this is a common situation in real life.</p>
<p>I mean, you may want different units in the office to be in different networks.</p>
<p>This might be absurd for an office suite for computers.</p>
<p>However, imagine an office with 50 computers in it, dividing these computers into units increaseshierarchy and order never forgot.</p>
<p>That is you can see the basic principles are the same everywhere.</p>
<p>By using these basic principles, we can enable devices in different parts of the world to communicate.</p>
<p>And we can enable devices in the same office to communicate, both of them represent the same task.</p>
<p>I think you understand this concept very well.</p>
<p>And that's all I want to say in this lesson.</p>
<p>See you guys soon.</p>
<p>In one of our previous lessons, I told you, we purchased this cable that came to our home from ISP, but Ihaven't mentioned what exactly ISP is.</p>
<p>And in this lesson, we are going to discuss what is the ISP and why it is so important.</p>
<p>The internet service provider or briefly ISP is responsible for the transmission of packets from onelocation to another.</p>
<p>If you remember, we have learned that there are a lot of routers in the heart of the internet and talkingabout this structure.</p>
<p>And you can think of the ISP as the mechanism that controls all these routers in this structure.</p>
<p>For example, there are actually many routers in this globalized.</p>
<p>Similarly, there are many routers in this region last year.</p>
<p>But to simplify the concept, I didn't visually show routers within the ISP s.</p>
<p>However, I want you to imagine that the routers distributed around the world are controlled by these ISVsThis is very crucial.</p>
<p>Think of it as of each ISP controls specific routers, and packets are sent from one location to anotherlocation over these routers.</p>
<p>We previously talked about how the packet travels from one point to another era others understanding thissituation is the first condition to understand the ISP.</p>
<p>What I am trying to say is certainly SPS are responsible for certain routers, I want you to imagine thatevery ISP you see in this picture is responsible for certain routers, okay, but I am removing them from the visual for the simplicity of the concept.</p>
<p>In addition, the ISP model you see here is a simplified model.</p>
<p>But even if the model is simple, it is enough to understand the most important parts of the concept.</p>
<p>Let's start with basic definition of the ISP.</p>
<p>ISP s represent companies that serve us so that we can connect to the internet.</p>
<p>And of course, they charge a certain fee for this service.</p>
<p>You cannot connect to the internet without an ISP.</p>
<p>Think of ISP is the structure that allows you to connect to the internet and ISP is not a singlestructure.</p>
<p>There are hundreds of 1000s of ISVs in the world, and all these isbs come together to form structure yousee individual, there is few ISP individual I know that.</p>
<p>But I can say that there are hundreds of 1000s of ISP s in real life.</p>
<p>The most common ISP type in default is local ISP.</p>
<p>And now, I want to start with it.</p>
<p>The first step of connecting to the internet is to communicate with the local ISP.</p>
<p>And local ISPs are generally responsible for small area communications, for example, the communications oftwo different plants in the same neighborhood, or communication of less located in neighborhoods close to each other.</p>
<p>Let's say we live in the USA, and these two homes are located in the same neighborhood.</p>
<p>If this computer wants to communicate with this computer, the connection is provided directly over thislocal ISP.</p>
<p>This is obvious, you can see this on the animation.</p>
<p>The packet passes through different routers at local ISP and reaches its destination.</p>
<p>But in general, since the local ISP is responsible for the communication of small areas, the packet canalso pass through all the one router before reaching its destination.</p>
<p>You can think of this local ISP is the ISP that only connects lands within a neighborhood.</p>
<p>Of course, a local ISP can connect different neighborhoods.</p>
<p>But in this scenario, let's say it doesn't, therefore, one router can be enough to connect them, you gotthe point.</p>
<p>And in this visual, you can see an example of a small local ISP office.</p>
<p>And we call these offices Point of Presence or briefly pop.</p>
<p>In fact, effect routers distributed over the internet are included in these paths.</p>
<p>And in this fab.</p>
<p>In other words, in this office, routers are on the left side.</p>
<p>In addition, you have probably noticed that there are other devices than routers, because sometimes wemust do different configurations with different devices.</p>
<p>Hence, EPA must save routers, switches, servers, and so on.</p>
<p>But the device we use to connect different networks to each other is the right you know, for this reason,we will only focus on routers.</p>
<p>And in our previous lessons, Reuters on the internet visual, were actually representing paths, separateover divulge.</p>
<p>And in order to explain this better, I want to talk on a different image.</p>
<p>But in this image, I want to think of different houses and offices connected to local SB two and local SBthree.</p>
<p>I mean, you both talk about the thoughts, you got the point.</p>
<p>And there we go.</p>
<p>As you can see, a home and small office connect to a pop over local SB saw this pop is the first point tobe able to connect to the internet for this home.</p>
<p>And this office.</p>
<p>This should be clear to you.</p>
<p>By the way, if you are aware, locally, SB two has four paths, you might think that takes to these fourpaths.</p>
<p>Locally SB two connects different neighborhoods.</p>
<p>And in this way, lands in different neighborhoods can communicate over local SB two effectively.</p>
<p>And from here, we can draw the following conclusion.</p>
<p>Some local asbs can have more than one path.</p>
<p>However, some localized space can only have one path.</p>
<p>This depends on the size of the localized sphere.</p>
<p>For example, if a local ISP connects four different neighborhoods, it may have four different paths.</p>
<p>But if a local ISP connects all the one neighborhood, it has all the vamp up, you catch the idea.</p>
<p>And if you want to do more detailed studies on this topic, you will see many resources on the internet.</p>
<p>with raw trackers, you should be aware that these icons actually represent water within the pop.</p>
<p>There are many pops distributed all of our developers and routers are in these paths.</p>
<p>It's that simple.</p>
<p>At this moment, I want you to imagine that there are hundreds of 1000s of local SPS in the world.</p>
<p>And these local SPS Connect regionally space that are larger than this means that different localizedspace communicate over regionalized space.</p>
<p>For example, local SP to communicate with local SP three over the regional SP one.</p>
<p>As a matter of fact, you can think of local asbs Connect neighborhoods and regional SPS Connect cities ina country.</p>
<p>It's that simple.</p>
<p>I want to repeat this again, you can think of localized space, connect neighborhoods or small areas andregionally space Connect cities.</p>
<p>In a country, okay.</p>
<p>Meanwhile, there is one regional SP in this simplified model we use.</p>
<p>But in real life, a country can have many regional airspace and all local SPS and regional SPS, combinedin order to create a network of a country.</p>
<p>In summary, the first step to connecting to the internet is local ISP.</p>
<p>And this line represents the line we purchased from the local ISP, right? every home or office mustpurchase such a line from the relevant ISP to connect to the internet.</p>
<p>And if you examine your home router carefully, you can see the cable coming from your ISP.</p>
<p>Wonderful.</p>
<p>Now, let's suppose that this computer and this computer want to communicate with each other.</p>
<p>By the way, these two homes are located in the USA, but they are in different cities.</p>
<p>As a result, they are connected to different local ISP.</p>
<p>So this is our base.</p>
<p>so in this situation, how will this local SV communicate with this local ISP, let's say in fact, this iswhere the regional SB one comes into play.</p>
<p>In general, the regional SP is engaged in the communication of devices in the same countries, but indifferent cities.</p>
<p>If you look carefully at the animation, local asbs communicate over the region laceby is obvious, right?And there we go.</p>
<p>And at this moment, some of you may be wondering why there is no direct link from local SB two to local SBthree, this is not expected question.</p>
<p>Just think about it.</p>
<p>If we connect, localize these directly, the hierarchy is broken.</p>
<p>I mean, you see very few localized these in the scenario, but in real life, there can be middleclasspeace, even in the same city.</p>
<p>And if we connect them all together, complexity will definitely occur.</p>
<p>And we don't want to increase the complexity of this system, it is already quite complex, isn't it.</p>
<p>And that's why we use a central hierarchical ISP structure is you see individual with the minimum numberof connections between ISP s, we ensure that all ISP is communicate with each other.</p>
<p>It's that simple.</p>
<p>So far, we have talked about the local ISP, and regionalised.</p>
<p>Also, the computers that communicate with each other, were always in the USA.</p>
<p>But what if computers in different countries want to communicate with each other.</p>
<p>And this is where the global SP comes into play, you may think that the global ISP connects devices indifferent countries in general, is, you know, there is an ocean between the USA and China.</p>
<p>So if a device in the USA, and a device in China wants to communicate, it must be a global ISP thatprovides this connection, you cannot connect these two devices with only local ISP, and regional ISP.</p>
<p>And as you can see in the image, there are multiple global asbs.</p>
<p>And these globalists, these are the part of the hierarchy.</p>
<p>And by using them, these two computers can communicate with each other.</p>
<p>Let's assume that this computer wants to communicate with this computer.</p>
<p>In this case, the packet will first go to the local ISP, Peter, you know, and then go to the regional ISPone.</p>
<p>And the packet has two options at this moment, this path or this path.</p>
<p>In other words, globally, SB one or global SB three, I hope you understand that this selection isdetermined by the routers in the regional SP one, each router makes a choice.</p>
<p>And as a result of these choices, the Reuters path is determined.</p>
<p>Let's say the packet will be forwarded to global SB one.</p>
<p>And there we go.</p>
<p>By the way, another packet that will pass through regionalize v one may go to the global SB three nexttime.</p>
<p>Who knows you catch the idea.</p>
<p>Anyway, afterwards, let's say that the packet will be sent from global SB one to global SB two.</p>
<p>And there we go.</p>
<p>And at this stage, the packets can be sent to local ISP six, or directly to the regional SB two or globalSB three.</p>
<p>Either way, it will reach its destination.</p>
<p>What I'm trying to say is the packet can follow different paths.</p>
<p>And I won't show you some of these paths.</p>
<p>For example, from global SB two to local SB six, regional SB two, local SB seven and this nation or fromglobal SB two to three regionally SB two, locally SB seven and this nation or from globally SB two To globally SB three, regional SB two, local SB seven and this nation again all of them are suitable paths.</p>
<p>You should also have noticed a situation here.</p>
<p>If the destination of the packet was this harm, the packet could reach his destination directly over localSB six without going over regionalist feature.</p>
<p>This means that some localized space can connect with global ad space.</p>
<p>Without a regional ISP.</p>
<p>This is very important is enough, local ad space represents small companies.</p>
<p>And in some cases, these small companies may want a direct connection with a global ASV to provide afaster internet experience to its customers.</p>
<p>Actually, there are two ways for this kind of connection.</p>
<p>in general.</p>
<p>If a local ISP connects directly with a global ISP, its location can be very suitable for this purpose.</p>
<p>I mean, related global ISP can already have an infrastructure on this location.</p>
<p>However, if the related global ISP doesn't have an infrastructure in this location, a lot of extra moneymust be paid for disconnection by the local ASB company to the global ASB company, you catch the idea.</p>
<p>And for this packet on the global ASB through, let's say it will go to the regional ISP instead of localSB six or global SB three.</p>
<p>Okay, from here, packet will go to the local SB seven.</p>
<p>And there we go.</p>
<p>As you can see, locally, SB seven is connected directly to the destination LAN.</p>
<p>Therefore, locally, SB seven knows that where it will send the packets.</p>
<p>And finally, to home rats receiving the packet sends it to the destination computer Wallah.</p>
<p>As a result, you have learned how computers in two different regions of the world communicate over theinternet.</p>
<p>You also learnt the relationship between the internet routers and ISP with each other.</p>
<p>And in the next lesson, we are going to cover two more scenarios related to the ISP concept.</p>
<p>See you guys in a moment.</p>
<p>Let's say we are in Belgium.</p>
<p>This is our home.</p>
<p>And we want to connect to enable establish website called ABC x.com.</p>
<p>The owners of the website have limited financial power.</p>
<p>For this reason, they have all the answer we're on the USA.</p>
<p>So to be able to reach ABC x.com our request message must pass over at least one global ASP This isobvious, you can see the whole process on the animation.</p>
<p>And after the server of the ABC x.com receives the request message in exchange for it, ABC x.com creates aresponse message.</p>
<p>This response message contains information about the web page we want to enter.</p>
<p>It includes images, videos, HTML file, and everything related to the web page.</p>
<p>Meanwhile, if you don't know what an HTML file is, you can think of it as the skeleton of a web page in asimplest manner, and after generating the response message, the server must send it to us.</p>
<p>However, the path preferred by the response message will be different from the path preferred by therequest message.</p>
<p>Please pay attention to this on the animation.</p>
<p>There is no way to know the exact path of a message beforehand.</p>
<p>Since routers can make different choices each time I'm in the park for a message is always determined onthe way.</p>
<p>Never forget that.</p>
<p>And as soon as we received the response message, the website appears in our web browser.</p>
<p>In summary, then you want to enter a website, you first sent a request message to the server off website.</p>
<p>And the web server receiving your request message sends you a response message which contains allinformation about the web page you want to enter.</p>
<p>And then this message comes to you.</p>
<p>your web browser learns all information from this response message and displays the related web page inyour web browser.</p>
<p>And the surprising thing is, every time you want to enter a website, this process happens again.</p>
<p>However, since this process takes place in milliseconds, you don't realize that there are complexoperations in the background.</p>
<p>And now let's try to enter google.com instead of ABC x.com and see what happens.</p>
<p>You know, Google is quite different from ABC x.com.</p>
<p>Since it is a giant company, for instance, unlike ABC x.com, Google has many servers distributed allaround the world.</p>
<p>And with this distributed server structure, Google provides a much more efficient and fast service to itscustomers.</p>
<p>And let's say one of these servers is not far from our heart.</p>
<p>Therefore, when you want to enter google.com, or when you want to get any service from Google, we willprobably connect to this server, which is close to us, okay? For this reason, the process failed way much faster.</p>
<p>In fact, this is the main reason why big companies put many servers in different locations around theworld.</p>
<p>They want customers to communicate with them in the fastest and most efficient way.</p>
<p>And the distributed server structure is a great solution for such a desire.</p>
<p>I believe you catch the idea.</p>
<p>So then we want to request a service from Google, our request message will go to this server clusters.</p>
<p>You'll know that how the packet reaches the related server with the help of ISP.</p>
<p>Yes.</p>
<p>And you know that what will happen after this stage, Google sends us a response message related to theservers we request.</p>
<p>However, the time for Google to communicate with the customers is sometimes not satisfactory for Google.</p>
<p>And Google wants to increase this a bit in general.</p>
<p>Fortunately, Google has a very good solution for this kind of issue called peering.</p>
<p>But what exactly is peering? Let's see, peering is the technique, which Google establishes a directconnection with an ISP to provide faster access to eat servers.</p>
<p>As you can see on the animation, Google connects directly with the local asbs.</p>
<p>Thus, when we want to get a service from Google, you will be able to communicate directly with Googleservers without using ISP infrastructures.</p>
<p>In this way, Google can communicate with the customers much more effectively and quickly.</p>
<p>At this moment, everything is good.</p>
<p>But what about security, since the number of public pop that packets pass through decreases, takes theperiod, security increase a saw much I'm in the packet goes directly to Google via local ISP.</p>
<p>In other words, the packet does not use public ISP infrastructures to communicate with Google.</p>
<p>Remember that security is very important to large companies.</p>
<p>And it is obvious that this direct connection decreases the possibility to be obtained for the packagefrom the outside.</p>
<p>Wonderful.</p>
<p>And last, but not least, I want to give you an example is you know, YouTube is owned by Google.</p>
<p>So when you want to watch a video on YouTube, you are actually using Google's distributed servers aroundthe world.</p>
<p>And you are all aware that YouTube works very efficiently by you want to watch a video on YouTube, you canwatch it very well, you will be interrupted whatsoever.</p>
<p>The main reason for this is the distributed server structure and the appearing infrastructure of Google.</p>
<p>On the other hand, you may sometimes see freezes and interruptions, while watching videos on Udemy.</p>
<p>Because Udemy infrastructure is not as strong as Google in general.</p>
<p>Of course, Udemy also uses a distributed server structure.</p>
<p>But this number is probably not as many as Google This is obvious.</p>
<p>In addition, Udemy doesn't use peering.</p>
<p>And you know that peering is a very efficient technology, especially it increases the streaming qualityand speed a lot.</p>
<p>But I can say that Udemy did a significantly Good job overall, because serving millions of people at thesame time is a really challenging engineering problem.</p>
<p>Okay.</p>
<p>In summary, peering is a very effective structure is used by giant companies like Google, Amazon, and soon.</p>
<p>He's got the point.</p>
<p>And finally, I want to give you some general information about ISP is you know, global ASB are responsiblefor the international communication.</p>
<p>I can't say that, although definitely not as many as the regional ISP.</p>
<p>There are a few global ISP in the world.</p>
<p>And you can guess that the technical reasons for not having only a single global ISP in the world.</p>
<p>We have talked about similar things before but in addition to these reasons, like load balancing Andefficiency.</p>
<p>There are also some financial reasons for this.</p>
<p>I mean, setting up a global ASB company is a very costly business at the beginning, but it makes its honora lot of money.</p>
<p>You know what I'm saying, right? If you have a lot of money, establishing a global ASB company is a goodchoice, it will probably make you smile with time.</p>
<p>By the way, we also call the internet backbone to the network that global ASB set up with each otherfamiliarity to internet backbone term can be useful for you in the future.</p>
<p>In addition, there are structures called internet exchange points, in order for the internet backbone towork synchronously for global a space to communicate with each other more efficiently.</p>
<p>And we brief the call these structures I XP, or I x never forgot that.</p>
<p>And the last thing I want to mention is that you don't have to connect to a local ISP.</p>
<p>In order to connect to the internet, you can directly connect to a regional ISP, or global ASB if theseISP have a service for your location.</p>
<p>This means that you can learn which ISP is our serving value live and make your choice.</p>
<p>According to this information, it is absolutely your decision to choose the ISP service you want.</p>
<p>Okay? For example, let's say this is our home and we connect to the internet via local ASB.</p>
<p>However, if you request, we can also connect directly to the internet via regional SP one, this ispossible.</p>
<p>What I am trying to say is if you want to get your ISP service from a certain company, and if this companydoesn't serve your location, you can contact the company and talk about what you can do.</p>
<p>If you give the required money to the ISP company, most regional ISP and global ISP can provide you theservice you want that set.</p>
<p>But for normal users, this is where unnecessary normal users only need to choose one of two ISP servicesin their location and benefit from it.</p>
<p>On the other hand, if you want to set up a local ISP company, such a move may make sense.</p>
<p>Wonderful.</p>
<p>And we talked about the ISP in general, I think you got a lot of good information.</p>
<p>But if you want you can do more research about the ISP on the internet.</p>
<p>However, that's all I have to say in this course.  </p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ TCP vs. UDP — What's the Difference and Which Protocol is Faster? ]]>
                </title>
                <description>
                    <![CDATA[ If you're getting into computer networking, or if you've dug through the network settings of some applications, you've likely seen these terms: TCP and UDP. TCP, which stands for Transmission Control Protocol, and UDP, or User Datagram Protocol, are ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/tcp-vs-udp/</link>
                <guid isPermaLink="false">66ac88379e10a480c13037db</guid>
                
                    <category>
                        <![CDATA[ computer network ]]>
                    </category>
                
                    <category>
                        <![CDATA[ computer networking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ internet ]]>
                    </category>
                
                    <category>
                        <![CDATA[ network ]]>
                    </category>
                
                    <category>
                        <![CDATA[ networking ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Kristofer Koishigawa ]]>
                </dc:creator>
                <pubDate>Mon, 28 Jun 2021 12:06:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/07/ian-battaglia-9drS5E_Rguc-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>If you're getting into computer networking, or if you've dug through the network settings of some applications, you've likely seen these terms: TCP and UDP.</p>
<p>TCP, which stands for Transmission Control Protocol, and UDP, or User Datagram Protocol, are part of the internet protocol suite. TCP and UDP are different methods to send information across the internet.</p>
<p>But even knowing what they stand for, it's hard to know which protocol you should use, or why you would use one over the other.</p>
<p>In this article, we'll go over computer networking basics, the differences between TCP and UDP, when each is used, and more.</p>
<h2 id="heading-computer-networking-basics">Computer Networking Basics</h2>
<p>Before diving into how TCP and UDP work, it's helpful to know the basics about how the internet works.</p>
<p>Generally speaking, the internet is a network of connecting devices. Each device, whether it's your smartphone or a server, communicate through the internet protocol suite.</p>
<p>The internet protocol suite is a collection of different protocols, or methods, for devices to communicate with each other. Both TCP and UDP are major protocols within the internet protocol suite:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/07/internet-protocol-suite-diagram.gif" alt="Basic diagram of the internet protocol suite." width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://www.sciencedirect.com/topics/computer-science/internet-protocol-suite">Source</a></em></p>
<p>Each device that's connected to the internet has a unique IP address. And whenever two devices communicate over the internet, they're likely using either TCP or UDP to do so.</p>
<p>Here's a brief comparison between the two:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/07/tcp-vs-udp-diagram.png" alt="Diagram comparing TCP and UDP" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://www.wowza.com/blog/udp-vs-tcp">Source</a></em></p>
<p>For an even higher-level overview of how the internet works, check out this five minute video:</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/7_LPdttKXPc" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<h2 id="heading-what-is-tcp">What is TCP?</h2>
<p>TCP, or Transmission Control Protocol, is the most common networking protocol online. TCP is extremely reliable, and is used for everything from surfing the web (HTTP), sending emails (SMTP), and transferring files (FTP).</p>
<p>TCP is used in situations where it's necessary that all data being sent by one device is received by another completely intact.</p>
<p>For example, when you visit a website, TCP is used to guarantee that everything from the text, images, and code needed to render the page arrives. Without TCP, images or text could be missing, or arrive in the incorrect order, breaking the page.</p>
<p>TCP is a connection-oriented protocol, meaning that it establishes a connection between two devices before transferring data, and maintains that connection throughout the transfer process.</p>
<p>To establish a connection between two devices, TCP uses a method called a three-way handshake:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/07/tcp-three-way-handshake-simple.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://www.techopedia.com/definition/10339/three-way-handshake">Source</a></em></p>
<p>For example, to read this article on your device, your device first sent a message to the freeCodeCamp News server called an SYN (Synchronize Sequence Number).</p>
<p>Then the freeCodeCamp News server sends back an acknowledgement message called a SYN-ACK.</p>
<p>When your device receives the SYN-ACK from the server, it sends an ACK acknowledgment message back, which establishes the connection.</p>
<p>Once a TCP connection is established between two devices, the protocol guarantees that all data is transmitted.</p>
<p>Going back to the example of your device and freeCodeCamp News, once the three-way handshake is complete, the News server can start sending all the data your device's web browser needs to render this article.</p>
<p>All devices break up data into small packets before sending them over the internet. Those packets then need to be reassembled on the other end.</p>
<p>So when the freeCodeCamp News server sends the HTML, CSS, images, and other code for this article, it breaks everything into small packets of data before sending them to your device. Your device then reassembles those packets into the files and images it needs to render this article.</p>
<p>TCP ensures that these packets all arrive to your device. If any packets are lost along the way, TCP makes it easy for your device to let the server know it's missing data, and for the server to resend those packets.</p>
<p>Once your device receives all the data it needs to render the article, TCP automatically terminates the connection between the two devices with a method similar to the three-way handshake, this time using FIN and ACK packets.</p>
<h2 id="heading-what-is-udp">What is UDP?</h2>
<p>UDP, or User Datagram Protocol, is another one of the major protocols that make up the internet protocol suite. UDP is less reliable than TCP, but is much simpler.</p>
<p>UDP is used for situations where some data loss is acceptable, like live video/audio, or where speed is a critical factor like online gaming.</p>
<p>While UDP is similar to TCP in that it's used to send and receive data online, there are a couple of key differences.</p>
<p>First, UDP is a connectionless protocol, meaning that it does not establish a connection beforehand like TCP does with its three-way handshake.</p>
<p>Next, UDP doesn't guarantee that all data is successfully transferred. With UDP, data is sent to any device that happens to be listening, but it doesn't care if some of it is lost along the way. This is one of the reasons why UDP is also known as the "fire-and-forget" protocol.</p>
<p>A good way to think about these differences is that TCP is like a conversation between two people. Person A asks person B to talk. Person B says sure, that's fine. Person A agrees and they both start speaking.</p>
<p>UDP is more like a protester outside with a megaphone. Everyone who is paying attention to the protester should hear most of what they're saying. But there's no guarantee that everyone in the area will hear what the protester is saying, or that they're even listening.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/07/udp-and-tcp-comparison.jpg" alt="A diagram comparing UDP and TCP connections" width="600" height="400" loading="lazy">
<em>UDP vs TCP — <a target="_blank" href="https://www.dpstele.com/snmp/transport-requirements-udp-tcp.php">Source</a></em></p>
<h2 id="heading-which-is-faster-tcp-or-udp">Which is Faster – TCP or UDP?</h2>
<p>In general, UDP is the faster protocol.</p>
<p>UDP is much simpler, and doesn't try to establish a connection between devices before sending data, or verify that all the data even arrived. It simply sends out data to any device that requests it, and keeps doing that until the other device disconnects or there is no more data left to send.</p>
<p>Think drinking from a hose rather than sipping from a bottle. You'll quench your thirst either way, but will probably end up with a damp shirt using the former method.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/07/tcp-vs-udp-meme.png" alt="A meme showing one person drinking from a water bottle to represent TCP, and another person pouring water from a bottle onto their face to represent UDP." width="600" height="400" loading="lazy">
_Not a hose, but still pretty accurate. Also imagine that the TCP bottle keeps asking if you received water while you drink from it. <a target="_blank" href="https://www.reddit.com/r/ProgrammerHumor/comments/9gcwgw/tcp_vs_udp/e63axmd/">Source</a>_</p>
<p>But being faster doesn't mean that UDP is the better protocol overall. It just means that it's better in certain situations.</p>
<p>As mentioned earlier, TCP is necessary in situations where it's vital that all data packets are sent in order, and that all packets arrive. The web just wouldn't function without TCP.</p>
<p>And while TCP is slower because of the way it establishes connections, and due to the checks for missing packets, it can still be blazing fast. Because they're on the web and use HTTP, sites like YouTube or Netflix all use TCP to send data to your devices.</p>
<p>TCP also allows for buffering, so your browser can request and load more data as you watch, allowing for smooth playback and for you to skip ahead to other parts of the video.</p>
<p>UDP is the better choice for live video and audio or online games where speed is more important than potential data loss.</p>
<p>When you make a call over Google Meet or Zoom, your video and audio are being transmitted over UDP. If some packets are lost along the way, it'll just appear as a bit of lag or clipped video/audio.</p>
<p>If you play video games, you might think that the way TCP ensures all data packets arrive at the other device would make it the ideal choice. But in reality, all the checking and resending data that TCP does just adds latency.</p>
<p>Game developers have found other clever ways to ensure that player input and state are as accurate as possible. If you're interested in reading more about why UDP is preferred for online gaming, check out <a target="_blank" href="https://gafferongames.com/post/udp_vs_tcp/">this article</a>.</p>
<h2 id="heading-fin">FIN</h2>
<p>I hope this article helped you understand some of the nuances between TCP and UDP. And if someone asks which is faster, tell 'em what you read here: "UDP is faster, <em>but</em>..."</p>
<p>And if you like what you read, let me know over on <a target="_blank" href="https://twitter.com/kriskoishigawa">Twitter</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What is the Correct Content-Type for JSON? Request Header Mime Type Explained ]]>
                </title>
                <description>
                    <![CDATA[ By Dillion Megida Every resource used on the internet has a media type, also known as a MIME type which stands for Multipurpose Internet Mail Extension. This information is necessary for transactions between server and client. The browser needs to kn... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-is-the-correct-content-type-for-json-request-header-mime-type-explained/</link>
                <guid isPermaLink="false">66d84f715a0b456f4d321469</guid>
                
                    <category>
                        <![CDATA[ browser ]]>
                    </category>
                
                    <category>
                        <![CDATA[ internet ]]>
                    </category>
                
                    <category>
                        <![CDATA[ json ]]>
                    </category>
                
                    <category>
                        <![CDATA[ servers ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 08 Dec 2020 22:07:17 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5fcf4739e6787e098393bd6d.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Dillion Megida</p>
<p>Every resource used on the internet has a media type, also known as a MIME type which stands for Multipurpose Internet Mail Extension. This information is necessary for transactions between server and client.</p>
<p>The browser needs to know the media type of resources sent to it so that it can handle them properly.</p>
<p>The same goes for the server. It needs to know the type of resources sent to it for accurate parsing and processing.</p>
<h2 id="heading-where-is-the-content-type-declared">Where is the Content-Type declared?</h2>
<p>The media type of any resource is declared in the <code>Content-Type</code> property of the request header (on the client, when making a request to the server) or in the response header (on the server, when sending a response).</p>
<p>Without explicitly declaring the content type of a resource, the client may attempt to automatically detect the type, but the result may not be accurate. This is why it's important to explicitly declare it.</p>
<h2 id="heading-media-types">Media Types</h2>
<p>Media types exist in various forms. They are categorized into various groups:</p>
<ul>
<li>application</li>
<li>audio</li>
<li>font</li>
<li>example</li>
<li>image</li>
<li>message</li>
<li>model</li>
<li>multipart</li>
<li>text</li>
<li>and video</li>
</ul>
<p>These categories also have their types. For example, <code>application/json</code> is a type under <code>application</code> and <code>text/html</code> is a type under <code>text</code>.</p>
<p>You can find a complete list of media types in the <a target="_blank" href="https://www.iana.org/assignments/media-types/media-types.xhtml">IANA</a> (a body that coordinates some of the key elements on the internet) media types.</p>
<p>All these types cover various data types like text, audio, images, HTML, and many more types that are used across the internet.</p>
<h2 id="heading-the-browser-needs-to-know-the-media-type-of-a-resource">The browser needs to know the media type of a resource</h2>
<p>As I mentioned above, the browser needs to know what type of content it receives. Here's an example to illustrate that.</p>
<p>The following code is a Node server that serves an HTML file:</p>
<pre><code class="lang-js"><span class="hljs-keyword">const</span> http = <span class="hljs-built_in">require</span>(<span class="hljs-string">"http"</span>);
<span class="hljs-keyword">const</span> fs = <span class="hljs-built_in">require</span>(<span class="hljs-string">"fs"</span>);
<span class="hljs-keyword">const</span> path = <span class="hljs-built_in">require</span>(<span class="hljs-string">"path"</span>);

<span class="hljs-keyword">const</span> server = http.createServer(<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">req, res</span>) </span>{
    <span class="hljs-keyword">const</span> filePath = path.join(__dirname, <span class="hljs-string">"index.html"</span>);
    <span class="hljs-keyword">var</span> stat = fs.statSync(filePath);

    res.writeHead(<span class="hljs-number">200</span>, {
        <span class="hljs-string">"Content-Type"</span>: <span class="hljs-string">"text/css"</span>,
        <span class="hljs-string">"Content-Length"</span>: stat.size,
    });

    <span class="hljs-keyword">const</span> readStream = fs.createReadStream(filePath);
    readStream.pipe(res);
});

server.listen(<span class="hljs-number">5000</span>);

<span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Node.js web server at port 5000 is running.."</span>);
</code></pre>
<p>Do not worry about the specifics of the code. All you're concerned with is the <code>index.htm</code> file we're serving and that the <code>Content-Type</code> is <code>text/css</code>.</p>
<p>Here's the content of <code>index.html</code>:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Homepage<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
</code></pre>
<p>Of course, an HTML document is different from a  CSS file. Here's the result on <code>localhost:5000</code> when the server is started:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/12/Screenshot-2020-12-08-at-10.12.32.png" alt="Screenshot-2020-12-08-at-10.12.32" width="600" height="400" loading="lazy"></p>
<p>You can also confirm the response gotten by checking the headers in the network tab of the DevTools.</p>
<p>Here's the result on a Chrome browser:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/12/Screenshot-2020-12-08-at-10.13.34.png" alt="Screenshot-2020-12-08-at-10.13.34" width="600" height="400" loading="lazy"></p>
<p>The browser got the content as a CSS type, therefore, it tried treating it as CSS.</p>
<p>Also, note that full knowledge of the type of content gotten by the browser also reduces security vulnerabilities as the browser knows security standards to put in place for that data.</p>
<p>Now that you understand the concept of MIME types and their importance, let's head over to JSON.</p>
<h2 id="heading-the-correct-content-type-for-json">The Correct Content-Type for JSON</h2>
<p>JSON has to be correctly interpreted by the browser to be used appropriately. <code>text/plain</code> was typically used for JSON, but according to <a target="_blank" href="https://www.iana.org/assignments/media-types/media-types.xhtml">IANA</a>, the official MIME type for JSON is <code>application/json</code>.</p>
<p>This means when you're sending JSON to the server or receiving JSON from the server, you should always declare the <code>Content-Type</code> of the header as <code>application/json</code> as this is the standard that the client and server understand.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>As stated above, the server (just like the browser) needs to know the type of data sent to it, say, in a POST request. That's the reason <code>forms</code> with files usually contain the <code>enctype</code> attribute with a value of <code>multipart/form-data</code>. </p>
<p>Without encoding the request this way, the POST request won't work. Also, once the server knows the type of data it has gotten, it then knows how to parse the encoded data.</p>
<p>In this article, we looked at what MIME types are and their purpose. Also, we looked at the official content type for JSON. I hope you now know why it's important to declare resource types when used across the internet.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
