{"id":78462,"date":"2025-09-12T02:37:33","date_gmt":"2025-09-12T02:37:33","guid":{"rendered":"http:\/\/bangla.sitestree.com\/?p=78462"},"modified":"2025-09-12T02:37:34","modified_gmt":"2025-09-12T02:37:34","slug":"how-a-dns-request-travels-across-networks","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=78462","title":{"rendered":"How a DNS Request Travels Across Networks"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>Ref: AI Tools\/OpenAI\/ChatGPT<\/p>\n\n\n\n<p>Absolutely \ud83d\udc4d \u2014 here\u2019s a <strong>ready-to-post, copyright-free blog article<\/strong> about how a DNS request moves across networks, including headers, ARP, and next-hop details.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>&#8220;<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"332\" src=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/09\/image-3.png?resize=750%2C332\" alt=\"\" class=\"wp-image-78463\" style=\"width:840px;height:auto\" srcset=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/09\/image-3.png?w=804 804w, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/09\/image-3.png?resize=300%2C133 300w, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/09\/image-3.png?resize=768%2C340 768w, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/09\/image-3.png?resize=750%2C332 750w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"404\" src=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/09\/image-4.png?resize=750%2C404\" alt=\"\" class=\"wp-image-78464\" srcset=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/09\/image-4.png?w=764 764w, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/09\/image-4.png?resize=300%2C162 300w, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/09\/image-4.png?resize=750%2C404 750w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83c\udf10 How a DNS Request Travels Across Networks<\/h1>\n\n\n\n<p>When you type a website name like <code>www.example.com<\/code> into your browser, your computer needs to find out the website\u2019s IP address. This is where DNS (Domain Name System) comes in. But what really happens under the hood when your PC asks a DNS server for that IP address, especially when the server is outside your local network? Let\u2019s break it down step by step.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">1. Application Layer \u2013 The DNS Query<\/h2>\n\n\n\n<p>At the very top, your browser or operating system generates a <strong>DNS query<\/strong>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Protocol: DNS<\/li>\n\n\n\n<li>Port: UDP 53 (by default)<\/li>\n\n\n\n<li>Content: A small packet asking <em>\u201cWhat is the IP of <a href=\"http:\/\/www.example.com\/?%E2%80%9D\">www.example.com?\u201d<\/a><\/em><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">2. Transport Layer \u2013 Wrapping in UDP<\/h2>\n\n\n\n<p>The DNS query is wrapped inside a <strong>UDP segment<\/strong>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Source Port: A random number (chosen by your computer)<\/li>\n\n\n\n<li>Destination Port: 53 (standard DNS port)<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">3. Network Layer \u2013 Adding IP Addresses<\/h2>\n\n\n\n<p>Next, the segment is wrapped in an <strong>IP packet<\/strong>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Source IP: Your computer\u2019s IP (e.g., <code>192.168.1.10<\/code>)<\/li>\n\n\n\n<li>Destination IP: The DNS server (e.g., <code>8.8.8.8<\/code>)<\/li>\n<\/ul>\n\n\n\n<p>\ud83d\udc49 Important: The <strong>destination IP stays the same all the way<\/strong> to the DNS server. It does not change as the packet moves across the internet.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">4. Data Link Layer \u2013 Finding the Next Hop<\/h2>\n\n\n\n<p>Now we\u2019re at the Ethernet\/MAC layer. Your computer knows the DNS server is on a different network, so it must send the packet to its <strong>default gateway<\/strong> (your router).<\/p>\n\n\n\n<p>But first, it needs the router\u2019s <strong>MAC address<\/strong>, so it sends an <strong>ARP request<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u201cWho has 192.168.1.1? Tell 192.168.1.10.\u201d<\/li>\n<\/ul>\n\n\n\n<p>The router replies with its MAC, and your PC builds the Ethernet frame:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Source MAC: your PC\u2019s NIC<\/li>\n\n\n\n<li>Destination MAC: your router\u2019s NIC<\/li>\n\n\n\n<li>Payload: the IP packet destined for <code>8.8.8.8<\/code><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">5. Moving Through the Network<\/h2>\n\n\n\n<p>At each hop:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <strong>MAC addresses change<\/strong> (new source and destination for each hop).<\/li>\n\n\n\n<li>The <strong>IP addresses remain the same<\/strong> (your PC \u2192 DNS server).<\/li>\n<\/ul>\n\n\n\n<p>Routers always check the <strong>IP header<\/strong> to decide where to send the packet next.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">6. At the DNS Server<\/h2>\n\n\n\n<p>Finally, the packet arrives at the DNS server (<code>8.8.8.8<\/code>).<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The server sees destination IP = its own.<\/li>\n\n\n\n<li>It processes the query and sends back a <strong>DNS response<\/strong>.<\/li>\n\n\n\n<li>Source\/Destination are reversed:\n<ul class=\"wp-block-list\">\n<li>Source IP = <code>8.8.8.8<\/code><\/li>\n\n\n\n<li>Destination IP = your computer<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Key Takeaways<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Final destination IP never changes.<\/strong><\/li>\n\n\n\n<li><strong>MAC addresses change at every hop.<\/strong><\/li>\n\n\n\n<li><strong>ARP is only used inside local networks<\/strong> to find the MAC of the next hop.<\/li>\n\n\n\n<li><strong>Routers forward based on IP, not MAC.<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>This is how a simple DNS request travels across networks \u2014 from your PC, through your router, across the internet, and back \u2014 all in just milliseconds.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>&#8220;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ref: AI Tools\/OpenAI\/ChatGPT Absolutely \ud83d\udc4d \u2014 here\u2019s a ready-to-post, copyright-free blog article about how a DNS request moves across networks, including headers, ARP, and next-hop details. &#8220; \ud83c\udf10 How a DNS Request Travels Across Networks When you type a website name like www.example.com into your browser, your computer needs to find out the website\u2019s IP &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=78462\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1978],"tags":[],"class_list":["post-78462","post","type-post","status-publish","format-standard","hentry","category-computer-networks","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":78495,"url":"http:\/\/bangla.sitestree.com\/?p=78495","url_meta":{"origin":78462,"position":0},"title":"Who Resolves DNS Queries: ISP, Resolver, or Your PC?","author":"Sayed","date":"September 14, 2025","format":false,"excerpt":"Great question \ud83d\udc4c \u2014 this gets into the roles of DNS components in the real world. Let\u2019s break it down clearly, blog-ready and copyright-free: Who Resolves DNS Queries: ISP, Resolver, or Your PC? When you sit at home and connect to the internet through your ISP, different systems can play\u2026","rel":"","context":"In &quot;Computer Networks&quot;","block_context":{"text":"Computer Networks","link":"http:\/\/bangla.sitestree.com\/?cat=1978"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78455,"url":"http:\/\/bangla.sitestree.com\/?p=78455","url_meta":{"origin":78462,"position":1},"title":"Visual Comparison of Flat vs Hierarchical DNS Namespaces","author":"Sayed","date":"September 8, 2025","format":false,"excerpt":"Visual Comparison of Flat vs Hierarchical DNS Namespaces 1. Flat DNS Namespace example.com \u251c\u2500\u2500 server1.example.com \u251c\u2500\u2500 server2.example.com \u251c\u2500\u2500 printer1.example.com \u2514\u2500\u2500 laptop-john.example.com All hosts are directly under the main domain. Simple, but hard to scale for larger networks. 2. Hierarchical DNS Namespace example.com \u251c\u2500\u2500 hr.example.com \u2502 \u251c\u2500\u2500 server1.hr.example.com \u2502 \u2514\u2500\u2500 server2.hr.example.com\u2026","rel":"","context":"In &quot;Computer Networks&quot;","block_context":{"text":"Computer Networks","link":"http:\/\/bangla.sitestree.com\/?cat=1978"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78485,"url":"http:\/\/bangla.sitestree.com\/?p=78485","url_meta":{"origin":78462,"position":2},"title":"How an IP Address Gets Resolved to a Name in DNS","author":"Sayed","date":"September 13, 2025","format":false,"excerpt":"REF: AI Tools\/OpenAI\/ChatGPT Great question \ud83d\udc4d \u2014 let\u2019s turn this into a blog-ready, copyright-free post explaining step by step how an IP address gets resolved to a name (reverse lookup) and how the DNS servers, root servers, and TLD servers take part. How an IP Address Gets Resolved to a\u2026","rel":"","context":"In &quot;Computer Networks&quot;","block_context":{"text":"Computer Networks","link":"http:\/\/bangla.sitestree.com\/?cat=1978"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/09\/image-8.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":78488,"url":"http:\/\/bangla.sitestree.com\/?p=78488","url_meta":{"origin":78462,"position":3},"title":"DNS Caching Explained: How It Works, Pros, and Cons","author":"Sayed","date":"September 14, 2025","format":false,"excerpt":"Ref: AI Tools\/OpenAI\/ChatGPT (posted as is) \" Absolutely \ud83d\udc4d \u2014 here\u2019s a blog-ready, copyright-free post on DNS caching with explanation, how it works, pros, and cons. DNS Caching Explained: How It Works, Pros, and Cons When you visit a website like www.example.com, your computer asks the Domain Name System (DNS)\u2026","rel":"","context":"In &quot;Computer Networks&quot;","block_context":{"text":"Computer Networks","link":"http:\/\/bangla.sitestree.com\/?cat=1978"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/09\/image-9.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":78460,"url":"http:\/\/bangla.sitestree.com\/?p=78460","url_meta":{"origin":78462,"position":4},"title":"Explain DNS","author":"Sayed","date":"September 12, 2025","format":false,"excerpt":"Ref: AI Tools\/OpenAI\/ChatGPT \"Here\u2019s a short, simple, and copyright-free version you can post directly on your blog: \ud83c\udf10 What is DNS? DNS stands for Domain Name System.It\u2019s like the phonebook of the internet. Humans use names (like www.google.com). Computers use numbers (IP addresses, like 142.250.72.196). DNS is the system that\u2026","rel":"","context":"In &quot;Computer Networks&quot;","block_context":{"text":"Computer Networks","link":"http:\/\/bangla.sitestree.com\/?cat=1978"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78491,"url":"http:\/\/bangla.sitestree.com\/?p=78491","url_meta":{"origin":78462,"position":5},"title":"Iterative DNS Resolution Explained","author":"Sayed","date":"September 14, 2025","format":false,"excerpt":"Got it \ud83d\udc4d \u2014 here\u2019s a blog-ready, copyright-free explanation of Iterative Resolution in DNS that you can publish directly. Iterative DNS Resolution Explained When you type a domain name like www.example.com into your browser, the system needs to translate it into an IP address. One way this happens is through\u2026","rel":"","context":"In &quot;Computer Networks&quot;","block_context":{"text":"Computer Networks","link":"http:\/\/bangla.sitestree.com\/?cat=1978"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/78462","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=78462"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/78462\/revisions"}],"predecessor-version":[{"id":78465,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/78462\/revisions\/78465"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=78462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=78462"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=78462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}