[{"data":1,"prerenderedAt":6774},["ShallowReactive",2],{"\u002Fblog\u002FNetwork-Communication-Chapter-4":3,"post-count":860,"series-global-data":861,"authors-all":940,"series-sidebar-Network Communication":1131,"sidebar-authors":6673},{"id":4,"title":5,"author":6,"body":7,"date":849,"description":812,"draft":850,"edited_at":849,"extension":851,"featured_image":852,"meta":853,"navigation":854,"path":855,"pinned":850,"seo":856,"series":852,"seriesOrder":852,"sitemap":857,"stem":858,"tags":852,"__hash__":859},"blog\u002Fblog\u002FNetwork-Communication-Chapter-4.md","Network Communication Chapter 4","chinono",{"type":8,"value":9,"toc":811},"minimark",[10,15,28,32,35,72,77,88,109,113,116,136,140,143,169,172,175,179,182,211,215,221,235,242,246,253,273,277,280,286,292,296,303,307,335,339,345,359,369,380,384,391,394,416,425,429,435,453,456,460,463,467,497,504,508,515,535,538,542,553,557,560,564,567,573,577,580,606,610,613,617,642,646,657,660,686,690,787,791,805,808],[11,12,14],"h2",{"id":13},"introduction","Introduction",[16,17,18,19,23,24,27],"p",{},"Have you ever wondered what actually happens when you open a website or send a message online? Behind the scenes, your data goes on quite a journey — hopping through routers, getting wrapped in headers, and relying on clever protocols to arrive at the right place. In this post, we'll walk through two critical layers of networking: the ",[20,21,22],"strong",{},"Network Layer"," and the ",[20,25,26],{},"Transport Layer",". By the end, you'll understand how devices find each other, how data gets routed across the globe, and why some applications need guaranteed delivery while others are happy to \"wing it.\"",[11,29,31],{"id":30},"the-network-layer","The Network Layer",[16,33,34],{},"The network layer is what allows devices (your phone, your laptop, a server halfway around the world) to exchange data across interconnected networks. It handles four fundamental processes:",[36,37,38,45,56,66],"ol",{},[39,40,41,44],"li",{},[20,42,43],{},"Addressing end devices"," — Every device on a network needs a unique IP address so it can be identified. Think of it as a mailing address for your device.",[39,46,47,50,51,55],{},[20,48,49],{},"Encapsulation"," — When data arrives from the transport layer above, the network layer wraps it with an IP header, creating what we call a ",[52,53,54],"em",{},"packet",". This header contains all the routing information needed to get the data where it's going.",[39,57,58,61,62,65],{},[20,59,60],{},"Routing"," — The network layer figures out ",[52,63,64],{},"how"," to get the packet from the source to the destination, potentially through many intermediate devices.",[39,67,68,71],{},[20,69,70],{},"De-encapsulation"," — When the packet finally arrives at the destination, the IP header is stripped off and the data is passed back up to the transport layer.",[73,74,76],"h3",{"id":75},"the-nature-of-ip","The Nature of IP",[16,78,79,80,83,84,87],{},"The two most common network layer protocols are ",[20,81,82],{},"IPv4"," and ",[20,85,86],{},"IPv6",". Before we dive into the differences, let's understand the basic characteristics that both share:",[89,90,91,97,103],"ul",{},[39,92,93,96],{},[20,94,95],{},"Connectionless"," — IP doesn't establish a connection before sending data. It's like dropping a letter in a mailbox — you don't call the recipient first to let them know it's coming.",[39,98,99,102],{},[20,100,101],{},"Best Effort (Unreliable)"," — There's no guarantee your packet will arrive. The sender doesn't even know if the destination device is turned on. (Don't worry — reliability is handled at a higher layer!)",[39,104,105,108],{},[20,106,107],{},"Media Independent"," — IP doesn't care whether your data travels over fiber optic cable, Wi-Fi, or even a satellite link. It works the same regardless of the physical medium.",[73,110,112],{"id":111},"ipv4-and-its-limitations","IPv4 and Its Limitations",[16,114,115],{},"IPv4 has served us well for decades, but it comes with some significant problems:",[89,117,118,124,130],{},[39,119,120,123],{},[20,121,122],{},"Address depletion"," — IPv4 addresses are 32-bit, giving us roughly 4.3 billion unique addresses. That sounds like a lot, but with billions of devices connected today, we've essentially run out.",[39,125,126,129],{},[20,127,128],{},"Lack of end-to-end connectivity"," — To cope with address shortages, we use Network Address Translation (NAT), which lets many devices share a single public IP. The downside? Devices behind NAT are hidden from the outside world, which breaks certain applications that need direct connections (like peer-to-peer services).",[39,131,132,135],{},[20,133,134],{},"Increased network complexity"," — NAT adds extra processing, introduces latency, and makes troubleshooting harder.",[73,137,139],{"id":138},"ipv6-the-solution","IPv6: The Solution",[16,141,142],{},"IPv6 was designed to solve these problems:",[89,144,145,151,157,163],{},[39,146,147,150],{},[20,148,149],{},"Massive address space"," — IPv6 uses 128-bit addresses. To put that in perspective, that's roughly 340 undecillion addresses (3.4 × 10³⁸). Every grain of sand on Earth could have its own IP address — several times over.",[39,152,153,156],{},[20,154,155],{},"Simplified header"," — The IPv6 header has fewer fields than IPv4, which means routers can process packets more efficiently.",[39,158,159,162],{},[20,160,161],{},"No need for NAT"," — With so many addresses available, every device can have its own globally unique address. This restores true end-to-end connectivity.",[39,164,165,168],{},[20,166,167],{},"Built-in security"," — IPv6 natively supports IPsec for authentication and encryption, whereas in IPv4, security features were added on as an afterthought.",[11,170,60],{"id":171},"routing",[16,173,174],{},"Now that we understand how devices are addressed, let's look at how packets actually find their way through the network.",[73,176,178],{"id":177},"where-can-a-host-send-packets","Where Can a Host Send Packets?",[16,180,181],{},"A device can send packets to three types of destinations:",[89,183,184,199,205],{},[39,185,186,189,190,194,195,198],{},[20,187,188],{},"Itself"," — By pinging the loopback address (",[191,192,193],"code",{},"127.0.0.1"," for IPv4, or ",[191,196,197],{},"::1"," for IPv6). This is a quick way to test whether the device's own networking stack is working properly.",[39,200,201,204],{},[20,202,203],{},"A local host"," — A device on the same local network. For example, another computer connected to the same Wi-Fi router.",[39,206,207,210],{},[20,208,209],{},"A remote host"," — A device on a completely different network, like a web server on the other side of the world.",[73,212,214],{"id":213},"how-does-a-host-know-where-to-send","How Does a Host Know Where to Send?",[16,216,217,218],{},"When your device wants to send a packet, it first needs to determine: ",[52,219,220],{},"is the destination on my local network, or is it somewhere else?",[89,222,223,229],{},[39,224,225,228],{},[20,226,227],{},"In IPv4",", the device checks its own subnet mask along with its IP address and the destination IP address. If they're on the same subnet, the packet stays local.",[39,230,231,234],{},[20,232,233],{},"In IPv6",", the local router advertises the network prefix to all devices, so each device knows what \"local\" looks like.",[16,236,237,238,241],{},"If the destination is on a different network, the device forwards the packet to its ",[20,239,240],{},"default gateway"," — usually a router that knows how to reach other networks.",[73,243,245],{"id":244},"the-routers-routing-table","The Router's Routing Table",[16,247,248,249,252],{},"Routers are the workhorses of inter-network communication. Each router maintains a ",[20,250,251],{},"routing table"," that contains three types of entries:",[89,254,255,261,267],{},[39,256,257,260],{},[20,258,259],{},"Directly-connected networks"," — Networks that are physically attached to the router's own interfaces.",[39,262,263,266],{},[20,264,265],{},"Remote networks"," — Networks that the router has learned about, either through manual configuration or dynamic routing protocols.",[39,268,269,272],{},[20,270,271],{},"Default route"," — A fallback route used when no specific match exists in the table. Think of it as \"if you don't know where to go, send it this way.\"",[73,274,276],{"id":275},"static-vs-dynamic-routing","Static vs. Dynamic Routing",[16,278,279],{},"There are two approaches to populating a routing table:",[16,281,282,285],{},[20,283,284],{},"Static routing"," is where a network administrator manually enters routes. It's simple and predictable, but if the network topology changes (say, a link goes down), someone has to manually update the routes. This doesn't scale well for large or frequently changing networks.",[16,287,288,291],{},[20,289,290],{},"Dynamic routing"," uses protocols that allow routers to automatically discover and share route information with each other. If a link fails, routers can detect the change and find alternative paths on their own. This is far more resilient and is what powers the internet's backbone.",[11,293,295],{"id":294},"icmpv4-the-networks-diagnostic-tool","ICMPv4: The Network's Diagnostic Tool",[16,297,298,299,302],{},"The ",[20,300,301],{},"Internet Control Message Protocol version 4 (ICMPv4)"," isn't about delivering user data — it's a helper protocol used for diagnostics and error reporting.",[73,304,306],{"id":305},"key-icmp-messages","Key ICMP Messages",[89,308,309,319,325],{},[39,310,311,314,315,318],{},[20,312,313],{},"Echo Request \u002F Echo Reply"," — This is the mechanism behind the ",[191,316,317],{},"ping"," command. Your device sends an Echo Request to a target; if the target is reachable, it sends back an Echo Reply. Simple, but incredibly useful for testing connectivity.",[39,320,321,324],{},[20,322,323],{},"Destination Unreachable"," — When a router or host can't deliver a packet (maybe the destination doesn't exist, or a service isn't running), it sends this message back to the source.",[39,326,327,330,331,334],{},[20,328,329],{},"Time Exceeded"," — Every IP packet has a ",[20,332,333],{},"Time to Live (TTL)"," field that decreases by 1 at each router. If TTL hits 0, the packet is discarded and a Time Exceeded message is sent back. This prevents packets from looping endlessly through the network.",[73,336,338],{"id":337},"practical-tools-ping-and-traceroute","Practical Tools: Ping and Traceroute",[16,340,341,344],{},[20,342,343],{},"Ping"," is the most common connectivity test. You can use it in a layered approach to isolate problems:",[36,346,347,353,356],{},[39,348,349,350,352],{},"Ping the loopback (",[191,351,193],{},") — Tests your own TCP\u002FIP stack.",[39,354,355],{},"Ping the default gateway — Tests connectivity to your local router.",[39,357,358],{},"Ping a remote host — Tests end-to-end connectivity.",[16,360,361,364,365,368],{},[20,362,363],{},"Traceroute"," (or ",[191,366,367],{},"tracert"," on Windows) goes a step further. It maps out the entire path a packet takes to reach a destination, listing every router (hop) along the way. It works by sending packets with incrementally increasing TTL values, so each router along the path reveals itself via Time Exceeded messages.",[16,370,371,372,375,376,379],{},"Traceroute sends three packets per hop and measures the ",[20,373,374],{},"round-trip time (RTT)"," for each. If a packet is lost or goes unreplied, you'll see an asterisk (",[191,377,378],{},"*",") in the output — a clue that something might be wrong at that hop.",[11,381,383],{"id":382},"the-transport-layer","The Transport Layer",[16,385,386,387,390],{},"We've seen how the network layer gets packets from one device to another. But what about making sure the right ",[52,388,389],{},"application"," gets the data? That's where the transport layer comes in.",[16,392,393],{},"The transport layer is responsible for:",[89,395,396,399,409],{},[39,397,398],{},"Establishing temporary communication sessions between two applications.",[39,400,401,404,405,408],{},[20,402,403],{},"Segmenting"," data into smaller pieces for transmission and ",[20,406,407],{},"reassembling"," them on the receiving end.",[39,410,411,412,415],{},"Identifying the correct application for each data stream using ",[20,413,414],{},"port numbers",".",[16,417,418,419,83,422,415],{},"There are two main transport layer protocols, each with very different philosophies: ",[20,420,421],{},"TCP",[20,423,424],{},"UDP",[73,426,428],{"id":427},"port-numbers-directing-traffic-to-the-right-app","Port Numbers: Directing Traffic to the Right App",[16,430,431,432,434],{},"Both TCP and UDP use ",[20,433,414],{}," to identify which application should handle incoming data. When you send a request, two port numbers are involved:",[89,436,437,443],{},[39,438,439,442],{},[20,440,441],{},"Destination port"," — Tells the receiving device which service you're requesting. For example, port 80 means HTTP (web), port 443 means HTTPS, port 25 means SMTP (email).",[39,444,445,448,449,452],{},[20,446,447],{},"Source port"," — A randomly generated number on the sending device that identifies ",[52,450,451],{},"this specific conversation",". This is how your device can have multiple tabs open to different websites simultaneously — each tab uses a different source port.",[16,454,455],{},"The source and destination ports are placed in the segment header, and the segment is then encapsulated inside an IP packet for delivery.",[11,457,459],{"id":458},"transmission-control-protocol-tcp","Transmission Control Protocol (TCP)",[16,461,462],{},"TCP is the reliable workhorse of the internet. When your data absolutely, positively has to get there — and in the right order — TCP is the protocol for the job.",[73,464,466],{"id":465},"core-features","Core Features",[89,468,469,479,485,491],{},[39,470,471,474,475,478],{},[20,472,473],{},"Session Establishment"," — TCP is ",[52,476,477],{},"connection-oriented",". Before any data flows, the two devices negotiate and establish a session. This ensures both sides are ready.",[39,480,481,484],{},[20,482,483],{},"Reliable Delivery"," — TCP tracks every segment sent. If something gets lost or corrupted, the source retransmits it.",[39,486,487,490],{},[20,488,489],{},"Same-Order Delivery"," — Segments are numbered and sequenced, so even if they arrive out of order, the receiving device can reassemble them correctly.",[39,492,493,496],{},[20,494,495],{},"Flow Control"," — If the receiving device is overwhelmed (low on memory, limited bandwidth), it can tell the sender to slow down. This prevents data loss due to congestion.",[16,498,499,500,503],{},"The trade-off? All this reliability comes with overhead. Each TCP segment carries a ",[20,501,502],{},"20-byte header"," — considerably more than UDP's 8 bytes.",[73,505,507],{"id":506},"the-three-way-handshake","The Three-Way Handshake",[16,509,510,511,514],{},"Before TCP can transmit data, it establishes a connection through a process called the ",[20,512,513],{},"three-way handshake",":",[36,516,517,523,529],{},[39,518,519,522],{},[20,520,521],{},"SYN"," — The client sends a segment with the SYN (Synchronize) flag set, essentially saying \"I'd like to start a conversation.\"",[39,524,525,528],{},[20,526,527],{},"SYN-ACK"," — The server responds with both SYN and ACK (Acknowledgement) flags, saying \"Got it, and I'd like to talk too.\"",[39,530,531,534],{},[20,532,533],{},"ACK"," — The client sends back a final ACK, confirming the connection is established.",[16,536,537],{},"Once this handshake is complete, data can flow freely in both directions.",[73,539,541],{"id":540},"closing-a-connection","Closing a Connection",[16,543,544,545,548,549,552],{},"To close a TCP session, a similar (but simpler) process occurs using the ",[20,546,547],{},"FIN (Finish)"," flag. Since TCP connections are bidirectional, each direction is closed independently with a FIN segment followed by an ACK — making it a ",[20,550,551],{},"two-way handshake"," for each direction (four segments total to fully close).",[73,554,556],{"id":555},"handling-out-of-order-data","Handling Out-of-Order Data",[16,558,559],{},"Network packets don't always arrive in the order they were sent — they might take different paths or experience different delays. TCP handles this gracefully: the receiving side places incoming segments into a buffer, sorts them by sequence number, and only passes the fully reassembled data up to the application.",[73,561,563],{"id":562},"acknowledgement-and-retransmission","Acknowledgement and Retransmission",[16,565,566],{},"TCP ensures reliability through acknowledgements. The destination acknowledges received data, and if the source doesn't receive an ACK within a set time, it retransmits the data from the last acknowledged point.",[16,568,298,569,572],{},[20,570,571],{},"window size"," field in the TCP header controls how much data can be sent before an acknowledgement is required. A larger window allows more data to flow before pausing for confirmation, improving throughput on high-latency connections. This mechanism also supports flow control — the receiver can shrink the window to slow the sender down.",[73,574,576],{"id":575},"common-applications-using-tcp","Common Applications Using TCP",[16,578,579],{},"TCP is the go-to protocol for applications that need reliable, ordered delivery:",[89,581,582,588,594,600],{},[39,583,584,587],{},[20,585,586],{},"HTTP\u002FHTTPS"," — Web browsing",[39,589,590,593],{},[20,591,592],{},"FTP"," — File transfers",[39,595,596,599],{},[20,597,598],{},"SMTP"," — Sending email",[39,601,602,605],{},[20,603,604],{},"Telnet"," — Remote terminal access",[11,607,609],{"id":608},"user-datagram-protocol-udp","User Datagram Protocol (UDP)",[16,611,612],{},"If TCP is the careful, methodical courier, UDP is the \"just throw it and hope for the best\" approach. And that's not a bad thing — for the right use case, it's exactly what you want.",[73,614,616],{"id":615},"core-characteristics","Core Characteristics",[89,618,619,624,630,636],{},[39,620,621,623],{},[20,622,95],{}," — No handshake, no session establishment. Data is sent immediately.",[39,625,626,629],{},[20,627,628],{},"Unreliable delivery"," — No acknowledgements, no retransmission. If a packet is lost, it's gone.",[39,631,632,635],{},[20,633,634],{},"No ordered reconstruction"," — Segments might arrive out of order, and UDP won't rearrange them.",[39,637,638,641],{},[20,639,640],{},"No flow control"," — The sender transmits at whatever rate it wants, with no mechanism to slow down.",[73,643,645],{"id":644},"why-would-anyone-use-udp","Why Would Anyone Use UDP?",[16,647,648,649,652,653,656],{},"Because sometimes, ",[20,650,651],{},"speed matters more than perfection",". UDP's minimal overhead (just an 8-byte header) makes it incredibly fast and efficient. The data units in UDP are called ",[20,654,655],{},"datagrams",", and they're delivered on a best-effort basis.",[16,658,659],{},"Consider these use cases:",[89,661,662,668,674,680],{},[39,663,664,667],{},[20,665,666],{},"DNS"," — When your browser looks up a domain name, it needs an answer fast. If the query is lost, it can simply ask again.",[39,669,670,673],{},[20,671,672],{},"Video streaming"," — A dropped frame here and there is barely noticeable, but buffering due to retransmission delays would ruin the experience.",[39,675,676,679],{},[20,677,678],{},"VoIP (Voice over IP)"," — Real-time voice communication can tolerate small gaps, but it can't tolerate the delays that TCP's reliability mechanisms would introduce.",[39,681,682,685],{},[20,683,684],{},"TFTP \u002F SNMP"," — Lightweight protocols where simplicity and speed are prioritized.",[11,687,689],{"id":688},"tcp-vs-udp-a-quick-comparison","TCP vs. UDP: A Quick Comparison",[691,692,693,707],"table",{},[694,695,696],"thead",{},[697,698,699,703,705],"tr",{},[700,701,702],"th",{},"Feature",[700,704,421],{},[700,706,424],{},[708,709,710,721,732,743,754,765,776],"tbody",{},[697,711,712,716,719],{},[713,714,715],"td",{},"Connection type",[713,717,718],{},"Connection-oriented (handshake)",[713,720,95],{},[697,722,723,726,729],{},[713,724,725],{},"Reliability",[713,727,728],{},"Guaranteed delivery with ACKs",[713,730,731],{},"Best effort, no guarantees",[697,733,734,737,740],{},[713,735,736],{},"Ordering",[713,738,739],{},"Segments reassembled in order",[713,741,742],{},"No ordering",[697,744,745,748,751],{},[713,746,747],{},"Flow control",[713,749,750],{},"Yes (window size)",[713,752,753],{},"No",[697,755,756,759,762],{},[713,757,758],{},"Header overhead",[713,760,761],{},"20 bytes",[713,763,764],{},"8 bytes",[697,766,767,770,773],{},[713,768,769],{},"Speed",[713,771,772],{},"Slower (more overhead)",[713,774,775],{},"Faster (less overhead)",[697,777,778,781,784],{},[713,779,780],{},"Use cases",[713,782,783],{},"Web, email, file transfer",[713,785,786],{},"Streaming, DNS, VoIP",[11,788,790],{"id":789},"wrapping-up","Wrapping Up",[16,792,793,794,797,798,800,801,804],{},"The network and transport layers work hand-in-hand to deliver data across the internet. The network layer handles addressing and routing — figuring out ",[52,795,796],{},"where"," to send your data and ",[52,799,64],{}," to get it there. The transport layer ensures the data reaches the right application and decides ",[52,802,803],{},"how carefully"," it needs to be delivered.",[16,806,807],{},"Understanding these layers gives you a solid foundation for grasping how the internet really works — from the moment you type a URL in your browser to the instant the page appears on your screen. Every packet goes through addressing, routing, encapsulation, and transport protocol handling, all happening invisibly in milliseconds.",[16,809,810],{},"Whether it's TCP's meticulous reliability or UDP's carefree speed, each protocol has its place. The beauty of networking is in how all these pieces fit together to create the seamless experience we take for granted every day.",{"title":812,"searchDepth":813,"depth":813,"links":814},"",2,[815,816,822,828,832,835,843,847,848],{"id":13,"depth":813,"text":14},{"id":30,"depth":813,"text":31,"children":817},[818,820,821],{"id":75,"depth":819,"text":76},3,{"id":111,"depth":819,"text":112},{"id":138,"depth":819,"text":139},{"id":171,"depth":813,"text":60,"children":823},[824,825,826,827],{"id":177,"depth":819,"text":178},{"id":213,"depth":819,"text":214},{"id":244,"depth":819,"text":245},{"id":275,"depth":819,"text":276},{"id":294,"depth":813,"text":295,"children":829},[830,831],{"id":305,"depth":819,"text":306},{"id":337,"depth":819,"text":338},{"id":382,"depth":813,"text":383,"children":833},[834],{"id":427,"depth":819,"text":428},{"id":458,"depth":813,"text":459,"children":836},[837,838,839,840,841,842],{"id":465,"depth":819,"text":466},{"id":506,"depth":819,"text":507},{"id":540,"depth":819,"text":541},{"id":555,"depth":819,"text":556},{"id":562,"depth":819,"text":563},{"id":575,"depth":819,"text":576},{"id":608,"depth":813,"text":609,"children":844},[845,846],{"id":615,"depth":819,"text":616},{"id":644,"depth":819,"text":645},{"id":688,"depth":813,"text":689},{"id":789,"depth":813,"text":790},"2026-04-13",false,"md",null,{},true,"\u002Fblog\u002FNetwork-Communication-Chapter-4",{"title":5,"description":812},{"loc":855},"blog\u002FNetwork-Communication-Chapter-4","6a-nLZ5vrDMv_1bGwUKIRgi8x0mTP8uFa9vs2zj9CZo",77,{"id":862,"extension":863,"meta":864,"series":865,"stem":938,"__hash__":939},"series\u002Fseries.json","json",{},{"微積分教學":866,"生活紀錄":869,"Motor Control":871,"生活隨筆":885,"Motor learning":889,"小兒物治":907,"中風":917,"平衡":928,"Network Communication":931},[867,868],"微積分隨筆-未完成版","2025數學回顧",[870],"一個漂流到地球的故事",[872,873,874,875,876,877,878,879,880,881,882,883,884],"控制自己-Be-water-my-friend","控制自己-Be-water-my-friend（二）","控制自己-Be-water-my-friend（三）","控制自己-Be-water-my-friend（四）","控制自己-Be-water-my-friend（五）","進階控制制制制","周圍理論學派（一）反射理論","周圍理論學派（二）階層理論","中樞理論學派（一）CPG","中樞理論學派（二）Motor-Program","模組理論","系統理論","動態模組理論",[886,887,888],"你好，世界。","根本沒人在乎你的部落格","早安-午安-晚安",[890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906],"動作學習（一）介紹","動作學習（二）form-of-learning","動作學習（三）Measurement-of-learning","動作學習（四）理論","動作學習（五）理論-2","動作學習（六）理論-3","動作學習（七）練習方式-1","動作學習（八）練習方式-2","動作學習（九）回饋-1","動作學習（十）回饋-2-擴增性(KR)","動作學習（十一）回饋-3-擴增性(KP)","動作學習（十一）回饋-4-(間隔+物理引導)","動作學習（十二）神經可塑性","動作學習（十二）神經可塑性2","動作學習（十三）臨床應用","動作學習（十四）記憶","動作學習（十五）影響表現的因素",[908,909,910,911,912,913,914,915,916],"腦性痲痺-CP","Motor-Learning","Motor-Learning小兒（二）","Gait-analysis小兒（一）","Gait-analysis小兒（二）","小兒發展（一）","小兒發展（二）","小兒發展（三）","小兒發展（四）",[918,919,920,921,922,923,924,925,926,927],"腦血管病變（CVA）（中風）(一)","CVA（二）","CVA（三）血管症候群-i","CVA（四）血管症候群-(ii)","CVA（四）","CVA（六）","CVA（七）評估-(i)","CVA（八）評估-(ii)","CVA（九）復健—手部-(i)","CVA跑台（一）",[929,930],"平衡與前庭失調（一）","Balance（二）前庭覺-(i)",[932,933,934,935,936,937],"Network-Communication,-Chapter-1","Network-Communication,-Chapter-2","Network-Communication,-Chapter-3","Network-Communication-Chapter-4","Network-Communications,-Chapter-5","Network-Communication,-Chapter-6","series","VWBIgkZ1jo71KrQ84mgWmpuWvXAq0zxwBGcN68PHiG4",[941,960,980,999,1016,1033,1048,1064,1081,1102],{"id":942,"title":943,"avatar":944,"banner":852,"bio":945,"body":946,"description":812,"extension":851,"meta":950,"name":943,"navigation":854,"path":951,"seo":952,"sitemap":953,"social":954,"stem":958,"__hash__":959},"authors\u002Fauthors\u002Fautomata.md","Automata","\u002Fimages\u002Fuploads\u002Fnier-automata-2b.jpg","一隻吐司天喵，漂浮在銀河星辰中",{"type":8,"value":947,"toc":948},[],{"title":812,"searchDepth":813,"depth":813,"links":949},[],{},"\u002Fauthors\u002Fautomata",{"description":812},{"loc":951},{"website":955,"twitter":956,"github":957},"https:\u002F\u002Freurl.cc\u002FWOeM29","https:\u002F\u002Freurl.cc\u002FLnvLEy","https:\u002F\u002Fgithub.com\u002FAutomata-0","authors\u002Fautomata","IkVbO2zA7revgYq624iVWpSZQUyMmWa82tw_EbWXViE",{"id":961,"title":962,"avatar":963,"banner":964,"bio":965,"body":966,"description":812,"extension":851,"meta":970,"name":971,"navigation":854,"path":972,"seo":973,"sitemap":974,"social":975,"stem":978,"__hash__":979},"authors\u002Fauthors\u002Fchinono.md","Chinono","\u002Fimages\u002Fuploads\u002F103467998_p0 copy.png","\u002Fimages\u002Fbackground_light.jpg","我不是女生！",{"type":8,"value":967,"toc":968},[],{"title":812,"searchDepth":813,"depth":813,"links":969},[],{},"七糯糯","\u002Fauthors\u002Fchinono",{"description":812},{"loc":972},{"github":976,"twitter":812,"website":977},"https:\u002F\u002Fgithub.com\u002FChinHongTan","https:\u002F\u002Fchinono.dev","authors\u002Fchinono","jj1J9mFh3InZFL6XtCzGBQ5jPip0EwBDE3mjGvnN6jE",{"id":981,"title":982,"avatar":983,"banner":984,"bio":985,"body":986,"description":812,"extension":851,"meta":990,"name":991,"navigation":854,"path":992,"seo":993,"sitemap":994,"social":995,"stem":997,"__hash__":998},"authors\u002Fauthors\u002Fhibiki12141132.md","Hibiki12141132","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F265822020?v=4","\u002Fimages\u002Fuploads\u002F1773978423557-___.jpg","享受著知識強姦大腦的過程 (內文含個人發癲 不要再意)",{"type":8,"value":987,"toc":988},[],{"title":812,"searchDepth":813,"depth":813,"links":989},[],{},"HiBiKi","\u002Fauthors\u002Fhibiki12141132",{"description":812},{"loc":992},{"github":996,"twitter":812},"https:\u002F\u002Fgithub.com\u002FHiBiKi12141132","authors\u002Fhibiki12141132","dbRnKEcYeCH_faD8R7AUmPPcwgc26s_fR4Q_lu4qtA4",{"id":1000,"title":1001,"avatar":1002,"banner":852,"bio":1003,"body":1004,"description":812,"extension":851,"meta":1008,"name":1001,"navigation":854,"path":1009,"seo":1010,"sitemap":1011,"social":1012,"stem":1014,"__hash__":1015},"authors\u002Fauthors\u002Fmahiro.md","Mahiro","https:\u002F\u002Ftruth.bahamut.com.tw\u002Fs01\u002F202601\u002F2a29b047d341f840b2ce89f7d65b2ba3.JPG","一個致力於逃離新竹的電機系小雜魚",{"type":8,"value":1005,"toc":1006},[],{"title":812,"searchDepth":813,"depth":813,"links":1007},[],{},"\u002Fauthors\u002Fmahiro",{"description":812},{"loc":1009},{"github":1013},"https:\u002F\u002Fgithub.com\u002Fwifekurumi","authors\u002Fmahiro","b435tdWu9eXUf06WroCge0I405cqA0FhLlUUhoPk14k",{"id":1017,"title":1018,"avatar":1019,"banner":852,"bio":1020,"body":1021,"description":812,"extension":851,"meta":1025,"name":1018,"navigation":854,"path":1026,"seo":1027,"sitemap":1028,"social":1029,"stem":1031,"__hash__":1032},"authors\u002Fauthors\u002Fosborrrrn.md","Osborrrrn","\u002Fimages\u002Fuploads\u002Frectangle_large_type_2_c516437ed713e5de1f7d2dca8a20cd81.jpg","別人笑我太瘋癲，我笑他人看不穿。\n不見五陵豪傑墓，無花無酒鋤就田",{"type":8,"value":1022,"toc":1023},[],{"title":812,"searchDepth":813,"depth":813,"links":1024},[],{},"\u002Fauthors\u002Fosborrrrn",{"description":812},{"loc":1026},{"github":1030},"https:\u002F\u002Fgithub.com\u002FOsborrrrn","authors\u002Fosborrrrn","w6VWZKPUwvXn5i7MKXOpU2Jeqr3BrdTKVCeDOF2jZlU",{"id":1034,"title":1035,"avatar":852,"banner":852,"bio":1036,"body":1037,"description":812,"extension":851,"meta":1041,"name":1035,"navigation":854,"path":1042,"seo":1043,"sitemap":1044,"social":1045,"stem":1046,"__hash__":1047},"authors\u002Fauthors\u002F法法.md","法法","123",{"type":8,"value":1038,"toc":1039},[],{"title":812,"searchDepth":813,"depth":813,"links":1040},[],{},"\u002Fauthors",{"description":812},{"loc":1042},{"github":812},"authors\u002F法法","iR6Gk4Og8d5vvQNBCjcoR3llS91l2he2eseyWDSVOcE",{"id":1049,"title":1050,"avatar":1051,"banner":852,"bio":1052,"body":1053,"description":812,"extension":851,"meta":1057,"name":1050,"navigation":854,"path":1042,"seo":1058,"sitemap":1059,"social":1060,"stem":1062,"__hash__":1063},"authors\u002Fauthors\u002F灰海獅.md","灰海獅","\u002Fimages\u002Fuploads\u002Fimg_3279.jpeg","守夜人",{"type":8,"value":1054,"toc":1055},[],{"title":812,"searchDepth":813,"depth":813,"links":1056},[],{},{"description":812},{"loc":1042},{"github":1061},"https:\u002F\u002Fgithub.com\u002Fyuiri333","authors\u002F灰海獅","006kpPddu7AS_hylzLnt_BdI4a1nC18PJvOJA5msYMY",{"id":1065,"title":1066,"avatar":1067,"banner":1068,"bio":1069,"body":1070,"description":812,"extension":851,"meta":1074,"name":1066,"navigation":854,"path":1042,"seo":1075,"sitemap":1076,"social":1077,"stem":1079,"__hash__":1080},"authors\u002Fauthors\u002F花夜.md","花夜","\u002Fimages\u002Fuploads\u002F1772719470518-791_20260218161129.png","\u002Fimages\u002Fuploads\u002Fimg_2446.png","無論你身在何處，我都會在這裡等你",{"type":8,"value":1071,"toc":1072},[],{"title":812,"searchDepth":813,"depth":813,"links":1073},[],{},{"description":812},{"loc":1042},{"github":1078,"twitter":812},"https:\u002F\u002Fgithub.com\u002Fflowernight0709","authors\u002F花夜","IeoFsRasZYYN2jk_Ou7wyPt6b_6MRa-YNk6rSSVIoyk",{"id":1082,"title":1083,"avatar":1084,"banner":1085,"bio":1086,"body":1087,"description":1091,"extension":851,"meta":1094,"name":1083,"navigation":854,"path":1042,"seo":1095,"sitemap":1096,"social":1097,"stem":1100,"__hash__":1101},"authors\u002Fauthors\u002F輝月.md","輝月","\u002Fimages\u002Fuploads\u002Ffb_img_1771085634823.jpg","\u002Fimages\u002Fuploads\u002Fimg_1751.jpg","天下布魔好好玩",{"type":8,"value":1088,"toc":1092},[1089],[16,1090,1091],{},"準大學生，目前正在製作TFR模組",{"title":812,"searchDepth":813,"depth":813,"links":1093},[],{},{"description":1091},{"loc":1042},{"twitter":1098,"github":1099},"https:\u002F\u002Fx.com\u002Fhuiyue945","https:\u002F\u002Fgithub.com\u002Fhuiyueyea","authors\u002F輝月","VkvsUEaHwNfQX5eT5ZPqIp5PRUJCRM8A9GxW_JM_FZY",{"id":1103,"title":1104,"avatar":1105,"banner":852,"bio":1106,"body":1107,"description":1111,"extension":851,"meta":1124,"name":1104,"navigation":854,"path":1042,"seo":1125,"sitemap":1126,"social":1127,"stem":1129,"__hash__":1130},"authors\u002Fauthors\u002F阿西狄亞.md","阿西狄亞","\u002Fimages\u002Fuploads\u002Fimg_20251215_121849_589.jpg","君は実に馬鹿だな",{"type":8,"value":1108,"toc":1122},[1109,1112],[16,1110,1111],{},"我是阿西狄亞，阿西狄亞的阿，阿西狄亞的西，阿西狄亞的狄，阿西狄亞的亞，你可以叫我阿西。",[16,1113,1114,1117,1118,1121],{},[20,1115,1116],{},"我說的所有事情都抱有極度主觀的看法以及意見","，如果你有其他想法，",[20,1119,1120],{},"你是對的","。",{"title":812,"searchDepth":813,"depth":813,"links":1123},[],{},{"description":1111},{"loc":1042},{"github":1128},"https:\u002F\u002Fgithub.com\u002FAcedia0130","authors\u002F阿西狄亞","ZJG1C5Ebaie30xfNg68v93pWdcASZjAM7R4U8dFRfds",[1132,1812,2841,3729,4278,5537],{"id":1133,"title":1134,"author":6,"body":1135,"date":1805,"description":812,"draft":850,"edited_at":1805,"extension":851,"featured_image":852,"meta":1806,"navigation":854,"path":1807,"pinned":850,"seo":1808,"series":852,"seriesOrder":852,"sitemap":1809,"stem":1810,"tags":852,"__hash__":1811},"blog\u002Fblog\u002FNetwork-Communication,-Chapter-1.md","Network Communication, Chapter 1",{"type":8,"value":1136,"toc":1776},[1137,1141,1147,1154,1158,1168,1171,1195,1199,1202,1206,1209,1213,1216,1240,1279,1283,1286,1306,1310,1317,1331,1334,1338,1341,1401,1405,1408,1414,1420,1424,1427,1451,1455,1459,1523,1527,1530,1550,1557,1592,1596,1599,1603,1610,1614,1617,1621,1628,1632,1638,1658,1662,1665,1697,1701,1704,1742,1746,1753,1768,1770,1773],[11,1138,1140],{"id":1139},"why-should-you-care-about-networks","Why Should You Care About Networks?",[16,1142,1143,1144,415],{},"We live in a hyper-connected world. News travels worldwide in seconds, we store our photos and documents in the cloud, and video calls with people across the globe are just a click away. Behind all of this is one thing: ",[20,1145,1146],{},"computer networks",[16,1148,1149,1150,1153],{},"The idea of the ",[20,1151,1152],{},"Internet of Everything (IoE)"," captures this well — it's the convergence of people, processes, data, and things, all linked together through networked connections. Understanding how networks work is the first step to understanding the digital infrastructure that powers modern life.",[11,1155,1157],{"id":1156},"hosts-clients-and-servers","Hosts, Clients, and Servers",[16,1159,1160,1161,364,1164,1167],{},"Every device that participates directly in network communication is called a ",[20,1162,1163],{},"host",[20,1165,1166],{},"end device","). Your laptop, your phone, a web server — all hosts. They can send and receive messages on the network.",[16,1169,1170],{},"In modern networks, an end device can play one of three roles:",[89,1172,1173,1179,1185],{},[39,1174,1175,1178],{},[20,1176,1177],{},"Client"," — requests information or services (e.g. your browser asking for a web page).",[39,1180,1181,1184],{},[20,1182,1183],{},"Server"," — provides information or services (e.g. a machine serving that web page). Servers run specialised software for each service they offer.",[39,1186,1187,1190,1191,1194],{},[20,1188,1189],{},"Both"," — in a ",[20,1192,1193],{},"peer-to-peer (P2P) network",", a single host can act as client and server simultaneously. Think of file-sharing applications where your computer both downloads from and uploads to other users.",[11,1196,1198],{"id":1197},"network-components","Network Components",[16,1200,1201],{},"A network's infrastructure breaks down into three broad categories:",[73,1203,1205],{"id":1204},"_1-end-devices","1. End Devices",[16,1207,1208],{},"These are the devices at the \"edges\" of the network — the ones people actually interact with. Examples include laptops, smartphones, network printers, VoIP phones, security cameras, and tablets.",[73,1210,1212],{"id":1211},"_2-intermediary-devices","2. Intermediary Devices",[16,1214,1215],{},"These are the behind-the-scenes workhorses that make sure data gets where it needs to go:",[89,1217,1218,1224,1234],{},[39,1219,1220,1223],{},[20,1221,1222],{},"Switches and wireless access points"," — provide network access by connecting end devices together.",[39,1225,1226,1229,1230,1233],{},[20,1227,1228],{},"Routers"," — connect separate networks to form an ",[52,1231,1232],{},"internetwork",", directing traffic between them.",[39,1235,1236,1239],{},[20,1237,1238],{},"Firewalls"," — enforce security policies by filtering unauthorised traffic.",[1241,1242,1246,1250],"details",{"className":1243},[1244,1245],"info-box","info-box-info",[1247,1248,1249],"summary",{},"What's different between a Switch, Router and Modem?",[1251,1252,1255],"div",{"className":1253},[1254],"info-box-content",[36,1256,1257,1263,1273],{},[39,1258,1259,1262],{},[20,1260,1261],{},"Modem",": Your ISP sends the internet to your house via analog signals through cables (like coax, fiber optic, or phone lines). Your computers, however, only speak in digital signals (1s and 0s). The modem acts as a translator, turning the ISP's signal into a digital signal your devices can understand, and vice versa.",[39,1264,1265,1268,1269,1272],{},[20,1266,1267],{},"Router",": The router sits just inside your modem. It assigns a unique local IP address to every device in your house. When you request a webpage on your phone, the router remembers that ",[52,1270,1271],{},"your phone"," asked for it, sends the request out through the modem, and when the website's data comes back, the router ensures it goes to your phone and not your smart TV.",[39,1274,1275,1278],{},[20,1276,1277],{},"Switch",": While a router connects your home to the outside world, a switch just links your home devices to each other. It gives you more ports to plug things in. When a computer plugged into port 1 wants to send a file to a printer plugged into port 4, the switch directs that data straight from port 1 to port 4 without bothering the rest of the network.",[73,1280,1282],{"id":1281},"_3-network-media","3. Network Media",[16,1284,1285],{},"Data needs a physical (or wireless) channel to travel through. The three common types of media are:",[89,1287,1288,1294,1300],{},[39,1289,1290,1293],{},[20,1291,1292],{},"Metallic wires"," (e.g. copper cables like Ethernet)",[39,1295,1296,1299],{},[20,1297,1298],{},"Glass or plastic fibres"," (fibre optic cables — fast and long-range)",[39,1301,1302,1305],{},[20,1303,1304],{},"Wireless transmission"," (radio waves — Wi-Fi, Bluetooth, cellular)",[11,1307,1309],{"id":1308},"network-representations-and-topologies","Network Representations and Topologies",[16,1311,1312,1313,1316],{},"When networks get large, we need diagrams to make sense of them. These ",[20,1314,1315],{},"topology diagrams"," come in two flavours:",[89,1318,1319,1325],{},[39,1320,1321,1324],{},[20,1322,1323],{},"Physical topology"," — shows where devices are physically located, which ports are in use, and how cables are actually installed.",[39,1326,1327,1330],{},[20,1328,1329],{},"Logical topology"," — shows how devices are logically connected, including their IP addresses and port assignments.",[16,1332,1333],{},"Both views are essential. The physical topology helps you troubleshoot hardware, while the logical topology helps you understand how data flows.",[11,1335,1337],{"id":1336},"types-of-networks","Types of Networks",[16,1339,1340],{},"Networks come in every size:",[691,1342,1343,1354],{},[694,1344,1345],{},[697,1346,1347,1351],{},[700,1348,1350],{"align":1349},"left","Scale",[700,1352,1353],{"align":1349},"Description",[708,1355,1356,1366,1377,1387],{},[697,1357,1358,1363],{},[713,1359,1360],{"align":1349},[20,1361,1362],{},"Home network",[713,1364,1365],{"align":1349},"A few devices sharing printers, files, and music.",[697,1367,1368,1374],{},[713,1369,1370,1373],{"align":1349},[20,1371,1372],{},"SOHO"," (Small Office \u002F Home Office)",[713,1375,1376],{"align":1349},"Supports remote work — advertising, ordering supplies, communicating with clients.",[697,1378,1379,1384],{},[713,1380,1381],{"align":1349},[20,1382,1383],{},"Medium to large",[713,1385,1386],{"align":1349},"Corporate or campus networks with hundreds to thousands of hosts across multiple locations.",[697,1388,1389,1394],{},[713,1390,1391],{"align":1349},[20,1392,1393],{},"The Internet",[713,1395,1396,1397,1400],{"align":1349},"A network ",[52,1398,1399],{},"of"," networks, connecting hundreds of millions of computers worldwide.",[73,1402,1404],{"id":1403},"lan-vs-wan","LAN vs. WAN",[16,1406,1407],{},"The two most fundamental network types are:",[16,1409,1410,1413],{},[20,1411,1412],{},"Local Area Network (LAN)"," — covers a small geographical area like a home, school, or office building. Usually managed by a single person or organisation, and offers high-speed connections to devices within that area.",[16,1415,1416,1419],{},[20,1417,1418],{},"Wide Area Network (WAN)"," — spans large geographical areas, connecting LANs across cities, countries, or even continents. Typically managed by multiple service providers, and the links between LANs tend to be slower than what you'd get inside a LAN.",[73,1421,1423],{"id":1422},"internet-intranet-and-extranet","Internet, Intranet, and Extranet",[16,1425,1426],{},"These three terms often confuse beginners, so here's a simple breakdown:",[89,1428,1429,1435,1445],{},[39,1430,1431,1434],{},[20,1432,1433],{},"Internet"," — the global, public collection of interconnected networks using common standards.",[39,1436,1437,1440,1441,1444],{},[20,1438,1439],{},"Intranet"," — a ",[52,1442,1443],{},"private"," network of LANs and WANs belonging to an organisation, accessible only to its members.",[39,1446,1447,1450],{},[20,1448,1449],{},"Extranet"," — like an intranet, but with controlled access granted to specific external users (e.g. suppliers or partner hospitals).",[11,1452,1454],{"id":1453},"internet-connection-types","Internet Connection Types",[73,1456,1458],{"id":1457},"for-homes-and-small-offices","For Homes and Small Offices",[691,1460,1461,1471],{},[694,1462,1463],{},[697,1464,1465,1468],{},[700,1466,1467],{"align":1349},"Type",[700,1469,1470],{"align":1349},"How it Works",[708,1472,1473,1483,1493,1503,1513],{},[697,1474,1475,1480],{},[713,1476,1477],{"align":1349},[20,1478,1479],{},"Cable",[713,1481,1482],{"align":1349},"Shares the same cable as cable TV. High bandwidth, always-on.",[697,1484,1485,1490],{},[713,1486,1487],{"align":1349},[20,1488,1489],{},"DSL (Digital Subscriber Line)",[713,1491,1492],{"align":1349},"Runs over copper telephone lines, with a much higher frequency than human voice. Home users typically use ADSL (faster download than upload).",[697,1494,1495,1500],{},[713,1496,1497],{"align":1349},[20,1498,1499],{},"Cellular",[713,1501,1502],{"align":1349},"Connects via cell towers (3G \u002F 4G \u002F 5G). Great for mobile access.",[697,1504,1505,1510],{},[713,1506,1507],{"align":1349},[20,1508,1509],{},"Satellite",[713,1511,1512],{"align":1349},"Useful in remote areas, but needs a clear line of sight to the satellite.",[697,1514,1515,1520],{},[713,1516,1517],{"align":1349},[20,1518,1519],{},"Dial-up",[713,1521,1522],{"align":1349},"Uses a phone line and modem. Very slow — mostly a relic, but still exists in some areas.",[73,1524,1526],{"id":1525},"for-businesses","For Businesses",[16,1528,1529],{},"Businesses often need faster, more reliable, and dedicated connections:",[89,1531,1532,1538,1544],{},[39,1533,1534,1537],{},[20,1535,1536],{},"Dedicated Leased Lines"," — reserved circuits rented monthly or yearly for private data\u002Fvoice networking. It guarantees 100% of the bandwidth all the time.",[39,1539,1540,1543],{},[20,1541,1542],{},"Metro Ethernet"," — Metro Ethernet takes that incredibly fast, highly reliable local network technology and stretches it across an entire city. Metro Ethernet allows a company to connect their downtown office to their suburban warehouse.",[39,1545,1546,1549],{},[20,1547,1548],{},"Business DSL (SDSL)"," — symmetric speeds (equal upload and download), unlike consumer ADSL.",[16,1551,1552,1553,1556],{},"A key modern trend is ",[20,1554,1555],{},"converged networks"," — carrying voice, video, and data all on a single network infrastructure.",[1251,1558,1560,1563,1570],{"className":1559},[1244,1245],[16,1561,1562],{},"A note: In modern days, this (converged networks) is just standard behaviour. The note is talking about historical shift in how networks are built.",[16,1564,1565,1566,1569],{},"Imagine an office building in the 1990s. The IT and facilities teams literally had to run ",[20,1567,1568],{},"three completely separate sets of cables"," through the walls.",[36,1571,1572,1575,1578],{},[39,1573,1574],{},"Copper telephone wires to every desk just for phone calls.",[39,1576,1577],{},"Coaxial cables to conference rooms and lobbies just for video\u002Ftelevision.",[39,1579,1580,1581,1584,1586,1587,1589,1591],{},"Ethernet cables to the computers just for data and internet access.",[1582,1583],"br",{},[1582,1585],{},"Eventually, engineers realised that a voice call and a video stream could just be chopped up into digital 1s and 0s, exactly like an email or a webpage.",[1582,1588],{},[1582,1590],{},"Once voice and video became digital data, businesses could rip out the old phone lines and TV cables. Now, they just run one single, robust Ethernet\u002FWi-Fi network. That single infrastructure carries the data, the video (like Zoom), and the voice (VoIP—Voice over Internet Protocol).",[11,1593,1595],{"id":1594},"what-makes-a-network-reliable","What Makes a Network \"Reliable\"?",[16,1597,1598],{},"Good network architecture addresses four fundamental characteristics:",[73,1600,1602],{"id":1601},"fault-tolerance","Fault Tolerance",[16,1604,1605,1606,1609],{},"A fault-tolerant network limits the damage when something breaks. The key idea is ",[20,1607,1608],{},"redundancy"," — having multiple paths between source and destination so that if one path fails, traffic is instantly rerouted through another.",[73,1611,1613],{"id":1612},"scalability","Scalability",[16,1615,1616],{},"A scalable network can grow — adding new users, devices, and services — without degrading performance for existing users. Following accepted standards and protocols is what makes this possible.",[73,1618,1620],{"id":1619},"quality-of-service-qos","Quality of Service (QoS)",[16,1622,1623,1624,1627],{},"When voice, video, and data all share the same network, congestion can happen. QoS is the mechanism that manages this by ",[20,1625,1626],{},"prioritising"," traffic. For example, a router with QoS can give voice calls priority over a large file download, so your call doesn't break up.",[73,1629,1631],{"id":1630},"security","Security",[16,1633,1634,1635,514],{},"Network security protects both the infrastructure itself and the data flowing through it. It rests on three pillars, sometimes called the ",[20,1636,1637],{},"CIA triad",[36,1639,1640,1646,1652],{},[39,1641,1642,1645],{},[20,1643,1644],{},"Confidentiality"," — only authorised recipients can access the data.",[39,1647,1648,1651],{},[20,1649,1650],{},"Integrity"," — data hasn't been tampered with during transmission.",[39,1653,1654,1657],{},[20,1655,1656],{},"Availability"," — authorised users can access services when they need to.",[11,1659,1661],{"id":1660},"network-trends-to-watch","Network Trends to Watch",[16,1663,1664],{},"A few trends shaping today's networks:",[89,1666,1667,1673,1679,1685,1691],{},[39,1668,1669,1672],{},[20,1670,1671],{},"BYOD (Bring Your Own Device)"," — people use their personal devices on business and campus networks. Convenient, but raises security questions.",[39,1674,1675,1678],{},[20,1676,1677],{},"Online Collaboration"," — tools for real-time messaging, video, and file sharing (think Webex, Teams, Slack, etc.).",[39,1680,1681,1684],{},[20,1682,1683],{},"Cloud Computing"," — storing data and running applications on remote servers. Comes in four flavours: public, private, hybrid, and community clouds.",[39,1686,1687,1690],{},[20,1688,1689],{},"Smart Home Technology"," — everyday appliances connecting to the network and becoming automated.",[39,1692,1693,1696],{},[20,1694,1695],{},"Powerline Networking"," — using existing electrical wiring to carry network data, eliminating the need for extra cables.",[11,1698,1700],{"id":1699},"network-security-threats","Network Security Threats",[16,1702,1703],{},"Finally, let's talk about the bad stuff. Common external threats include:",[89,1705,1706,1712,1718,1724,1730,1736],{},[39,1707,1708,1711],{},[20,1709,1710],{},"Malware"," (viruses, worms, Trojans) — malicious code running on your device.",[39,1713,1714,1717],{},[20,1715,1716],{},"Spyware and adware"," — secretly installed software that collects your information.",[39,1719,1720,1723],{},[20,1721,1722],{},"Zero-day attacks"," — exploits that target vulnerabilities on the very day they're discovered, before patches exist.",[39,1725,1726,1729],{},[20,1727,1728],{},"Denial of Service (DoS)"," — attacks that overwhelm and crash network services.",[39,1731,1732,1735],{},[20,1733,1734],{},"Data interception and theft"," — capturing private information as it travels across the network.",[39,1737,1738,1741],{},[20,1739,1740],{},"Identity theft"," — stealing login credentials to access private data.",[73,1743,1745],{"id":1744},"how-do-we-defend-against-these","How Do We Defend Against These?",[16,1747,1748,1749,1752],{},"For home and small office networks, the basics are antivirus\u002Fantispyware software and ",[20,1750,1751],{},"firewall filtering"," to block unauthorised access.",[16,1754,1755,1756,1759,1760,1763,1764,1767],{},"Larger corporate networks add more layers: dedicated firewall systems, ",[20,1757,1758],{},"Access Control Lists (ACLs)"," for fine-grained traffic filtering, ",[20,1761,1762],{},"Intrusion Prevention Systems (IPS)"," to catch fast-spreading threats, and ",[20,1765,1766],{},"VPNs"," to give remote workers secure access.",[11,1769,790],{"id":789},[16,1771,1772],{},"This chapter covered the foundations: what networks are made of, how they're classified, how we connect to the internet, what makes a network reliable, and how we keep it secure. These concepts form the bedrock for everything else in networking.",[16,1774,1775],{},"In the next chapter, we'll dive deeper into how data actually moves across these networks. Stay tuned!",{"title":812,"searchDepth":813,"depth":813,"links":1777},[1778,1779,1780,1785,1786,1790,1794,1800,1801,1804],{"id":1139,"depth":813,"text":1140},{"id":1156,"depth":813,"text":1157},{"id":1197,"depth":813,"text":1198,"children":1781},[1782,1783,1784],{"id":1204,"depth":819,"text":1205},{"id":1211,"depth":819,"text":1212},{"id":1281,"depth":819,"text":1282},{"id":1308,"depth":813,"text":1309},{"id":1336,"depth":813,"text":1337,"children":1787},[1788,1789],{"id":1403,"depth":819,"text":1404},{"id":1422,"depth":819,"text":1423},{"id":1453,"depth":813,"text":1454,"children":1791},[1792,1793],{"id":1457,"depth":819,"text":1458},{"id":1525,"depth":819,"text":1526},{"id":1594,"depth":813,"text":1595,"children":1795},[1796,1797,1798,1799],{"id":1601,"depth":819,"text":1602},{"id":1612,"depth":819,"text":1613},{"id":1619,"depth":819,"text":1620},{"id":1630,"depth":819,"text":1631},{"id":1660,"depth":813,"text":1661},{"id":1699,"depth":813,"text":1700,"children":1802},[1803],{"id":1744,"depth":819,"text":1745},{"id":789,"depth":813,"text":790},"2026-04-09",{},"\u002Fblog\u002FNetwork-Communication,-Chapter-1",{"title":1134,"description":812},{"loc":1807},"blog\u002FNetwork-Communication,-Chapter-1","l3F_jXiYWxb4PBPJWmLT1pfypnofft-NBZFZG8f0U9w",{"id":1813,"title":1814,"author":6,"body":1815,"date":1805,"description":812,"draft":850,"edited_at":2834,"extension":851,"featured_image":852,"meta":2835,"navigation":854,"path":2836,"pinned":850,"seo":2837,"series":852,"seriesOrder":852,"sitemap":2838,"stem":2839,"tags":852,"__hash__":2840},"blog\u002Fblog\u002FNetwork-Communication,-Chapter-2.md","Network Communication, Chapter 2",{"type":8,"value":1816,"toc":2809},[1817,1821,1824,1831,1834,1860,1864,1867,1922,1926,1936,1943,1947,1954,1958,1965,1969,1972,1976,1983,2000,2003,2007,2017,2099,2106,2166,2170,2177,2203,2311,2315,2322,2333,2339,2511,2515,2518,2528,2531,2558,2562,2565,2637,2640,2644,2647,2697,2700,2704,2707,2711,2720,2724,2727,2760,2762,2766],[11,1818,1820],{"id":1819},"why-do-we-need-rules-for-communication","Why Do We Need \"Rules\" for Communication?",[16,1822,1823],{},"Think about a regular face-to-face conversation. Even without realising it, you follow a bunch of unspoken rules — you wait for your turn to speak, you use a language both sides understand, and you expect some kind of acknowledgment that the other person heard you. Networking is exactly the same.",[16,1825,1826,1827,1830],{},"In networking, these rules are called ",[20,1828,1829],{},"protocols",". Every time a message travels from a source to a destination — whether it's an email, a video call, or a simple ping — protocols govern how that happens.",[16,1832,1833],{},"For any communication to work, you need at least these things in place:",[89,1835,1836,1842,1848,1854],{},[39,1837,1838,1841],{},[20,1839,1840],{},"An identified sender and receiver"," — both ends need to be known.",[39,1843,1844,1847],{},[20,1845,1846],{},"A common language and grammar"," — otherwise the message is just noise.",[39,1849,1850,1853],{},[20,1851,1852],{},"Speed and timing of delivery"," — both sides need to agree on pacing.",[39,1855,1856,1859],{},[20,1857,1858],{},"Confirmation or acknowledgment"," — how do you know the message arrived?",[73,1861,1863],{"id":1862},"common-computer-protocol-concepts","Common Computer Protocol Concepts",[16,1865,1866],{},"Protocols in computer networks handle several key jobs:",[89,1868,1869,1875,1881,1887,1916],{},[39,1870,1871,1874],{},[20,1872,1873],{},"Message encoding"," — Converting information into a transmittable format (and decoding it on the other end). Think of it like translating your thoughts into words before speaking.",[39,1876,1877,1880],{},[20,1878,1879],{},"Message formatting and encapsulation"," — Structuring the message so the receiver knows how to read it, much like writing a letter with a proper header, body, and signature.",[39,1882,1883,1886],{},[20,1884,1885],{},"Message size"," — Just like you wouldn't dump an entire essay on someone in one breath, networks break messages into manageable chunks.",[39,1888,1889,1892,1893],{},[20,1890,1891],{},"Message timing"," — This covers three things:",[89,1894,1895,1900,1906],{},[39,1896,1897,1899],{},[20,1898,747],{},": How much data can be sent, and how fast.",[39,1901,1902,1905],{},[20,1903,1904],{},"Response timeout",": How long to wait for a reply before assuming something went wrong.",[39,1907,1908,1911,1912,1915],{},[20,1909,1910],{},"Access method",": Deciding ",[52,1913,1914],{},"when"," a device is allowed to send — you can't have everyone shouting at once.",[39,1917,1918,1921],{},[20,1919,1920],{},"Message delivery options"," — Sometimes you send to one person (unicast), sometimes to a group (multicast), and sometimes to everyone nearby (broadcast).",[11,1923,1925],{"id":1924},"network-protocols-the-common-language-of-devices","Network Protocols: The Common Language of Devices",[16,1927,1928,1929,1932,1933,415],{},"A single message sent over a network usually involves ",[20,1930,1931],{},"multiple protocols"," working together, each handling a different part of the job. A group of these inter-related protocols is called a ",[20,1934,1935],{},"protocol suite",[16,1937,1938,1939,1942],{},"The most important protocol suite you'll encounter is ",[20,1940,1941],{},"TCP\u002FIP"," — it's the backbone of the Internet. TCP\u002FIP is implemented in software, hardware, or both on every device that connects to a network.",[73,1944,1946],{"id":1945},"the-layered-model","The Layered Model",[16,1948,1949,1950,1953],{},"To make sense of how all these protocols interact, we use a ",[20,1951,1952],{},"layered model",". The TCP\u002FIP model organises protocols into layers, where each layer has a specific role and communicates with the layers directly above and below it. This separation makes it easier to design, troubleshoot, and update networks — you can swap out a protocol at one layer without breaking everything else.",[73,1955,1957],{"id":1956},"who-makes-the-rules","Who Makes the Rules?",[16,1959,1960,1961,1964],{},"Network standards are developed by ",[20,1962,1963],{},"standards organisations"," — vendor-neutral, non-profit bodies whose job is to promote open standards so that devices from different manufacturers can all work together. You'll hear names like IEEE, IETF, and ICANN come up often in networking.",[11,1966,1968],{"id":1967},"data-encapsulation-wrapping-your-data-for-delivery","Data Encapsulation: Wrapping Your Data for Delivery",[16,1970,1971],{},"Imagine you want to send a huge video file across the Internet. Sending it as one giant uninterrupted stream would hog the entire communication channel and create massive delays for everyone else. That's clearly not practical.",[73,1973,1975],{"id":1974},"segmentation-and-multiplexing","Segmentation and Multiplexing",[16,1977,1978,1979,1982],{},"The solution is ",[20,1980,1981],{},"segmentation"," — breaking the data into smaller, more manageable pieces before sending. This has two big benefits:",[36,1984,1985,1990],{},[39,1986,1987,1989],{},[20,1988,725],{}," — If one small piece gets lost, you only resend that piece, not the entire file.",[39,1991,1992,1995,1996,1999],{},[20,1993,1994],{},"Multiplexing"," — Smaller pieces from ",[52,1997,1998],{},"different"," conversations can be interleaved on the same network, so multiple users can share the same link simultaneously.",[16,2001,2002],{},"Each segment goes through the same process to make sure it reaches the right destination and can be reassembled into the original message.",[73,2004,2006],{"id":2005},"the-encapsulation-process","The Encapsulation Process",[16,2008,2009,2010,2013,2014,514],{},"As data travels down through the protocol layers, each layer adds its own header (and sometimes trailer) information. This is the ",[20,2011,2012],{},"encapsulation process",". At each layer, the data takes on a different form, called a ",[20,2015,2016],{},"Protocol Data Unit (PDU)",[691,2018,2019,2032],{},[694,2020,2021],{},[697,2022,2023,2026,2029],{},[700,2024,2025],{"align":1349},"Layer",[700,2027,2028],{"align":1349},"PDU Name",[700,2030,2031],{"align":1349},"What It Represents",[708,2033,2034,2047,2060,2073,2086],{},[697,2035,2036,2039,2044],{},[713,2037,2038],{"align":1349},"Application",[713,2040,2041],{"align":1349},[20,2042,2043],{},"Data",[713,2045,2046],{"align":1349},"The raw information from the app",[697,2048,2049,2052,2057],{},[713,2050,2051],{"align":1349},"Transport",[713,2053,2054],{"align":1349},[20,2055,2056],{},"Segment",[713,2058,2059],{"align":1349},"Data + port info for process-to-process delivery",[697,2061,2062,2065,2070],{},[713,2063,2064],{"align":1349},"Internet (Network)",[713,2066,2067],{"align":1349},[20,2068,2069],{},"Packet",[713,2071,2072],{"align":1349},"Segment + IP addresses for host-to-host delivery",[697,2074,2075,2078,2083],{},[713,2076,2077],{"align":1349},"Network Access (Data Link)",[713,2079,2080],{"align":1349},[20,2081,2082],{},"Frame",[713,2084,2085],{"align":1349},"Packet + MAC addresses for hop-to-hop delivery",[697,2087,2088,2091,2096],{},[713,2089,2090],{"align":1349},"Physical",[713,2092,2093],{"align":1349},[20,2094,2095],{},"Bits",[713,2097,2098],{"align":1349},"The actual 1s and 0s on the wire",[16,2100,2101,2102,2105],{},"When the data arrives at the destination, the reverse happens — ",[20,2103,2104],{},"de-encapsulation",". Each layer strips off its header, passing the remaining data up to the next layer until the application gets the original message.",[1241,2107,2109,2112],{"className":2108},[1244,1245],[1247,2110,2111],{},"The Encapsulation Process (Packing the Box)",[1251,2113,2115],{"className":2114},[1254],[89,2116,2117,2123,2133,2147,2160],{},[39,2118,2119,2122],{},[20,2120,2121],{},"Application Layer (Data):"," This is the actual birthday card and the gift you want to send. It is the raw information you care about.",[39,2124,2125,2128,2129,2132],{},[20,2126,2127],{},"Transport Layer (Segment):"," You take the gift and put it in a small inner envelope. You write *\"To John, from Jane\"*on it. In networking, this layer adds the ",[20,2130,2131],{},"port number",", which makes sure the data goes to the exact right application (John) and not someone else in the house. Because the data might be too big, this layer will also chop it up into manageable pieces (segments).",[39,2134,2135,2138,2139,2142,2143,2146],{},[20,2136,2137],{},"Internet Layer (Packet):"," You put that inner envelope inside a standard cardboard shipping box. On the outside, you write the final destination address: ",[52,2140,2141],{},"\"123 Main St, New York, NY.\""," In networking, this layer adds the ",[20,2144,2145],{},"IP Address",", ensuring the box can navigate the global internet to find the correct final building (host-to-host delivery).",[39,2148,2149,2152,2153,2142,2156,2159],{},[20,2150,2151],{},"Network Access Layer (Frame):"," The post office takes your box and loads it into a specific local delivery truck. They stick a temporary barcode on the outside of the box that just says, ",[52,2154,2155],{},"\"Take this to the airport depot.\"",[20,2157,2158],{},"MAC Address",". It doesn't care about the final destination in New York; it only cares about successfully moving the box to the very next local stop (hop-to-hop delivery).",[39,2161,2162,2165],{},[20,2163,2164],{},"Physical Layer (Bits):"," The truck physically drives down the road. In networking, this is the actual physical electricity pulsing over copper wires, or light flashing down a fiber optic cable, represented as 1s and 0s.",[11,2167,2169],{"id":2168},"data-access-two-kinds-of-addresses","Data Access: Two Kinds of Addresses",[16,2171,2172,2173,2176],{},"Getting data from point A to point B actually involves ",[20,2174,2175],{},"two different addressing systems"," working at different layers:",[89,2178,2179,2193],{},[39,2180,2181,2184,2185,2188,2189,2192],{},[20,2182,2183],{},"Network layer (IP) addresses"," — These are responsible for delivering the packet from the ",[52,2186,2187],{},"original source"," to the ",[52,2190,2191],{},"final destination",", even across different networks. Think of this as the mailing address on an envelope.",[39,2194,2195,2198,2199,2202],{},[20,2196,2197],{},"Data link layer (MAC) addresses"," — These handle delivery between one network interface card (NIC) and the next, on the ",[52,2200,2201],{},"same local network",". Think of this as the \"hand it to the next person in the chain\" step.",[1241,2204,2206,2209],{"className":2205},[1244,1245],[1247,2207,2208],{},"MAC address vs IP address",[1251,2210,2212,2218,2224,2228,2231,2235,2240,2251,2258,2261,2270,2282,2288],{"className":2211},[1254],[16,2213,2214,2217],{},[20,2215,2216],{},"MAC Address = Who you are"," (Like your DNA). It is permanently burned into your device at the factory.",[16,2219,2220,2223],{},[20,2221,2222],{},"IP Address = Where you are"," (Like your street address). It changes depending on where you connect. If you take your laptop from your house to a coffee shop, your MAC address stays exactly the same, but your IP address changes because you are on a new network.",[73,2225,2227],{"id":2226},"the-ip-ban-vpns-the-network-layer","The IP Ban & VPNs (The Network Layer)",[16,2229,2230],{},"When a remote website or game server bans your IP address, they are blocking your \"street address.\" You turn on a VPN. A VPN acts as a middleman. You send your data to the VPN server, and the VPN server forwards it to the website. The website only sees the VPN's \"street address\" (IP address), not yours. Because your IP is hidden, you bypass the ban.",[73,2232,2234],{"id":2233},"the-mac-ban-the-data-link-layer","The MAC Ban (The Data Link Layer)",[16,2236,2237],{},[20,2238,2239],{},"MAC addresses never leave your local network.",[16,2241,2242,2243,2246,2247,2250],{},"When your computer sends a packet of data to a server in another country, it hands the packet to your home router. Your router literally ",[20,2244,2245],{},"strips off your computer's MAC address",", throws it in the trash, and slaps on the ",[52,2248,2249],{},"router's own MAC address"," before sending it to the next stop. This happens at every single \"hop\" across the internet.",[16,2252,2253,2254,2257],{},"Because of this, ",[20,2255,2256],{},"a remote website cannot ban your MAC address over the internet because they literally cannot see it."," Only your local router can see your MAC address.",[16,2259,2260],{},"So, how do MAC bans actually work, and are they circumventable?",[16,2262,2263,2266,2267,2269],{},[20,2264,2265],{},"1. Local Network MAC Bans (The Wi-Fi Ban)"," If you misbehave at school or work, the IT admin can tell the local Wi-Fi router, \"Do not let the MAC address belonging to John's phone connect.\" Since the router is on the ",[52,2268,2201],{}," as your phone, it sees your MAC address and blocks you.",[89,2271,2272],{},[39,2273,2274,2277,2278,2281],{},[20,2275,2276],{},"Is it circumventable? YES."," Even though the MAC address is burned into your hardware, you can use a software trick called ",[20,2279,2280],{},"MAC Spoofing",". You simply tell your phone or computer's operating system to wear a \"mask\" and broadcast a fake, randomly generated MAC address. The router sees the new fake MAC, doesn't recognize it as banned, and lets you right back on. (In fact, modern iOS and Android phones do this automatically for privacy now!).",[16,2283,2284,2287],{},[20,2285,2286],{},"2. Hardware Bans (The Anti-Cheat Ban)"," If websites can't see your MAC address over the internet, how do game developers \"hardware ban\" cheaters?",[89,2289,2290,2305],{},[39,2291,2292,2293,2296,2297,2300,2301,2304],{},"They don't do it over the internet; they do it locally. Games like ",[52,2294,2295],{},"Valorant"," or ",[52,2298,2299],{},"Call of Duty"," make you install aggressive Anti-Cheat software. That software runs ",[52,2302,2303],{},"locally"," on your actual physical machine, reads your motherboard's MAC address (and serial numbers of your CPU and hard drive), and sends a list of those numbers to the game server.",[39,2306,2307,2310],{},[20,2308,2309],{},"Is it circumventable? YES, but it's much harder."," Because the anti-cheat is looking deeply at multiple pieces of hardware, simple MAC spoofing usually isn't enough. People use complex \"hardware spoofers\" to trick the anti-cheat, but it is a constant game of cat-and-mouse.",[73,2312,2314],{"id":2313},"same-network-vs-different-network","Same Network vs. Different Network",[16,2316,2317,2318,2321],{},"When sender and receiver are on the ",[20,2319,2320],{},"same network",", the frame goes directly to the destination device using its MAC address.",[16,2323,2324,2325,2328,2329,2332],{},"When they're on ",[20,2326,2327],{},"different networks",", things get more interesting. The IP addresses still point to the original source and final destination, but the frame is first sent to the ",[20,2330,2331],{},"router (default gateway)",". The router then re-wraps (re-encapsulates) the data in a new frame destined for the next hop, and so on, until the packet reaches the destination network.",[16,2334,2335,2336],{},"This is a fundamental concept: ",[20,2337,2338],{},"IP addresses stay the same end-to-end, but MAC addresses change at every hop.",[1251,2340,2342,2353,2367,2380,2386,2403,2425,2437,2463,2466,2475,2480,2486,2495,2501],{"className":2341},[1244,1245],[16,2343,2344,2345,2348,2349,2352],{},"Let's say, you want to connect to Google (",[191,2346,2347],{},"8.8.8.8",") from your computer (",[191,2350,2351],{},"192.168.0.15","). So, it builds an IP Packet (the cardboard shipping box).",[89,2354,2355,2361],{},[39,2356,2357,2360],{},[20,2358,2359],{},"Source IP:"," 192.168.0.15 (You)",[39,2362,2363,2366],{},[20,2364,2365],{},"Destination IP:"," 8.8.8.8 (Google)",[16,2368,2369,2370,2373,2374,2376,2377],{},"This box is now sealed. These IP addresses ",[20,2371,2372],{},"will not change"," for the entire journey. Your computer looks at Google's IP address (",[191,2375,2347],{},") and realizes, ",[52,2378,2379],{},"\"Google is not on my local Wi-Fi network. I need to hand this box to the router so it can leave the house.\"",[16,2381,2382,2383,2385],{},"To get the box to the router, your computer encapsulates the Packet inside a ",[20,2384,2082],{}," (the local delivery truck). It puts local MAC address labels on the outside of this truck:",[89,2387,2388,2394],{},[39,2389,2390,2393],{},[20,2391,2392],{},"Source MAC:"," Your Computer's MAC Address",[39,2395,2396,2399,2400],{},[20,2397,2398],{},"Destination MAC:"," Your Router's MAC Address ",[52,2401,2402],{},"(Notice it does NOT use Google's MAC address!)",[16,2404,2405,2406,2409,2410,2412,2413,2416,2417,2420,2421,2424],{},"Your computer sends this Frame over the Wi-Fi or Ethernet cable. Because the Destination MAC belongs to your router, the router says, ",[52,2407,2408],{},"\"Hey, this truck is for me!\""," and catches it. The router \"opens\" the Frame (it unloads the delivery truck). It looks at the inner IP Packet (the cardboard box) and sees the Destination IP is ",[191,2411,2347],{}," (Google). The router says, ",[52,2414,2415],{},"\"Okay, I need to send this to the internet provider next.\""," The router ",[20,2418,2419],{},"throws away your original Frame"," (the local truck is done with its job). The router builds a ",[20,2422,2423],{},"brand new Frame"," (a new truck) to drive the packet to the next stop (your ISP). The new Frame has:",[89,2426,2427,2432],{},[39,2428,2429,2431],{},[20,2430,2392],{}," Your Router's MAC Address",[39,2433,2434,2436],{},[20,2435,2398],{}," The ISP Router's MAC Address",[16,2438,2439,2440,2442,2443,2446,2447,2450,2451,2454,2455,2458,2459,2462],{},"It hides your local IP address (",[191,2441,2351],{},"), and replaces your local IP with your house's ",[20,2444,2445],{},"Public IP Address"," (the single address your ISP assigned to your modem, say ",[191,2448,2449],{},"203.0.113.5","). To remember that ",[52,2452,2453],{},"your specific computer"," made this request, the router assigns a random, unique ",[20,2456,2457],{},"Port Number"," (let's say ",[191,2460,2461],{},"#5001",") to the packet. The router then writes this in its NAT Table ledger:",[16,2464,2465],{},"    \"If any mail comes back from Google addressed to Port #5001, give it to the computer at 192.168.0.15.\"",[16,2467,2468,2469,2471,2472,2474],{},"Google receives the request. As far as Google is concerned, the request came from ",[191,2470,2449],{}," on Port ",[191,2473,2461],{},". Google has no idea your specific computer exists, nor does it know your MAC address.",[16,2476,2477,2478,415],{},"Google packages up the webpage and sends it back to your house's Public IP, specifically tagging it for Port ",[191,2479,2461],{},[16,2481,2482,2483],{},"The webpage arrives at your router. The router looks at the package and says, ",[52,2484,2485],{},"\"Okay, this is from Google, and it's tagged for Port #5001.\"",[16,2487,2488,2489,2491,2492],{},"It opens up its NAT Table ledger, finds the entry for ",[191,2490,2461],{},", and sees the note it left for itself: ",[52,2493,2494],{},"\"Ah! Port #5001 means this belongs to 192.168.0.15.\"",[16,2496,2497,2498,2500],{},"Now that the router knows the internal IP address (",[191,2499,2351],{},") that the data belongs to, it needs to hand the data across the house to your computer.",[16,2502,2503,2504,2506,2507,2510],{},"The router looks up your computer's IP address in its local directory to find your ",[20,2505,2158],{},". It packages Google's webpage into a brand new ",[20,2508,2509],{},"Local Frame",", slaps your computer's MAC address on the destination label, and pushes it out over the Wi-Fi. Your computer sees its MAC address, catches the frame, and loads the webpage!",[11,2512,2514],{"id":2513},"network-operating-systems","Network Operating Systems",[16,2516,2517],{},"Now that we know how data travels across networks, how do we actually control the devices—like routers and switches—that are directing all this traffic? To do that, we need to look at the software running on the hardware.",[16,2519,2520,2521,2524,2525,415],{},"Routers, switches, and other infrastructure devices don't run Windows or macOS — they run specialised ",[20,2522,2523],{},"network operating systems",". On Cisco devices, this is the ",[20,2526,2527],{},"Cisco IOS (Internetwork Operating System)",[16,2529,2530],{},"A few key points about how IOS works:",[89,2532,2533,2540,2547],{},[39,2534,2535,2536,2539],{},"The IOS file is stored in ",[20,2537,2538],{},"flash memory"," (non-volatile, survives reboots).",[39,2541,2542,2543,2546],{},"On boot, the IOS is copied from flash into ",[20,2544,2545],{},"RAM",", where it runs while the device is operating.",[39,2548,2549,2550,2553,2554,2557],{},"Like any OS, it has a ",[20,2551,2552],{},"kernel"," (talks to hardware) and a ",[20,2555,2556],{},"shell"," (the interface you interact with), which can be a CLI or GUI.",[73,2559,2561],{"id":2560},"ways-to-access-the-cli","Ways to Access the CLI",[16,2563,2564],{},"There are several ways to get into a device's command-line interface:",[691,2566,2567,2579],{},[694,2568,2569],{},[697,2570,2571,2574,2576],{},[700,2572,2573],{"align":1349},"Method",[700,2575,1467],{"align":1349},[700,2577,2578],{"align":1349},"Notes",[708,2580,2581,2594,2606,2622],{},[697,2582,2583,2588,2591],{},[713,2584,2585],{"align":1349},[20,2586,2587],{},"Console",[713,2589,2590],{"align":1349},"Out-of-band",[713,2592,2593],{"align":1349},"Physical cable to the console port. Used for initial setup and maintenance. Works even if the network is down.",[697,2595,2596,2601,2603],{},[713,2597,2598],{"align":1349},[20,2599,2600],{},"AUX",[713,2602,2590],{"align":1349},[713,2604,2605],{"align":1349},"Older method using a modem and phone line. Also doesn't require network services.",[697,2607,2608,2612,2615],{},[713,2609,2610],{"align":1349},[20,2611,604],{},[713,2613,2614],{"align":1349},"In-band",[713,2616,2617,2618,2621],{"align":1349},"Remote access over the network via a virtual interface. Requires the network to be up. ",[20,2619,2620],{},"Not secure","— data is sent in plain text.",[697,2623,2624,2629,2631],{},[713,2625,2626],{"align":1349},[20,2627,2628],{},"SSH",[713,2630,2614],{"align":1349},[713,2632,2633,2634],{"align":1349},"Like Telnet, but with encryption and stronger authentication. ",[20,2635,2636],{},"Always prefer SSH over Telnet.",[16,2638,2639],{},"Common terminal emulator programs include PuTTY, Tera Term, SecureCRT, and the macOS Terminal.",[73,2641,2643],{"id":2642},"cli-modes","CLI Modes",[16,2645,2646],{},"The Cisco IOS CLI is organised in a hierarchy of modes, each with different levels of access:",[36,2648,2649,2659,2671,2683],{},[39,2650,2651,2654,2655,2658],{},[20,2652,2653],{},"User EXEC mode"," (",[191,2656,2657],{},">",") — Limited monitoring commands. You land here by default.",[39,2660,2661,2654,2664,2667,2668,415],{},[20,2662,2663],{},"Privileged EXEC mode",[191,2665,2666],{},"#",") — Full access to monitoring and management commands. Enter with ",[191,2669,2670],{},"enable",[39,2672,2673,2654,2676,2679,2680,415],{},[20,2674,2675],{},"Global configuration mode",[191,2677,2678],{},"(config)#",") — Used to make device-wide configuration changes. Enter with ",[191,2681,2682],{},"configure terminal",[39,2684,2685,2688,2689,2692,2693,2696],{},[20,2686,2687],{},"Specific configuration modes"," — Sub-modes like interface configuration (",[191,2690,2691],{},"(config-if)#",") or line configuration (",[191,2694,2695],{},"(config-line)#",") for configuring specific components.",[2698,2699],"hr",{},[11,2701,2703],{"id":2702},"basic-commands-securing-your-device","Basic Commands: Securing Your Device",[16,2705,2706],{},"Once you're in the CLI, some of the first things you'll want to do are give your device a name and lock it down with passwords.",[73,2708,2710],{"id":2709},"setting-a-hostname","Setting a Hostname",[16,2712,2713,2714,2717,2718,415],{},"Hostnames help you identify devices on the network. A descriptive hostname (like ",[191,2715,2716],{},"HQ-Router-1",") is much more useful than the default ",[191,2719,1267],{},[73,2721,2723],{"id":2722},"passwords-you-should-know","Passwords You Should Know",[16,2725,2726],{},"Passwords are the first line of defence against unauthorised access:",[89,2728,2729,2735,2748,2754],{},[39,2730,2731,2734],{},[20,2732,2733],{},"Enable password"," — Restricts access to privileged EXEC mode (stored in plain text — avoid using this alone).",[39,2736,2737,2740,2741,2744,2745,415],{},[20,2738,2739],{},"Enable secret"," — Same purpose as above, but the password is ",[20,2742,2743],{},"encrypted",". Always use this instead of ",[191,2746,2747],{},"enable password",[39,2749,2750,2753],{},[20,2751,2752],{},"Console password"," — Protects the physical console port.",[39,2755,2756,2759],{},[20,2757,2758],{},"VTY password"," — Protects remote access via Telnet\u002FSSH.",[2698,2761],{},[11,2763,2765],{"id":2764},"key-takeaways","Key Takeaways",[89,2767,2768,2771,2777,2785,2795,2802],{},[39,2769,2770],{},"Protocols are the rules that govern all network communication — from encoding to timing to delivery.",[39,2772,298,2773,2776],{},[20,2774,2775],{},"TCP\u002FIP model"," organises protocols into layers, each with a distinct job.",[39,2778,2779,2781,2782,2784],{},[20,2780,49],{}," wraps data with headers at each layer; ",[20,2783,2104],{}," unwraps them at the destination.",[39,2786,2787,2790,2791,2794],{},[20,2788,2789],{},"IP addresses"," handle end-to-end delivery; ",[20,2792,2793],{},"MAC addresses"," handle hop-by-hop delivery.",[39,2796,2797,2798,2801],{},"Network devices run specialised operating systems like ",[20,2799,2800],{},"Cisco IOS",", accessed through console, Telnet, or SSH.",[39,2803,2804,2805,2808],{},"Always ",[20,2806,2807],{},"secure your devices"," with hostnames, encrypted passwords, and SSH access.",{"title":812,"searchDepth":813,"depth":813,"links":2810},[2811,2814,2818,2822,2825,2829,2833],{"id":1819,"depth":813,"text":1820,"children":2812},[2813],{"id":1862,"depth":819,"text":1863},{"id":1924,"depth":813,"text":1925,"children":2815},[2816,2817],{"id":1945,"depth":819,"text":1946},{"id":1956,"depth":819,"text":1957},{"id":1967,"depth":813,"text":1968,"children":2819},[2820,2821],{"id":1974,"depth":819,"text":1975},{"id":2005,"depth":819,"text":2006},{"id":2168,"depth":813,"text":2169,"children":2823},[2824],{"id":2313,"depth":819,"text":2314},{"id":2513,"depth":813,"text":2514,"children":2826},[2827,2828],{"id":2560,"depth":819,"text":2561},{"id":2642,"depth":819,"text":2643},{"id":2702,"depth":813,"text":2703,"children":2830},[2831,2832],{"id":2709,"depth":819,"text":2710},{"id":2722,"depth":819,"text":2723},{"id":2764,"depth":813,"text":2765},"2026-04-10",{},"\u002Fblog\u002FNetwork-Communication,-Chapter-2",{"title":1814,"description":812},{"loc":2836},"blog\u002FNetwork-Communication,-Chapter-2","jWA4nQQOxUiioSIb7c07mb7ZfBAcj5wPPZjFfWkOXeQ",{"id":2842,"title":2843,"author":6,"body":2844,"date":849,"description":812,"draft":850,"edited_at":849,"extension":851,"featured_image":852,"meta":3723,"navigation":854,"path":3724,"pinned":850,"seo":3725,"series":852,"seriesOrder":852,"sitemap":3726,"stem":3727,"tags":852,"__hash__":3728},"blog\u002Fblog\u002FNetwork-Communication,-Chapter-3.md","Network Communication, Chapter 3",{"type":8,"value":2845,"toc":3687},[2846,2850,2861,2868,2888,2892,2895,2901,2911,2939,2951,2955,2958,2992,2998,3005,3009,3012,3016,3019,3025,3031,3037,3041,3044,3075,3079,3082,3108,3111,3193,3196,3216,3220,3223,3242,3246,3252,3266,3270,3273,3279,3285,3289,3292,3312,3316,3319,3333,3337,3343,3349,3353,3360,3366,3376,3380,3383,3393,3397,3408,3411,3434,3444,3448,3455,3474,3481,3485,3488,3492,3503,3507,3510,3527,3531,3534,3538,3551,3555,3590,3594,3604,3611,3615,3626,3630,3633,3639,3653,3655,3658,3684],[11,2847,2849],{"id":2848},"the-physical-layer-where-bits-meet-the-real-world","The Physical Layer — Where Bits Meet the Real World",[16,2851,2852,2853,2856,2857,2860],{},"Everything on a network ultimately boils down to ",[20,2854,2855],{},"bits"," — 1s and 0s. But bits are abstract; they need to be physically represented somehow in order to travel from one machine to another. That's the job of the ",[20,2858,2859],{},"physical layer"," (Layer 1 in the OSI model).",[16,2862,2863,2864,2867],{},"The physical layer takes a complete frame from the data link layer above it and converts it into ",[20,2865,2866],{},"signals"," that can be sent over the actual transmission medium. What those signals look like depends entirely on the medium:",[89,2869,2870,2876,2882],{},[39,2871,2872,2875],{},[20,2873,2874],{},"Copper cable"," → patterns of electrical pulses",[39,2877,2878,2881],{},[20,2879,2880],{},"Fiber-optic cable"," → patterns of light",[39,2883,2884,2887],{},[20,2885,2886],{},"Wireless"," → patterns of microwave\u002Fradio transmissions",[73,2889,2891],{"id":2890},"three-functional-areas","Three Functional Areas",[16,2893,2894],{},"The physical layer standards cover three key areas:",[16,2896,2897,2900],{},[20,2898,2899],{},"1. Physical Components"," — This is all the tangible hardware: NICs (network interface cards), connectors, cables, and their specifications. Think of the RJ-45 jack you plug an Ethernet cable into — that's a physical layer component.",[16,2902,2903,2906,2907,2910],{},[20,2904,2905],{},"2. Encoding"," — Before bits are sent as signals, they're first ",[52,2908,2909],{},"encoded",". Encoding converts raw data bits into a predefined code — a pattern that both the sender and receiver agree on. This helps with things like identifying where a frame begins and ends. Two common encoding schemes are:",[89,2912,2913,2927],{},[39,2914,2915,2918,2919,2922,2923,2926],{},[20,2916,2917],{},"Manchester Encoding",": A ",[191,2920,2921],{},"0"," is represented by a high-to-low voltage transition, and a ",[191,2924,2925],{},"1"," by a low-to-high transition. The beauty of this scheme is that there's always a transition in the middle of each bit period, which helps the receiver stay synchronized.",[39,2928,2929,2932,2933,2935,2936,2938],{},[20,2930,2931],{},"Non-Return to Zero (NRZ)",": Simpler — one voltage level means ",[191,2934,2921],{},", another means ",[191,2937,2925],{},". No guaranteed transition in every bit period, which can cause synchronization issues over long runs.",[16,2940,2941,2944,2945,2947,2948,2950],{},[20,2942,2943],{},"3. Signaling"," — This defines how the encoded bits are physically represented. For example, a long pulse might represent a ",[191,2946,2925],{}," and a short pulse a ",[191,2949,2921],{},". The standard must be agreed upon so both ends interpret the signals the same way.",[73,2952,2954],{"id":2953},"bandwidth-throughput-and-goodput","Bandwidth, Throughput, and Goodput",[16,2956,2957],{},"These three terms are related but distinct, and confusing them is a classic beginner mistake:",[89,2959,2960,2974,2983],{},[39,2961,2962,2965,2966,2969,2970,2973],{},[20,2963,2964],{},"Bandwidth"," is the ",[52,2967,2968],{},"theoretical maximum"," capacity of a medium — how much data it ",[52,2971,2972],{},"could"," carry. Measured in kbps, Mbps, or Gbps.",[39,2975,2976,2965,2979,2982],{},[20,2977,2978],{},"Throughput",[52,2980,2981],{},"actual"," rate of data transfer over a period of time. It's always affected by real-world factors: traffic volume, type of traffic, network congestion, and the number of devices the data passes through.",[39,2984,2985,2965,2988,2991],{},[20,2986,2987],{},"Goodput",[52,2989,2990],{},"usable"," data transferred — throughput minus all the overhead (session setup, acknowledgments, retransmissions, encapsulation headers). This is what you actually care about as an end user.",[16,2993,2994,2995,415],{},"The relationship is always: ",[20,2996,2997],{},"Goodput ≤ Throughput ≤ Bandwidth",[16,2999,3000,3001,3004],{},"And then there's ",[20,3002,3003],{},"latency"," — the total time (including delays) for data to travel from point A to point B. Low latency matters a lot for real-time applications like video calls or online gaming.",[11,3006,3008],{"id":3007},"network-media-copper-fiber-and-wireless","Network Media — Copper, Fiber, and Wireless",[16,3010,3011],{},"Now that we know the physical layer's job, let's look at the actual media that carry our signals.",[73,3013,3015],{"id":3014},"copper-cabling","Copper Cabling",[16,3017,3018],{},"Copper is the workhorse of networking — cheap, easy to install, and widely available. The trade-off is that it's limited in distance and susceptible to electromagnetic interference (EMI). There are three main types:",[16,3020,3021,3024],{},[20,3022,3023],{},"Unshielded Twisted-Pair (UTP)"," is by far the most common. It uses pairs of wires twisted together (the twisting helps cancel out interference) and terminates with the familiar RJ-45 connector. You've almost certainly used a UTP cable before.",[16,3026,3027,3030],{},[20,3028,3029],{},"Shielded Twisted-Pair (STP)"," adds metallic shielding around the wire pairs for better noise protection. The downside? It's more expensive and harder to install. It also uses RJ-45 connectors.",[16,3032,3033,3036],{},[20,3034,3035],{},"Coaxial cable"," has a single copper conductor at its center, surrounded by insulation and a braided shield. It's used to carry radio frequency (RF) energy for things like cable internet and connecting antennas to wireless devices.",[73,3038,3040],{"id":3039},"cable-wiring-conventions","Cable Wiring Conventions",[16,3042,3043],{},"Not all Ethernet cables are wired the same way:",[89,3045,3046,3055,3069],{},[39,3047,3048,3051,3052,3054],{},[20,3049,3050],{},"Straight-through cable",": The most common. Used to connect ",[52,3053,1998],{}," types of devices — e.g., a host to a switch, or a switch to a router.",[39,3056,3057,3060,3061,3064,3065,3068],{},[20,3058,3059],{},"Crossover cable",": Used to connect ",[52,3062,3063],{},"similar"," devices — switch to switch, host to host, router to router. Less common today because most modern devices support ",[20,3066,3067],{},"Auto-MDIX",", which automatically detects and adjusts for the cable type.",[39,3070,3071,3074],{},[20,3072,3073],{},"Rollover cable",": A Cisco proprietary cable used specifically for connecting to a router or switch's console port for management.",[73,3076,3078],{"id":3077},"fiber-optic-cabling","Fiber-Optic Cabling",[16,3080,3081],{},"Fiber uses pulses of light instead of electrical signals, which gives it some major advantages: much longer distances, higher bandwidth, and immunity to electromagnetic interference. It's used across several domains:",[89,3083,3084,3090,3096,3102],{},[39,3085,3086,3089],{},[20,3087,3088],{},"Enterprise networks"," for high-speed backbones",[39,3091,3092,3095],{},[20,3093,3094],{},"FTTH (Fiber-to-the-Home)"," for residential broadband",[39,3097,3098,3101],{},[20,3099,3100],{},"Long-haul networks"," spanning hundreds or thousands of kilometers",[39,3103,3104,3107],{},[20,3105,3106],{},"Submarine networks"," for transoceanic links — specially engineered cables that survive harsh undersea conditions",[16,3109,3110],{},"There are two main types of fiber:",[691,3112,3113,3127],{},[694,3114,3115],{},[697,3116,3117,3121,3124],{},[700,3118,3119],{"align":1349},[1582,3120],{},[700,3122,3123],{"align":1349},"Single-Mode Fiber (SMF)",[700,3125,3126],{"align":1349},"Multimode Fiber (MMF)",[708,3128,3129,3142,3155,3168,3181],{},[697,3130,3131,3136,3139],{},[713,3132,3133],{"align":1349},[20,3134,3135],{},"Core size",[713,3137,3138],{"align":1349},"Very small",[713,3140,3141],{"align":1349},"Larger",[697,3143,3144,3149,3152],{},[713,3145,3146],{"align":1349},[20,3147,3148],{},"Light source",[713,3150,3151],{"align":1349},"Laser (expensive)",[713,3153,3154],{"align":1349},"LED (cheaper)",[697,3156,3157,3162,3165],{},[713,3158,3159],{"align":1349},[20,3160,3161],{},"Distance",[713,3163,3164],{"align":1349},"Hundreds of km",[713,3166,3167],{"align":1349},"Up to ~550 m",[697,3169,3170,3175,3178],{},[713,3171,3172],{"align":1349},[20,3173,3174],{},"Use case",[713,3176,3177],{"align":1349},"Long-haul, telephony, cable TV",[713,3179,3180],{"align":1349},"LANs, short-distance links",[697,3182,3183,3187,3190],{},[713,3184,3185],{"align":1349},[20,3186,2964],{},[713,3188,3189],{"align":1349},"Very high",[713,3191,3192],{"align":1349},"Up to 10 Gbps",[16,3194,3195],{},"Common fiber connectors include:",[89,3197,3198,3204,3210],{},[39,3199,3200,3203],{},[20,3201,3202],{},"ST (Straight-Tip)",": Older bayonet-style, commonly used with multimode fiber.",[39,3205,3206,3209],{},[20,3207,3208],{},"SC (Subscriber Connector)",": Push-pull mechanism, used with both single-mode and multimode.",[39,3211,3212,3215],{},[20,3213,3214],{},"LC (Lucent Connector)",": Smaller form factor, growing in popularity, supports both fiber types.",[73,3217,3219],{"id":3218},"wireless-media","Wireless Media",[16,3221,3222],{},"Wireless transmits data using radio or microwave frequencies. It offers mobility and convenience, but comes with its own set of challenges:",[89,3224,3225,3231,3237],{},[39,3226,3227,3230],{},[20,3228,3229],{},"Coverage",": Building materials and terrain can limit signal range significantly.",[39,3232,3233,3236],{},[20,3234,3235],{},"Interference",": Everyday devices — cordless phones, microwaves, fluorescent lights — can disrupt wireless signals.",[39,3238,3239,3241],{},[20,3240,1631],{},": Because the signal travels through the air, wireless networks require careful security management to prevent unauthorized access.",[11,3243,3245],{"id":3244},"the-data-link-layer-framing-the-conversation","The Data Link Layer — Framing the Conversation",[16,3247,298,3248,3251],{},[20,3249,3250],{},"data link layer"," (Layer 2) sits right above the physical layer. Its main jobs are:",[36,3253,3254,3260,3263],{},[39,3255,3256,3257],{},"Taking Layer 3 (network layer) packets and packaging them into ",[20,3258,3259],{},"frames",[39,3261,3262],{},"Controlling how devices access the physical media",[39,3264,3265],{},"Performing error detection",[73,3267,3269],{"id":3268},"two-sublayers","Two Sublayers",[16,3271,3272],{},"The data link layer is divided into two sublayers:",[16,3274,3275,3278],{},[20,3276,3277],{},"Logical Link Control (LLC)"," — the upper sublayer. It provides services to the network layer protocols above, essentially acting as the interface between Layer 2 and Layer 3.",[16,3280,3281,3284],{},[20,3282,3283],{},"Media Access Control (MAC)"," — the lower sublayer. This is where the rubber meets the road: it handles addressing (MAC addresses), defines how data is delimited, and manages the actual access to the physical medium. The MAC sublayer's behavior varies depending on the type of network — and a single communication might cross multiple network types as it travels from source to destination.",[73,3286,3288],{"id":3287},"anatomy-of-a-frame","Anatomy of a Frame",[16,3290,3291],{},"A data link layer frame has three parts:",[89,3293,3294,3300,3306],{},[39,3295,3296,3299],{},[20,3297,3298],{},"Header",": Control information like source and destination addresses. Located at the beginning.",[39,3301,3302,3305],{},[20,3303,3304],{},"Data (Payload)",": The encapsulated content — includes the IP header, transport layer header, and application data.",[39,3307,3308,3311],{},[20,3309,3310],{},"Trailer",": Error detection information (like a CRC checksum), appended at the end.",[11,3313,3315],{"id":3314},"media-access-control-who-gets-to-talk","Media Access Control — Who Gets to Talk?",[16,3317,3318],{},"When multiple devices share the same medium, there needs to be a system that determines who gets to transmit and when. The method used depends on two factors:",[89,3320,3321,3327],{},[39,3322,3323,3326],{},[20,3324,3325],{},"Topology",": How the connections between nodes appear to the data link layer.",[39,3328,3329,3332],{},[20,3330,3331],{},"Media sharing",": How nodes share the medium.",[73,3334,3336],{"id":3335},"two-approaches","Two Approaches",[16,3338,3339,3342],{},[20,3340,3341],{},"Contention-based access"," — All nodes compete for access to the medium. Think of it like a group conversation where anyone can start talking, but everyone has an agreed-upon plan for when two people accidentally speak at the same time. The downside is that it doesn't scale well — as more nodes are added, collisions become more frequent.",[16,3344,3345,3348],{},[20,3346,3347],{},"Controlled access"," — Each node is given a designated time slot to use the medium. More orderly, but adds overhead.",[73,3350,3352],{"id":3351},"csma-variants","CSMA Variants",[16,3354,3355,3356,3359],{},"Contention-based networks typically use ",[20,3357,3358],{},"CSMA (Carrier Sense Multiple Access)"," — devices \"listen\" to the medium before transmitting. There are two important variants:",[16,3361,3362,3365],{},[20,3363,3364],{},"CSMA\u002FCD (Collision Detection)"," — Used in wired Ethernet. A device checks if the medium is free, then transmits. If it detects that another device transmitted at the same time (a collision), all transmitting devices stop, wait a random amount of time, and try again.",[16,3367,3368,3371,3372,3375],{},[20,3369,3370],{},"CSMA\u002FCA (Collision Avoidance)"," — Used in wireless networks. Since wireless devices can't easily detect collisions while transmitting, they take a preventive approach: before sending data, a device first sends a notification of its ",[52,3373,3374],{},"intent"," to transmit. Only after receiving clearance does it actually send the data.",[11,3377,3379],{"id":3378},"ethernet-the-king-of-lans","Ethernet — The King of LANs",[16,3381,3382],{},"Ethernet is the most widely used LAN technology in the world. Defined by the IEEE 802.2 and 802.3 standards, it operates across both the data link layer and the physical layer.",[16,3384,3385,3386,3389,3390,415],{},"Ethernet supports an impressive range of speeds: 10 Mbps, 100 Mbps, 1 Gbps, 10 Gbps, 40 Gbps, and 100 Gbps. The minimum frame size is ",[20,3387,3388],{},"64 bytes"," and the maximum is ",[20,3391,3392],{},"1518 bytes",[73,3394,3396],{"id":3395},"mac-addresses","MAC Addresses",[16,3398,3399,3400,3403,3404,3407],{},"Every device on an Ethernet network needs a unique identifier — this is the ",[20,3401,3402],{},"MAC address",". It's a 48-bit value, typically written as 12 hexadecimal digits (e.g., ",[191,3405,3406],{},"00:1A:2B:3C:4D:5E",").",[16,3409,3410],{},"MAC addresses are used for three types of communication:",[89,3412,3413,3419,3428],{},[39,3414,3415,3418],{},[20,3416,3417],{},"Unicast",": One-to-one. A frame sent to a single specific device.",[39,3420,3421,3424,3425,3407],{},[20,3422,3423],{},"Broadcast",": One-to-all. A frame sent to every device on the local network (destination MAC: ",[191,3426,3427],{},"FF:FF:FF:FF:FF:FF",[39,3429,3430,3433],{},[20,3431,3432],{},"Multicast",": One-to-many. A frame sent to a group of devices that have subscribed to receive it.",[3435,3436,3437],"blockquote",{},[16,3438,3439,3440,3443],{},"On Windows, you can check your MAC address by running ",[191,3441,3442],{},"ipconfig \u002Fall"," in the command prompt.",[73,3445,3447],{"id":3446},"how-a-switch-uses-mac-addresses","How a Switch Uses MAC Addresses",[16,3449,3450,3451,3454],{},"An Ethernet switch maintains a ",[20,3452,3453],{},"MAC address table"," that maps MAC addresses to its physical ports. When a frame arrives:",[36,3456,3457,3467],{},[39,3458,3459,3460,3463,3464,415],{},"The switch reads the ",[20,3461,3462],{},"source MAC address"," and records which port it came from — this is how the table is ",[52,3465,3466],{},"dynamically built",[39,3468,3469,3470,3473],{},"The switch then looks up the ",[20,3471,3472],{},"destination MAC address"," in its table to decide which port to forward the frame to.",[16,3475,3476,3477,3480],{},"If the destination MAC isn't in the table yet, the switch ",[52,3478,3479],{},"floods"," the frame out all ports (except the one it arrived on) — essentially asking, \"Who has this address?\"",[11,3482,3484],{"id":3483},"switching-making-smart-forwarding-decisions","Switching — Making Smart Forwarding Decisions",[16,3486,3487],{},"Switches can use different methods to forward frames, each with its own trade-off between speed and reliability:",[73,3489,3491],{"id":3490},"store-and-forward-switching","Store-and-Forward Switching",[16,3493,3494,3495,3498,3499,3502],{},"The switch waits until it has received the ",[20,3496,3497],{},"entire frame",", stores it in a buffer, and performs an error check using a ",[20,3500,3501],{},"CRC (Cyclic Redundancy Check)",". Only if the frame passes the check is it forwarded. This is the most reliable method but adds a small delay.",[73,3504,3506],{"id":3505},"cut-through-switching","Cut-Through Switching",[16,3508,3509],{},"The switch starts forwarding the frame as soon as it reads the destination address — before the entire frame has arrived. This is faster, but it forwards corrupted frames too since there's no error check. There are two variants:",[89,3511,3512,3518],{},[39,3513,3514,3517],{},[20,3515,3516],{},"Fast-forward switching",": Forwards immediately after reading the destination address. Lowest latency, but no error checking at all.",[39,3519,3520,3523,3524,3526],{},[20,3521,3522],{},"Fragment-free switching",": Waits for the first ",[20,3525,3388],{}," before forwarding. Why 64 bytes? Because most collision-related errors occur within the first 64 bytes of a frame, so this catches the majority of bad frames while still being faster than store-and-forward.",[73,3528,3530],{"id":3529},"frame-buffering","Frame Buffering",[16,3532,3533],{},"Switches also use buffering to handle congestion. If the destination port is busy, the switch stores the frame temporarily until the port is available. This prevents frame loss during traffic spikes.",[11,3535,3537],{"id":3536},"arp-translating-addresses","ARP — Translating Addresses",[16,3539,3540,3541,3543,3544,3546,3547,3550],{},"Here's a fundamental problem in networking: the network layer uses ",[20,3542,2789],{}," to identify devices, but the data link layer uses ",[20,3545,2793],{},". When a device wants to send data to another device on the same local network, it knows the destination's IP address but needs the MAC address to build a frame. This is where ",[20,3548,3549],{},"ARP (Address Resolution Protocol)"," comes in.",[73,3552,3554],{"id":3553},"how-arp-works","How ARP Works",[36,3556,3557,3564,3567,3580,3587],{},[39,3558,3559,3560,3563],{},"The sender checks its ",[20,3561,3562],{},"ARP table"," (a local cache of IP-to-MAC mappings).",[39,3565,3566],{},"If a mapping exists → great, use it to build the frame.",[39,3568,3569,3570,3573,3574,3576,3577],{},"If no mapping exists → the sender broadcasts an ",[20,3571,3572],{},"ARP request"," to the entire local network (destination MAC: ",[191,3575,3427],{},"), essentially asking: ",[52,3578,3579],{},"\"Who has this IP address? Tell me your MAC address.\"",[39,3581,3582,3583,3586],{},"The device with the matching IP address responds with an ",[20,3584,3585],{},"ARP reply"," containing its MAC address.",[39,3588,3589],{},"The sender stores this mapping in its ARP table for future use.",[73,3591,3593],{"id":3592},"what-about-remote-networks","What About Remote Networks?",[16,3595,3596,3597,3600,3601,3603],{},"If the destination IP address is on a ",[20,3598,3599],{},"different network",", the device doesn't ARP for the destination directly. Instead, it looks up the MAC address of its ",[20,3602,240],{}," (the router) in the ARP table. The frame is sent to the router, which then handles forwarding it to the correct network.",[16,3605,3606,3607,3610],{},"If no device responds to an ARP request, the packet is simply ",[20,3608,3609],{},"dropped"," — because without a MAC address, a frame simply cannot be constructed.",[73,3612,3614],{"id":3613},"arp-table-management","ARP Table Management",[16,3616,3617,3618,3621,3622,3625],{},"ARP entries don't last forever. Each entry has a ",[20,3619,3620],{},"cache timer"," — on Windows, entries typically expire after ",[20,3623,3624],{},"15 to 45 seconds"," if unused. This keeps the table fresh and prevents stale mappings.",[73,3627,3629],{"id":3628},"arp-security-concerns","ARP Security Concerns",[16,3631,3632],{},"ARP has two notable issues:",[16,3634,3635,3638],{},[20,3636,3637],{},"1. Overhead",": Since ARP requests are broadcasts, every device on the local network must process them. If many devices start ARP-ing at the same time (e.g., during a network boot storm), it can cause a temporary performance dip.",[16,3640,3641,3644,3645,3648,3649,3652],{},[20,3642,3643],{},"2. ARP Spoofing \u002F Poisoning",": Because ARP has no built-in authentication, a malicious actor can send fake ARP replies, claiming that ",[52,3646,3647],{},"their"," MAC address maps to another device's IP (like the default gateway). Victims then unknowingly send traffic to the attacker instead — a classic ",[20,3650,3651],{},"man-in-the-middle attack",". This is why techniques like Dynamic ARP Inspection (DAI) and static ARP entries exist as countermeasures.",[11,3654,790],{"id":789},[16,3656,3657],{},"In this chapter, we traced the journey of data from the abstract world of bits down to the physical signals on a wire (or through the air), and back up through the framing and addressing mechanisms that make local network communication possible. Here's a quick mental model:",[89,3659,3660,3666,3672,3678],{},[39,3661,3662,3665],{},[20,3663,3664],{},"Physical Layer",": Converts bits into signals (electrical, light, or radio) and defines the hardware.",[39,3667,3668,3671],{},[20,3669,3670],{},"Data Link Layer",": Packages data into frames, handles MAC addressing, and manages media access.",[39,3673,3674,3677],{},[20,3675,3676],{},"Ethernet",": The dominant LAN technology, using MAC addresses and switches to deliver frames.",[39,3679,3680,3683],{},[20,3681,3682],{},"ARP",": The bridge between IP addresses (Layer 3) and MAC addresses (Layer 2).",[16,3685,3686],{},"Understanding these layers is essential because every higher-level protocol — HTTP, DNS, SSH, you name it — ultimately relies on these mechanisms to move data across the wire. Getting comfortable with these fundamentals will make everything else in networking click.",{"title":812,"searchDepth":813,"depth":813,"links":3688},[3689,3693,3699,3703,3707,3711,3716,3722],{"id":2848,"depth":813,"text":2849,"children":3690},[3691,3692],{"id":2890,"depth":819,"text":2891},{"id":2953,"depth":819,"text":2954},{"id":3007,"depth":813,"text":3008,"children":3694},[3695,3696,3697,3698],{"id":3014,"depth":819,"text":3015},{"id":3039,"depth":819,"text":3040},{"id":3077,"depth":819,"text":3078},{"id":3218,"depth":819,"text":3219},{"id":3244,"depth":813,"text":3245,"children":3700},[3701,3702],{"id":3268,"depth":819,"text":3269},{"id":3287,"depth":819,"text":3288},{"id":3314,"depth":813,"text":3315,"children":3704},[3705,3706],{"id":3335,"depth":819,"text":3336},{"id":3351,"depth":819,"text":3352},{"id":3378,"depth":813,"text":3379,"children":3708},[3709,3710],{"id":3395,"depth":819,"text":3396},{"id":3446,"depth":819,"text":3447},{"id":3483,"depth":813,"text":3484,"children":3712},[3713,3714,3715],{"id":3490,"depth":819,"text":3491},{"id":3505,"depth":819,"text":3506},{"id":3529,"depth":819,"text":3530},{"id":3536,"depth":813,"text":3537,"children":3717},[3718,3719,3720,3721],{"id":3553,"depth":819,"text":3554},{"id":3592,"depth":819,"text":3593},{"id":3613,"depth":819,"text":3614},{"id":3628,"depth":819,"text":3629},{"id":789,"depth":813,"text":790},{},"\u002Fblog\u002FNetwork-Communication,-Chapter-3",{"title":2843,"description":812},{"loc":3724},"blog\u002FNetwork-Communication,-Chapter-3","gr1GFYazsMCBdTT60is6FrOwstIl_U-hIcdTFh0B0gw",{"id":4,"title":5,"author":6,"body":3730,"date":849,"description":812,"draft":850,"edited_at":849,"extension":851,"featured_image":852,"meta":4275,"navigation":854,"path":855,"pinned":850,"seo":4276,"series":852,"seriesOrder":852,"sitemap":4277,"stem":858,"tags":852,"__hash__":859},{"type":8,"value":3731,"toc":4240},[3732,3734,3740,3742,3744,3766,3768,3774,3788,3790,3792,3806,3808,3810,3828,3830,3832,3834,3836,3854,3856,3860,3870,3874,3876,3880,3894,3896,3898,3902,3906,3908,3912,3914,3932,3934,3938,3948,3954,3960,3962,3966,3968,3982,3988,3990,3994,4006,4008,4010,4012,4014,4034,4038,4040,4044,4058,4060,4062,4068,4070,4072,4074,4076,4080,4082,4084,4102,4104,4106,4108,4126,4128,4134,4136,4154,4156,4226,4228,4236,4238],[11,3733,14],{"id":13},[16,3735,18,3736,23,3738,27],{},[20,3737,22],{},[20,3739,26],{},[11,3741,31],{"id":30},[16,3743,34],{},[36,3745,3746,3750,3756,3762],{},[39,3747,3748,44],{},[20,3749,43],{},[39,3751,3752,50,3754,55],{},[20,3753,49],{},[52,3755,54],{},[39,3757,3758,61,3760,65],{},[20,3759,60],{},[52,3761,64],{},[39,3763,3764,71],{},[20,3765,70],{},[73,3767,76],{"id":75},[16,3769,79,3770,83,3772,87],{},[20,3771,82],{},[20,3773,86],{},[89,3775,3776,3780,3784],{},[39,3777,3778,96],{},[20,3779,95],{},[39,3781,3782,102],{},[20,3783,101],{},[39,3785,3786,108],{},[20,3787,107],{},[73,3789,112],{"id":111},[16,3791,115],{},[89,3793,3794,3798,3802],{},[39,3795,3796,123],{},[20,3797,122],{},[39,3799,3800,129],{},[20,3801,128],{},[39,3803,3804,135],{},[20,3805,134],{},[73,3807,139],{"id":138},[16,3809,142],{},[89,3811,3812,3816,3820,3824],{},[39,3813,3814,150],{},[20,3815,149],{},[39,3817,3818,156],{},[20,3819,155],{},[39,3821,3822,162],{},[20,3823,161],{},[39,3825,3826,168],{},[20,3827,167],{},[11,3829,60],{"id":171},[16,3831,174],{},[73,3833,178],{"id":177},[16,3835,181],{},[89,3837,3838,3846,3850],{},[39,3839,3840,189,3842,194,3844,198],{},[20,3841,188],{},[191,3843,193],{},[191,3845,197],{},[39,3847,3848,204],{},[20,3849,203],{},[39,3851,3852,210],{},[20,3853,209],{},[73,3855,214],{"id":213},[16,3857,217,3858],{},[52,3859,220],{},[89,3861,3862,3866],{},[39,3863,3864,228],{},[20,3865,227],{},[39,3867,3868,234],{},[20,3869,233],{},[16,3871,237,3872,241],{},[20,3873,240],{},[73,3875,245],{"id":244},[16,3877,248,3878,252],{},[20,3879,251],{},[89,3881,3882,3886,3890],{},[39,3883,3884,260],{},[20,3885,259],{},[39,3887,3888,266],{},[20,3889,265],{},[39,3891,3892,272],{},[20,3893,271],{},[73,3895,276],{"id":275},[16,3897,279],{},[16,3899,3900,285],{},[20,3901,284],{},[16,3903,3904,291],{},[20,3905,290],{},[11,3907,295],{"id":294},[16,3909,298,3910,302],{},[20,3911,301],{},[73,3913,306],{"id":305},[89,3915,3916,3922,3926],{},[39,3917,3918,314,3920,318],{},[20,3919,313],{},[191,3921,317],{},[39,3923,3924,324],{},[20,3925,323],{},[39,3927,3928,330,3930,334],{},[20,3929,329],{},[20,3931,333],{},[73,3933,338],{"id":337},[16,3935,3936,344],{},[20,3937,343],{},[36,3939,3940,3944,3946],{},[39,3941,349,3942,352],{},[191,3943,193],{},[39,3945,355],{},[39,3947,358],{},[16,3949,3950,364,3952,368],{},[20,3951,363],{},[191,3953,367],{},[16,3955,371,3956,375,3958,379],{},[20,3957,374],{},[191,3959,378],{},[11,3961,383],{"id":382},[16,3963,386,3964,390],{},[52,3965,389],{},[16,3967,393],{},[89,3969,3970,3972,3978],{},[39,3971,398],{},[39,3973,3974,404,3976,408],{},[20,3975,403],{},[20,3977,407],{},[39,3979,411,3980,415],{},[20,3981,414],{},[16,3983,418,3984,83,3986,415],{},[20,3985,421],{},[20,3987,424],{},[73,3989,428],{"id":427},[16,3991,431,3992,434],{},[20,3993,414],{},[89,3995,3996,4000],{},[39,3997,3998,442],{},[20,3999,441],{},[39,4001,4002,448,4004,452],{},[20,4003,447],{},[52,4005,451],{},[16,4007,455],{},[11,4009,459],{"id":458},[16,4011,462],{},[73,4013,466],{"id":465},[89,4015,4016,4022,4026,4030],{},[39,4017,4018,474,4020,478],{},[20,4019,473],{},[52,4021,477],{},[39,4023,4024,484],{},[20,4025,483],{},[39,4027,4028,490],{},[20,4029,489],{},[39,4031,4032,496],{},[20,4033,495],{},[16,4035,499,4036,503],{},[20,4037,502],{},[73,4039,507],{"id":506},[16,4041,510,4042,514],{},[20,4043,513],{},[36,4045,4046,4050,4054],{},[39,4047,4048,522],{},[20,4049,521],{},[39,4051,4052,528],{},[20,4053,527],{},[39,4055,4056,534],{},[20,4057,533],{},[16,4059,537],{},[73,4061,541],{"id":540},[16,4063,544,4064,548,4066,552],{},[20,4065,547],{},[20,4067,551],{},[73,4069,556],{"id":555},[16,4071,559],{},[73,4073,563],{"id":562},[16,4075,566],{},[16,4077,298,4078,572],{},[20,4079,571],{},[73,4081,576],{"id":575},[16,4083,579],{},[89,4085,4086,4090,4094,4098],{},[39,4087,4088,587],{},[20,4089,586],{},[39,4091,4092,593],{},[20,4093,592],{},[39,4095,4096,599],{},[20,4097,598],{},[39,4099,4100,605],{},[20,4101,604],{},[11,4103,609],{"id":608},[16,4105,612],{},[73,4107,616],{"id":615},[89,4109,4110,4114,4118,4122],{},[39,4111,4112,623],{},[20,4113,95],{},[39,4115,4116,629],{},[20,4117,628],{},[39,4119,4120,635],{},[20,4121,634],{},[39,4123,4124,641],{},[20,4125,640],{},[73,4127,645],{"id":644},[16,4129,648,4130,652,4132,656],{},[20,4131,651],{},[20,4133,655],{},[16,4135,659],{},[89,4137,4138,4142,4146,4150],{},[39,4139,4140,667],{},[20,4141,666],{},[39,4143,4144,673],{},[20,4145,672],{},[39,4147,4148,679],{},[20,4149,678],{},[39,4151,4152,685],{},[20,4153,684],{},[11,4155,689],{"id":688},[691,4157,4158,4168],{},[694,4159,4160],{},[697,4161,4162,4164,4166],{},[700,4163,702],{},[700,4165,421],{},[700,4167,424],{},[708,4169,4170,4178,4186,4194,4202,4210,4218],{},[697,4171,4172,4174,4176],{},[713,4173,715],{},[713,4175,718],{},[713,4177,95],{},[697,4179,4180,4182,4184],{},[713,4181,725],{},[713,4183,728],{},[713,4185,731],{},[697,4187,4188,4190,4192],{},[713,4189,736],{},[713,4191,739],{},[713,4193,742],{},[697,4195,4196,4198,4200],{},[713,4197,747],{},[713,4199,750],{},[713,4201,753],{},[697,4203,4204,4206,4208],{},[713,4205,758],{},[713,4207,761],{},[713,4209,764],{},[697,4211,4212,4214,4216],{},[713,4213,769],{},[713,4215,772],{},[713,4217,775],{},[697,4219,4220,4222,4224],{},[713,4221,780],{},[713,4223,783],{},[713,4225,786],{},[11,4227,790],{"id":789},[16,4229,793,4230,797,4232,800,4234,804],{},[52,4231,796],{},[52,4233,64],{},[52,4235,803],{},[16,4237,807],{},[16,4239,810],{},{"title":812,"searchDepth":813,"depth":813,"links":4241},[4242,4243,4248,4254,4258,4261,4269,4273,4274],{"id":13,"depth":813,"text":14},{"id":30,"depth":813,"text":31,"children":4244},[4245,4246,4247],{"id":75,"depth":819,"text":76},{"id":111,"depth":819,"text":112},{"id":138,"depth":819,"text":139},{"id":171,"depth":813,"text":60,"children":4249},[4250,4251,4252,4253],{"id":177,"depth":819,"text":178},{"id":213,"depth":819,"text":214},{"id":244,"depth":819,"text":245},{"id":275,"depth":819,"text":276},{"id":294,"depth":813,"text":295,"children":4255},[4256,4257],{"id":305,"depth":819,"text":306},{"id":337,"depth":819,"text":338},{"id":382,"depth":813,"text":383,"children":4259},[4260],{"id":427,"depth":819,"text":428},{"id":458,"depth":813,"text":459,"children":4262},[4263,4264,4265,4266,4267,4268],{"id":465,"depth":819,"text":466},{"id":506,"depth":819,"text":507},{"id":540,"depth":819,"text":541},{"id":555,"depth":819,"text":556},{"id":562,"depth":819,"text":563},{"id":575,"depth":819,"text":576},{"id":608,"depth":813,"text":609,"children":4270},[4271,4272],{"id":615,"depth":819,"text":616},{"id":644,"depth":819,"text":645},{"id":688,"depth":813,"text":689},{"id":789,"depth":813,"text":790},{},{"title":5,"description":812},{"loc":855},{"id":4279,"title":4280,"author":6,"body":4281,"date":849,"description":812,"draft":850,"edited_at":849,"extension":851,"featured_image":852,"meta":5531,"navigation":854,"path":5532,"pinned":850,"seo":5533,"series":852,"seriesOrder":852,"sitemap":5534,"stem":5535,"tags":852,"__hash__":5536},"blog\u002Fblog\u002FNetwork-Communications,-Chapter-5.md","Network Communications, Chapter 5",{"type":8,"value":4282,"toc":5505},[4283,4287,4297,4311,4320,4330,4334,4345,4354,4447,4466,4470,4481,4484,4488,4491,4505,4521,4534,4538,4542,4548,4573,4577,4584,4634,4640,4647,4650,4654,4660,4666,4670,4677,4765,4778,4782,4789,4793,4797,4804,4814,4818,4831,4834,4876,4879,4883,4890,4904,4907,4911,4921,4928,4938,4958,4965,5022,5036,5040,5043,5048,5149,5154,5275,5279,5293,5317,5322,5362,5365,5369,5372,5382,5388,5405,5409,5412,5418,5432,5438,5444,5448],[11,4284,4286],{"id":4285},"what-is-ipv4","What is IPv4?",[16,4288,4289,4290,4293,4294,4296],{},"Every device on a network needs an address, just like every house on a street needs a number. In networking, that address is called an ",[20,4291,4292],{},"IP address",", and the most widely used version is ",[20,4295,82],{}," (Internet Protocol version 4).",[16,4298,4299,4300,4303,4304,4307,4308,514],{},"An IPv4 address is a ",[20,4301,4302],{},"32-bit number",", but instead of writing out all 32 ones and zeros, we break it into four groups of 8 bits (called ",[20,4305,4306],{},"octets",") and write each group as a decimal number separated by dots. This is known as ",[20,4309,4310],{},"dotted decimal notation",[4312,4313,4318],"pre",{"className":4314,"code":4316,"language":4317},[4315],"language-text","A.B.C.D\n","text",[191,4319,4316],{"__ignoreMap":812},[16,4321,4322,4323,4326,4327,415],{},"Each octet ranges from ",[20,4324,4325],{},"0 to 255",", so a typical IPv4 address looks like ",[191,4328,4329],{},"192.168.10.10",[73,4331,4333],{"id":4332},"the-two-parts-of-an-ip-address","The Two Parts of an IP Address",[16,4335,4336,4337,4340,4341,4344],{},"Here's the key idea: within those 32 bits, some of them identify ",[20,4338,4339],{},"which network"," the device belongs to, and the rest identify ",[20,4342,4343],{},"which host"," (device) it is on that network.",[16,4346,4347,4348,4350,4351,514],{},"Take the address ",[191,4349,4329],{}," with a subnet mask of ",[191,4352,4353],{},"255.255.255.0",[691,4355,4356,4376],{},[694,4357,4358],{},[697,4359,4360,4364,4367,4370,4373],{},[700,4361,4362],{},[1582,4363],{},[700,4365,4366],{},"Octet 1",[700,4368,4369],{},"Octet 2",[700,4371,4372],{},"Octet 3",[700,4374,4375],{},"Octet 4",[708,4377,4378,4396,4414,4430],{},[697,4379,4380,4385,4388,4391,4394],{},[713,4381,4382],{},[20,4383,4384],{},"IPv4 Address",[713,4386,4387],{},"192",[713,4389,4390],{},"168",[713,4392,4393],{},"10",[713,4395,4393],{},[697,4397,4398,4403,4406,4409,4412],{},[713,4399,4400],{},[20,4401,4402],{},"Binary",[713,4404,4405],{},"11000000",[713,4407,4408],{},"10101000",[713,4410,4411],{},"00001010",[713,4413,4411],{},[697,4415,4416,4421,4424,4426,4428],{},[713,4417,4418],{},[20,4419,4420],{},"Subnet Mask",[713,4422,4423],{},"255",[713,4425,4423],{},[713,4427,4423],{},[713,4429,2921],{},[697,4431,4432,4437,4440,4442,4444],{},[713,4433,4434],{},[20,4435,4436],{},"Mask in Binary",[713,4438,4439],{},"11111111",[713,4441,4439],{},[713,4443,4439],{},[713,4445,4446],{},"00000000",[16,4448,4449,4450,4453,4454,4457,4458,4461,4462,4465],{},"The 1s in the subnet mask mark the ",[20,4451,4452],{},"network portion",", and the 0s mark the ",[20,4455,4456],{},"host portion",". So in this case, ",[191,4459,4460],{},"192.168.10"," is the network, and ",[191,4463,4464],{},".10"," identifies the specific device.",[73,4467,4469],{"id":4468},"subnet-masks-and-the-anding-process","Subnet Masks and the ANDing Process",[16,4471,4472,4473,4476,4477,4480],{},"A ",[20,4474,4475],{},"subnet mask"," tells us exactly where the boundary lies between the network bits and the host bits. When you assign an IP address to a device, the subnet mask is used to determine the network address through a process called ",[20,4478,4479],{},"ANDing"," — a bitwise AND operation between the IP address and the subnet mask.",[16,4482,4483],{},"Think of it this way: ANDing is like laying the mask on top of the address and only letting through the network part.",[11,4485,4487],{"id":4486},"three-types-of-addresses-in-every-network","Three Types of Addresses in Every Network",[16,4489,4490],{},"Within any network, there are three special types of addresses you need to know:",[16,4492,4493,4496,4497,4500,4501,4504],{},[20,4494,4495],{},"Network Address"," — This is the \"name\" of the network itself. All host bits are set to 0. You can't assign this to a device; it's used to refer to the network as a whole. For example, in ",[191,4498,4499],{},"192.168.1.0\u002F24",", the ",[191,4502,4503],{},".0"," means all host bits are zero.",[16,4506,4507,4510,4511,4514,4515,4517,4518,415],{},[20,4508,4509],{},"Broadcast Address"," — This is the address used to send a message to ",[52,4512,4513],{},"every"," device on the network. All host bits are set to 1. For the network ",[191,4516,4499],{},", the broadcast address is ",[191,4519,4520],{},"192.168.1.255",[16,4522,4523,4526,4527,4530,4531,415],{},[20,4524,4525],{},"Host Addresses"," — These are all the addresses in between the network address and the broadcast address. These are the ones you actually assign to devices. In our example, the usable host range is ",[191,4528,4529],{},"192.168.1.1"," through ",[191,4532,4533],{},"192.168.1.254",[11,4535,4537],{"id":4536},"types-of-ipv4-addresses","Types of IPv4 Addresses",[73,4539,4541],{"id":4540},"unicast-multicast-and-beyond","Unicast, Multicast, and Beyond",[16,4543,4544,4547],{},[20,4545,4546],{},"Unicast addresses"," (0.0.0.0 to 223.255.255.255) are used for one-to-one communication — one sender, one receiver. This is the most common type.",[16,4549,4550,4553,4554,4557,4558,4561,4562,4565,4566,4561,4569,4572],{},[20,4551,4552],{},"Multicast addresses"," (224.0.0.0 to 239.255.255.255) are used for one-to-many communication. A device sends a single packet, and it gets delivered to a ",[52,4555,4556],{},"group"," of interested receivers. Within this range, ",[191,4559,4560],{},"224.0.0.0"," to ",[191,4563,4564],{},"224.0.0.255"," are reserved for link-local multicast, while ",[191,4567,4568],{},"224.0.1.0",[191,4570,4571],{},"238.255.255.255"," are globally scoped.",[73,4574,4576],{"id":4575},"public-vs-private-addresses","Public vs. Private Addresses",[16,4578,4579,4580,4583],{},"Not every IP address is meant to be seen on the public internet. ",[20,4581,4582],{},"Private addresses"," (defined in RFC 1918) are reserved for use within internal networks. If your device doesn't need direct internet access, it can use a private address. The three private ranges are:",[691,4585,4586,4599],{},[694,4587,4588],{},[697,4589,4590,4593,4596],{},[700,4591,4592],{},"Range",[700,4594,4595],{},"CIDR Notation",[700,4597,4598],{},"Typical Use",[708,4600,4601,4612,4623],{},[697,4602,4603,4606,4609],{},[713,4604,4605],{},"10.0.0.0 – 10.255.255.255",[713,4607,4608],{},"10.0.0.0\u002F8",[713,4610,4611],{},"Large enterprises",[697,4613,4614,4617,4620],{},[713,4615,4616],{},"172.16.0.0 – 172.31.255.255",[713,4618,4619],{},"172.16.0.0\u002F12",[713,4621,4622],{},"Medium networks",[697,4624,4625,4628,4631],{},[713,4626,4627],{},"192.168.0.0 – 192.168.255.255",[713,4629,4630],{},"192.168.0.0\u002F16",[713,4632,4633],{},"Home & small office",[16,4635,4636,4639],{},[20,4637,4638],{},"Public addresses"," are everything else in the unicast range. These are globally unique and routable on the internet — they're what web servers, cloud services, and any publicly accessible host use.",[16,4641,4642,4643,4646],{},"One critical rule: ",[20,4644,4645],{},"private addresses cannot be routed over the internet."," If a device with a private address needs to reach the internet, a router must perform Network Address Translation (NAT) to swap the private address for a public one.",[16,4648,4649],{},"In a typical network setup, devices on the intranet use private addresses, servers in the DMZ (demilitarized zone) use public addresses, and a router connects everything to the internet.",[73,4651,4653],{"id":4652},"special-addresses","Special Addresses",[16,4655,4656,4659],{},[20,4657,4658],{},"Loopback (127.0.0.1)"," — This is the \"talk to yourself\" address. When a device sends traffic to 127.0.0.1, it's sending it right back to itself. It's commonly used for testing whether the TCP\u002FIP stack on a machine is working.",[16,4661,4662,4665],{},[20,4663,4664],{},"Link-Local (169.254.0.0\u002F16)"," — If a device can't get an IP address from a DHCP server, the operating system may automatically assign it an address in this range. You've probably seen this happen when your Wi-Fi connects but \"has no internet\" — the device falls back to a link-local address.",[11,4667,4669],{"id":4668},"classful-addressing-historical-context","Classful Addressing (Historical Context)",[16,4671,4672,4673,4676],{},"In the early days of the internet, IP addresses were divided into classes. While ",[20,4674,4675],{},"classful addressing is largely obsolete today"," (replaced by CIDR), understanding it helps you make sense of older documentation and networking exams.",[691,4678,4679,4695],{},[694,4680,4681],{},[697,4682,4683,4686,4689,4692],{},[700,4684,4685],{},"Class",[700,4687,4688],{},"1st Octet Range",[700,4690,4691],{},"Network\u002FHost Split",[700,4693,4694],{},"Default Subnet Mask",[708,4696,4697,4711,4725,4738,4752],{},[697,4698,4699,4702,4705,4708],{},[713,4700,4701],{},"A",[713,4703,4704],{},"1–127",[713,4706,4707],{},"N.H.H.H",[713,4709,4710],{},"255.0.0.0",[697,4712,4713,4716,4719,4722],{},[713,4714,4715],{},"B",[713,4717,4718],{},"128–191",[713,4720,4721],{},"N.N.H.H",[713,4723,4724],{},"255.255.0.0",[697,4726,4727,4730,4733,4736],{},[713,4728,4729],{},"C",[713,4731,4732],{},"192–223",[713,4734,4735],{},"N.N.N.H",[713,4737,4353],{},[697,4739,4740,4743,4746,4749],{},[713,4741,4742],{},"D",[713,4744,4745],{},"224–239",[713,4747,4748],{},"Multicast (no mask)",[713,4750,4751],{},"—",[697,4753,4754,4757,4760,4763],{},[713,4755,4756],{},"E",[713,4758,4759],{},"240–255",[713,4761,4762],{},"Experimental",[713,4764,4751],{},[16,4766,4767,4768,4770,4771,4773,4774,4777],{},"The first few bits of the first octet determine the class: Class A starts with ",[191,4769,2921],{},", Class B with ",[191,4772,4393],{},", Class C with ",[191,4775,4776],{},"110",", and so on.",[73,4779,4781],{"id":4780},"who-manages-ip-address-assignments","Who Manages IP Address Assignments?",[16,4783,4784,4785,4788],{},"Public IP addresses are managed by five ",[20,4786,4787],{},"Regional Internet Registries (RIRs)",", each responsible for a different part of the world: ARIN (North America), RIPE NCC (Europe & Middle East), APNIC (Asia-Pacific — this covers Taiwan!), AfriNIC (Africa), and LACNIC (Latin America & Caribbean).",[11,4790,4792],{"id":4791},"subnetting-dividing-networks-into-smaller-pieces","Subnetting: Dividing Networks into Smaller Pieces",[73,4794,4796],{"id":4795},"why-subnet","Why Subnet?",[16,4798,4799,4800,4803],{},"Imagine a single network with thousands of devices. Every time any device sends a broadcast (and they do this often), ",[52,4801,4802],{},"every other device"," on the network has to process that broadcast. This creates a huge amount of unnecessary traffic, slowing everything down.",[16,4805,4806,4809,4810,4813],{},[20,4807,4808],{},"Subnetting"," is the solution. It divides one large network into smaller ",[20,4811,4812],{},"subnets",", each with its own broadcast domain. Broadcasts in one subnet don't affect devices in another. The result: less congestion, better performance, and easier management.",[73,4815,4817],{"id":4816},"how-subnets-communicate","How Subnets Communicate",[16,4819,4820,4821,4824,4825,4828,4829,415],{},"Devices on the ",[20,4822,4823],{},"same subnet"," can talk to each other directly. But to communicate across subnets, traffic must pass through a ",[20,4826,4827],{},"router",". Each device uses the router interface on its local subnet as its ",[20,4830,240],{},[16,4832,4833],{},"For example, consider a university network with a single router (R1) connected to the internet. The network is divided into four subnets:",[89,4835,4836,4846,4856,4866],{},[39,4837,4838,4841,4842,4845],{},[20,4839,4840],{},"Administration"," — LAN 1: ",[191,4843,4844],{},"10.0.1.0\u002F24"," (via interface G0\u002F0)",[39,4847,4848,4851,4852,4855],{},[20,4849,4850],{},"Students"," — LAN 2: ",[191,4853,4854],{},"10.0.2.0\u002F24"," (via interface G0\u002F1)",[39,4857,4858,4861,4862,4865],{},[20,4859,4860],{},"Human Resources"," — LAN 3: ",[191,4863,4864],{},"10.0.3.0\u002F24"," (via interface G0\u002F3)",[39,4867,4868,4871,4872,4875],{},[20,4869,4870],{},"Accounting"," — LAN 4: ",[191,4873,4874],{},"10.0.4.0\u002F24"," (via interface G0\u002F2)",[16,4877,4878],{},"Each subnet is isolated. A student's computer can't directly broadcast to an accounting workstation — traffic between them goes through R1.",[73,4880,4882],{"id":4881},"the-math-behind-subnetting","The Math Behind Subnetting",[16,4884,4885,4886,4889],{},"Subnetting works by ",[20,4887,4888],{},"borrowing bits"," from the host portion of an address and using them as additional network bits. The key formulas are:",[89,4891,4892,4898],{},[39,4893,4894,4897],{},[20,4895,4896],{},"Number of subnets"," = 2^(borrowed bits)",[39,4899,4900,4903],{},[20,4901,4902],{},"Number of usable hosts per subnet"," = 2^(remaining host bits) − 2",[16,4905,4906],{},"We subtract 2 because every subnet reserves one address for the network address and one for the broadcast address.",[73,4908,4910],{"id":4909},"worked-example-subnetting-a-24-network","Worked Example: Subnetting a \u002F24 Network",[16,4912,4913,4914,4916,4917,4920],{},"Let's subnet ",[191,4915,4499],{}," by borrowing ",[20,4918,4919],{},"2 bits"," from the host portion.",[16,4922,4923,4924,4927],{},"The original last octet in binary: ",[191,4925,4926],{},"00 | 000000"," (after borrowing 2 bits, the first 2 become subnet bits, and 6 remain as host bits).",[16,4929,4930,4931,4934,4935,4937],{},"The new subnet mask becomes ",[191,4932,4933],{},"255.255.255.192"," (or \u002F26), since those 2 extra bits in the last octet give us ",[191,4936,4405],{}," = 192.",[89,4939,4940,4949],{},[39,4941,4942,4945,4946],{},[20,4943,4944],{},"Number of subnets:"," 2² = ",[20,4947,4948],{},"4 subnets",[39,4950,4951,4954,4955],{},[20,4952,4953],{},"Hosts per subnet:"," 2⁶ = 64 total, minus 2 = ",[20,4956,4957],{},"62 usable hosts",[16,4959,4960,4961,4964],{},"For the first subnet (",[191,4962,4963],{},"192.168.1.0\u002F26","):",[691,4966,4967,4979],{},[694,4968,4969],{},[697,4970,4971,4973,4976],{},[700,4972,1467],{},[700,4974,4975],{},"Binary (last octet)",[700,4977,4978],{},"Decimal",[708,4980,4981,4991,5001,5012],{},[697,4982,4983,4985,4988],{},[713,4984,4495],{},[713,4986,4987],{},"00 000000",[713,4989,4990],{},"192.168.1.0",[697,4992,4993,4996,4999],{},[713,4994,4995],{},"First Host",[713,4997,4998],{},"00 000001",[713,5000,4529],{},[697,5002,5003,5006,5009],{},[713,5004,5005],{},"Last Host",[713,5007,5008],{},"00 111110",[713,5010,5011],{},"192.168.1.62",[697,5013,5014,5016,5019],{},[713,5015,3423],{},[713,5017,5018],{},"00 111111",[713,5020,5021],{},"192.168.1.63",[16,5023,5024,5025,5028,5029,5032,5033,415],{},"The next subnet starts at ",[191,5026,5027],{},"192.168.1.64",", then ",[191,5030,5031],{},"192.168.1.128",", and finally ",[191,5034,5035],{},"192.168.1.192",[73,5037,5039],{"id":5038},"subnetting-reference-tables","Subnetting Reference Tables",[16,5041,5042],{},"Here are quick reference tables for common subnetting scenarios.",[16,5044,5045],{},[20,5046,5047],{},"Subnetting a \u002F24 Network:",[691,5049,5050,5065],{},[694,5051,5052],{},[697,5053,5054,5057,5059,5062],{},[700,5055,5056],{},"Prefix",[700,5058,4420],{},[700,5060,5061],{},"# of Subnets",[700,5063,5064],{},"# of Usable Hosts",[708,5066,5067,5081,5094,5108,5122,5136],{},[697,5068,5069,5072,5075,5078],{},[713,5070,5071],{},"\u002F25",[713,5073,5074],{},"255.255.255.128",[713,5076,5077],{},"2",[713,5079,5080],{},"126",[697,5082,5083,5086,5088,5091],{},[713,5084,5085],{},"\u002F26",[713,5087,4933],{},[713,5089,5090],{},"4",[713,5092,5093],{},"62",[697,5095,5096,5099,5102,5105],{},[713,5097,5098],{},"\u002F27",[713,5100,5101],{},"255.255.255.224",[713,5103,5104],{},"8",[713,5106,5107],{},"30",[697,5109,5110,5113,5116,5119],{},[713,5111,5112],{},"\u002F28",[713,5114,5115],{},"255.255.255.240",[713,5117,5118],{},"16",[713,5120,5121],{},"14",[697,5123,5124,5127,5130,5133],{},[713,5125,5126],{},"\u002F29",[713,5128,5129],{},"255.255.255.248",[713,5131,5132],{},"32",[713,5134,5135],{},"6",[697,5137,5138,5141,5144,5147],{},[713,5139,5140],{},"\u002F30",[713,5142,5143],{},"255.255.255.252",[713,5145,5146],{},"64",[713,5148,5077],{},[16,5150,5151],{},[20,5152,5153],{},"Subnetting a \u002F16 Network:",[691,5155,5156,5168],{},[694,5157,5158],{},[697,5159,5160,5162,5164,5166],{},[700,5161,5056],{},[700,5163,4420],{},[700,5165,5061],{},[700,5167,5064],{},[708,5169,5170,5183,5196,5209,5222,5235,5248,5262],{},[697,5171,5172,5175,5178,5180],{},[713,5173,5174],{},"\u002F17",[713,5176,5177],{},"255.255.128.0",[713,5179,5077],{},[713,5181,5182],{},"32,766",[697,5184,5185,5188,5191,5193],{},[713,5186,5187],{},"\u002F18",[713,5189,5190],{},"255.255.192.0",[713,5192,5090],{},[713,5194,5195],{},"16,382",[697,5197,5198,5201,5204,5206],{},[713,5199,5200],{},"\u002F19",[713,5202,5203],{},"255.255.224.0",[713,5205,5104],{},[713,5207,5208],{},"8,190",[697,5210,5211,5214,5217,5219],{},[713,5212,5213],{},"\u002F20",[713,5215,5216],{},"255.255.240.0",[713,5218,5118],{},[713,5220,5221],{},"4,094",[697,5223,5224,5227,5230,5232],{},[713,5225,5226],{},"\u002F21",[713,5228,5229],{},"255.255.248.0",[713,5231,5132],{},[713,5233,5234],{},"2,046",[697,5236,5237,5240,5243,5245],{},[713,5238,5239],{},"\u002F22",[713,5241,5242],{},"255.255.252.0",[713,5244,5146],{},[713,5246,5247],{},"1,022",[697,5249,5250,5253,5256,5259],{},[713,5251,5252],{},"\u002F23",[713,5254,5255],{},"255.255.254.0",[713,5257,5258],{},"128",[713,5260,5261],{},"510",[697,5263,5264,5267,5269,5272],{},[713,5265,5266],{},"\u002F24",[713,5268,4353],{},[713,5270,5271],{},"256",[713,5273,5274],{},"254",[73,5276,5278],{"id":5277},"worked-example-subnetting-a-16-network","Worked Example: Subnetting a \u002F16 Network",[16,5280,5281,5282,5285,5286,5289,5290,5292],{},"Consider the Class B network ",[191,5283,5284],{},"172.16.0.0\u002F16",". If we borrow ",[20,5287,5288],{},"7 bits"," from the host portion, the new mask becomes ",[191,5291,5255],{}," (or \u002F23).",[89,5294,5295,5303,5309],{},[39,5296,5297,5299,5300],{},[20,5298,4944],{}," 2⁷ = ",[20,5301,5302],{},"128 subnets",[39,5304,5305,5308],{},[20,5306,5307],{},"Remaining host bits:"," 9",[39,5310,5311,5313,5314],{},[20,5312,4953],{}," 2⁹ − 2 = ",[20,5315,5316],{},"510 usable hosts",[16,5318,4960,5319,4964],{},[191,5320,5321],{},"172.16.0.0\u002F23",[691,5323,5324,5333],{},[694,5325,5326],{},[697,5327,5328,5330],{},[700,5329,1467],{},[700,5331,5332],{},"Address",[708,5334,5335,5341,5348,5355],{},[697,5336,5337,5339],{},[713,5338,4495],{},[713,5340,5321],{},[697,5342,5343,5345],{},[713,5344,4995],{},[713,5346,5347],{},"172.16.0.1\u002F23",[697,5349,5350,5352],{},[713,5351,5005],{},[713,5353,5354],{},"172.16.0.254\u002F23",[697,5356,5357,5359],{},[713,5358,3423],{},[713,5360,5361],{},"172.16.1.255",[16,5363,5364],{},"Notice how the subnet spans two values in the third octet (0 and 1) because we have 9 host bits that cross the octet boundary.",[11,5366,5368],{"id":5367},"variable-length-subnet-mask-vlsm","Variable Length Subnet Mask (VLSM)",[16,5370,5371],{},"Standard subnetting gives every subnet the same size, but real-world networks rarely have equal needs. A headquarters might need 40 hosts while a small branch only needs 10. Giving both subnets the same \u002F26 mask wastes addresses in the smaller branch.",[16,5373,5374,5377,5378,5381],{},[20,5375,5376],{},"VLSM"," (Variable Length Subnet Mask) solves this by allowing you to ",[20,5379,5380],{},"subnet a subnet"," — using different mask lengths for different parts of the network.",[16,5383,5384,5385,5387],{},"For example, with ",[191,5386,5284],{},", you might create seven \u002F27 subnets (30 hosts each) for your larger offices, then take one of the remaining blocks and further divide it into eight smaller \u002F30 subnets (2 hosts each) for point-to-point router links.",[16,5389,5390,5391,83,5394,5397,5398,83,5401,5404],{},"In a real enterprise topology, subnet assignments might look like: the corporate headquarters gets ",[191,5392,5393],{},"172.16.0.0\u002F26",[191,5395,5396],{},"172.16.0.64\u002F26",", Branch 1 gets ",[191,5399,5400],{},"172.16.0.128\u002F26",[191,5402,5403],{},"172.16.0.192\u002F26",", and so on — each sized to match the actual number of hosts needed at that site.",[11,5406,5408],{"id":5407},"planning-your-address-scheme","Planning Your Address Scheme",[16,5410,5411],{},"When designing a network's addressing plan, there are several key decisions to make:",[16,5413,5414,5417],{},[20,5415,5416],{},"Determine your needs"," — How many subnets do you need? How many hosts per subnet? These two numbers will guide which private address block to use and how many bits to borrow.",[16,5419,5420,5423,5424,5427,5428,5431],{},[20,5421,5422],{},"Decide on static vs. dynamic addressing"," — Servers, printers, and network infrastructure should have ",[20,5425,5426],{},"static (fixed) IP addresses"," so they're always reachable at the same address. Regular workstations and mobile devices can use ",[20,5429,5430],{},"DHCP"," to receive addresses automatically.",[16,5433,5434,5437],{},[20,5435,5436],{},"Prevent duplicate addresses"," — Every host in the entire internetwork must have a unique address. Overlapping subnets or duplicate assignments will cause connectivity issues that are painful to debug.",[16,5439,5440,5443],{},[20,5441,5442],{},"Plan for access control and monitoring"," — Grouping devices by function into subnets makes it easier to apply security policies (like firewall rules) and monitor performance. For instance, putting all servers in one subnet lets you apply stricter access controls to that subnet.",[11,5445,5447],{"id":5446},"quick-recap","Quick Recap",[89,5449,5450,5457,5468,5483,5492,5497,5502],{},[39,5451,5452,5454,5455,3407],{},[20,5453,82],{}," addresses are 32-bit numbers written in dotted decimal (e.g., ",[191,5456,4529],{},[39,5458,5459,5460,5462,5463,5465,5466,415],{},"Every address has a ",[20,5461,4452],{}," and a ",[20,5464,4456],{},", determined by the ",[20,5467,4475],{},[39,5469,5470,5471,5474,5475,5478,5479,5482],{},"Each network has a ",[20,5472,5473],{},"network address",", a ",[20,5476,5477],{},"broadcast address",", and ",[20,5480,5481],{},"usable host addresses"," in between.",[39,5484,5485,5487,5488,5491],{},[20,5486,4582],{}," (10.x.x.x, 172.16–31.x.x, 192.168.x.x) are for internal use; ",[20,5489,5490],{},"public addresses"," are for the internet.",[39,5493,5494,5496],{},[20,5495,4808],{}," divides large networks into smaller ones by borrowing host bits, reducing broadcast traffic and improving manageability.",[39,5498,5499,5501],{},[20,5500,5376],{}," lets you create subnets of different sizes to match real-world requirements.",[39,5503,5504],{},"Good address planning considers subnet sizing, static vs. dynamic allocation, uniqueness, and security.",{"title":812,"searchDepth":813,"depth":813,"links":5506},[5507,5511,5512,5517,5520,5528,5529,5530],{"id":4285,"depth":813,"text":4286,"children":5508},[5509,5510],{"id":4332,"depth":819,"text":4333},{"id":4468,"depth":819,"text":4469},{"id":4486,"depth":813,"text":4487},{"id":4536,"depth":813,"text":4537,"children":5513},[5514,5515,5516],{"id":4540,"depth":819,"text":4541},{"id":4575,"depth":819,"text":4576},{"id":4652,"depth":819,"text":4653},{"id":4668,"depth":813,"text":4669,"children":5518},[5519],{"id":4780,"depth":819,"text":4781},{"id":4791,"depth":813,"text":4792,"children":5521},[5522,5523,5524,5525,5526,5527],{"id":4795,"depth":819,"text":4796},{"id":4816,"depth":819,"text":4817},{"id":4881,"depth":819,"text":4882},{"id":4909,"depth":819,"text":4910},{"id":5038,"depth":819,"text":5039},{"id":5277,"depth":819,"text":5278},{"id":5367,"depth":813,"text":5368},{"id":5407,"depth":813,"text":5408},{"id":5446,"depth":813,"text":5447},{},"\u002Fblog\u002FNetwork-Communications,-Chapter-5",{"title":4280,"description":812},{"loc":5532},"blog\u002FNetwork-Communications,-Chapter-5","RyZWyeSULzjbwoFyKSXpEHVonpp9RnkZ5lbu0RDrjwI",{"id":5538,"title":5539,"author":6,"body":5540,"date":849,"description":812,"draft":850,"edited_at":849,"extension":851,"featured_image":852,"meta":6667,"navigation":854,"path":6668,"pinned":850,"seo":6669,"series":852,"seriesOrder":852,"sitemap":6670,"stem":6671,"tags":852,"__hash__":6672},"blog\u002Fblog\u002FNetwork-Communication,-Chapter-6.md","Network Communication, Chapter 6",{"type":8,"value":5541,"toc":6620},[5542,5546,5549,5564,5571,5578,5591,5595,5599,5614,5620,5623,5627,5634,5640,5647,5665,5671,5675,5682,5688,5698,5702,5709,5713,5720,5724,5731,5735,5746,5758,5762,5769,5773,5780,5797,5800,5853,5859,5870,5874,5885,5908,5911,5915,5921,5931,5935,5941,5948,5952,5969,5981,5985,5988,5992,5995,5999,6009,6012,6040,6043,6046,6052,6056,6063,6067,6074,6078,6088,6091,6115,6121,6124,6128,6135,6139,6142,6183,6187,6190,6201,6204,6208,6218,6221,6291,6295,6300,6303,6321,6325,6337,6340,6344,6347,6351,6358,6362,6373,6377,6383,6387,6397,6401,6411,6417,6420,6426,6430,6440,6456,6462,6482,6486],[11,5543,5545],{"id":5544},"why-do-we-need-ipv6","Why Do We Need IPv6?",[16,5547,5548],{},"The Internet was never meant to be this big.",[16,5550,5551,5552,5555,5556,5559,5560,5563],{},"When IPv4 was designed, its 32-bit address space gave us roughly ",[20,5553,5554],{},"4.3 billion addresses"," — a number that seemed inexhaustible at the time. But the digital world had other plans. On ",[20,5557,5558],{},"January 31, 2011",", the Internet Assigned Numbers Authority (IANA) allocated the last two ",[191,5561,5562],{},"\u002F8"," IPv4 address blocks to the Regional Internet Registries (RIRs). In other words, we officially ran out of fresh IPv4 addresses to hand out.",[16,5565,5566,5567,5570],{},"And the demand is only growing. The Internet is no longer just for computers, tablets, and smartphones. We're entering the era of the ",[20,5568,5569],{},"Internet of Things (IoT)"," — where everything from cars and medical sensors to household appliances and environmental monitors are connecting online. Each of these devices needs an address.",[16,5572,5573,5574,5577],{},"IPv4 tried to cope with workarounds like ",[20,5575,5576],{},"NAT (Network Address Translation)",", which lets multiple devices share a single public IP. But NAT introduces complexity, breaks certain applications, and is ultimately a band-aid, not a cure.",[16,5579,5580,5582,5583,5586,5587,5590],{},[20,5581,86],{}," is the real solution. With a ",[20,5584,5585],{},"128-bit address space",", it provides approximately ",[20,5588,5589],{},"3.4 × 10³⁸ addresses"," — enough for every grain of sand on Earth to have its own IP address, many times over.",[11,5592,5594],{"id":5593},"understanding-ipv6-addresses","Understanding IPv6 Addresses",[73,5596,5598],{"id":5597},"the-format","The Format",[16,5600,5601,5602,5605,5606,5609,5610,5613],{},"An IPv6 address is ",[20,5603,5604],{},"128 bits"," long, written as ",[20,5607,5608],{},"eight groups of four hexadecimal digits",", separated by colons. Each group (called a ",[20,5611,5612],{},"hextet",") represents 16 bits.",[4312,5615,5618],{"className":5616,"code":5617,"language":4317},[4315],"Full format: X:X:X:X:X:X:X:X   (where each X = four hex digits)\n \nExample:    2001:0DB8:ACAD:0001:0000:0000:0000:0100\n",[191,5619,5617],{"__ignoreMap":812},[16,5621,5622],{},"That's a lot of characters. Fortunately, there are two shorthand rules to make things more manageable.",[73,5624,5626],{"id":5625},"rule-1-drop-leading-zeros","Rule 1: Drop Leading Zeros",[16,5628,5629,5630,5633],{},"Within any hextet, you can omit ",[20,5631,5632],{},"leading zeros"," (zeros at the front). For example:",[4312,5635,5638],{"className":5636,"code":5637,"language":4317},[4315],"Full:        2001:0DB8:0000:1111:0000:0000:0000:0200\nShortened:   2001: DB8:   0:1111:   0:   0:   0: 200\n",[191,5639,5637],{"__ignoreMap":812},[73,5641,5643,5644],{"id":5642},"rule-2-replace-consecutive-all-zero-groups-with","Rule 2: Replace Consecutive All-Zero Groups with ",[191,5645,5646],{},"::",[16,5648,4472,5649,2654,5652,5654,5655,5657,5658,5661,5662,5664],{},[20,5650,5651],{},"double colon",[191,5653,5646],{},") can replace one or more consecutive hextets that are all zeros. But you can only use ",[191,5656,5646],{}," ",[20,5659,5660],{},"once"," per address — otherwise, it would be ambiguous how many zero groups each ",[191,5663,5646],{}," represents.",[4312,5666,5669],{"className":5667,"code":5668,"language":4317},[4315],"Full:        2001:0DB8:0000:0000:0000:0000:0000:0100\nCompressed:  2001:DB8::100\n",[191,5670,5668],{"__ignoreMap":812},[73,5672,5674],{"id":5673},"prefix-length-notation","Prefix Length Notation",[16,5676,5677,5678,5681],{},"Just like IPv4 uses a subnet mask, IPv6 uses a ",[20,5679,5680],{},"prefix length"," to indicate the network portion of an address. It's written with a slash followed by a number:",[4312,5683,5686],{"className":5684,"code":5685,"language":4317},[4315],"2001:0DB8:000A::\u002F64\n      ↑                  ↑\n  Network portion    Prefix length (first 64 bits = network)\n",[191,5687,5685],{"__ignoreMap":812},[16,5689,5690,5691,5694,5695,3407],{},"An IPv6 address is typically split into two halves: the first 64 bits identify the network (the ",[20,5692,5693],{},"prefix","), and the last 64 bits identify the device on that network (the ",[20,5696,5697],{},"Interface ID",[11,5699,5701],{"id":5700},"types-of-ipv6-addresses","Types of IPv6 Addresses",[16,5703,5704,5705,5708],{},"IPv6 defines ",[20,5706,5707],{},"three"," main categories of addresses:",[73,5710,5712],{"id":5711},"_1-unicast-one-to-one","1. Unicast — \"One-to-One\"",[16,5714,5715,5716,5719],{},"A unicast address uniquely identifies ",[20,5717,5718],{},"a single interface"," on a device. When you send a packet to a unicast address, it goes to exactly one destination. Think of it as a direct letter to a specific mailbox.",[73,5721,5723],{"id":5722},"_2-multicast-one-to-many","2. Multicast — \"One-to-Many\"",[16,5725,5726,5727,5730],{},"A multicast address delivers a packet to ",[20,5728,5729],{},"multiple destinations"," simultaneously. Instead of sending separate copies, the network efficiently distributes one packet to an entire group. Think of it as a group chat message.",[73,5732,5734],{"id":5733},"_3-anycast-one-to-nearest","3. Anycast — \"One-to-Nearest\"",[16,5736,5737,5738,5741,5742,5745],{},"An anycast address can be assigned to ",[20,5739,5740],{},"multiple devices",", but a packet sent to it is delivered only to the ",[20,5743,5744],{},"nearest one"," (determined by routing distance). Think of it as calling the closest branch of a restaurant chain — the system routes you to the nearest location.",[3435,5747,5748],{},[16,5749,5750,5753,5754,5757],{},[20,5751,5752],{},"Note:"," Unlike IPv4, IPv6 has ",[20,5755,5756],{},"no broadcast"," address. The function of broadcast is handled by multicast in IPv6.",[11,5759,5761],{"id":5760},"ipv6-unicast-addresses-in-detail","IPv6 Unicast Addresses in Detail",[16,5763,5764,5765,5768],{},"There are ",[20,5766,5767],{},"six"," types of unicast addresses. Let's walk through each one.",[73,5770,5772],{"id":5771},"global-unicast-address-gua","Global Unicast Address (GUA)",[16,5774,5775,5776,5779],{},"This is the IPv6 equivalent of a ",[20,5777,5778],{},"public IPv4 address"," — globally unique and routable across the Internet.",[16,5781,5782,5783,5786,5787,5790,5791,4561,5794,415],{},"Currently, only addresses starting with the binary bits ",[191,5784,5785],{},"001"," (the range ",[191,5788,5789],{},"2000::\u002F3",") are being assigned as global unicast. That covers all addresses from ",[191,5792,5793],{},"2000::",[191,5795,5796],{},"3FFF::",[16,5798,5799],{},"A global unicast address has three parts:",[691,5801,5802,5813],{},[694,5803,5804],{},[697,5805,5806,5809,5811],{},[700,5807,5808],{},"Part",[700,5810,2095],{},[700,5812,1353],{},[708,5814,5815,5828,5841],{},[697,5816,5817,5822,5825],{},[713,5818,5819],{},[20,5820,5821],{},"Global Routing Prefix",[713,5823,5824],{},"Typically 48 bits",[713,5826,5827],{},"Assigned by the ISP or RIR; identifies the organization's network on the global Internet",[697,5829,5830,5835,5838],{},[713,5831,5832],{},[20,5833,5834],{},"Subnet ID",[713,5836,5837],{},"Typically 16 bits",[713,5839,5840],{},"Used by the organization to create internal subnets",[697,5842,5843,5847,5850],{},[713,5844,5845],{},[20,5846,5697],{},[713,5848,5849],{},"64 bits",[713,5851,5852],{},"Identifies the specific device interface; similar to the host portion in IPv4",[4312,5854,5857],{"className":5855,"code":5856,"language":4317},[4315],"|\u003C--- 48 bits --->|\u003C- 16 bits ->|\u003C-------- 64 bits -------->|\n  Global Routing       Subnet          Interface ID\n     Prefix              ID\n",[191,5858,5856],{"__ignoreMap":812},[16,5860,5861,5862,5865,5866,5869],{},"So a ",[191,5863,5864],{},"\u002F48"," routing prefix + 16-bit Subnet ID gives you a ",[191,5867,5868],{},"\u002F64"," prefix for each subnet.",[73,5871,5873],{"id":5872},"link-local-address","Link-Local Address",[16,5875,5876,5877,5880,5881,5884],{},"Link-local addresses are used for communication ",[20,5878,5879],{},"within a single network segment"," (link). They are ",[20,5882,5883],{},"not routable"," — routers will not forward packets with a link-local source or destination beyond the local link.",[89,5886,5887,5895,5902,5905],{},[39,5888,5889,5657,5892],{},[20,5890,5891],{},"Range:",[191,5893,5894],{},"FE80::\u002F10",[39,5896,5897,5898,5901],{},"Every IPv6-enabled interface ",[20,5899,5900],{},"automatically"," gets a link-local address",[39,5903,5904],{},"Used for neighbor discovery, router advertisements, and as the default gateway address",[39,5906,5907],{},"Can also be configured manually as a static address",[16,5909,5910],{},"Think of link-local as a \"neighborhood-only\" address — devices on the same link can talk to each other, but the conversation stays local.",[73,5912,5914],{"id":5913},"loopback-address","Loopback Address",[4312,5916,5919],{"className":5917,"code":5918,"language":4317},[4315],"::1\n",[191,5920,5918],{"__ignoreMap":812},[16,5922,5923,5924,5926,5927,5930],{},"The loopback address is the IPv6 version of ",[191,5925,193],{}," in IPv4. A device uses it to ",[20,5928,5929],{},"send a packet to itself"," — useful for testing whether the IPv6 stack is working. It cannot be assigned to a physical interface.",[73,5932,5934],{"id":5933},"unspecified-address","Unspecified Address",[4312,5936,5939],{"className":5937,"code":5938,"language":4317},[4315],"::\n",[191,5940,5938],{"__ignoreMap":812},[16,5942,5943,5944,5947],{},"The all-zeros address is used as a ",[20,5945,5946],{},"placeholder source address"," when a device doesn't yet have an address assigned (for example, during the initial boot-up process). It cannot be assigned to an interface or used as a destination.",[73,5949,5951],{"id":5950},"unique-local-address","Unique Local Address",[16,5953,5954,5955,5958,5959,2296,5962,5965,5966,5968],{},"These are the IPv6 equivalent of ",[20,5956,5957],{},"private IPv4 addresses"," (like ",[191,5960,5961],{},"192.168.x.x",[191,5963,5964],{},"10.x.x.x","). They are meant for communication within a site or between a few sites, and are ",[20,5967,5883],{}," on the global Internet.",[89,5970,5971],{},[39,5972,5973,5657,5975,4561,5978],{},[20,5974,5891],{},[191,5976,5977],{},"FC00::\u002F7",[191,5979,5980],{},"FDFF::\u002F7",[73,5982,5984],{"id":5983},"embedded-ipv4-address","Embedded IPv4 Address",[16,5986,5987],{},"A special unicast address format that embeds an IPv4 address within an IPv6 address, used during transition from IPv4 to IPv6.",[11,5989,5991],{"id":5990},"how-devices-get-their-ipv6-addresses","How Devices Get Their IPv6 Addresses",[16,5993,5994],{},"One of the powerful features of IPv6 is its flexible addressing model. There are three main ways a device can obtain its IPv6 address.",[73,5996,5998],{"id":5997},"option-1-slaac-stateless-address-auto-configuration","Option 1: SLAAC (Stateless Address Auto-Configuration)",[16,6000,6001,6002,6005,6006,415],{},"SLAAC lets a device configure its own address ",[20,6003,6004],{},"without a DHCPv6 server",". The process relies on ",[20,6007,6008],{},"ICMPv6 Router Advertisement (RA) messages",[16,6010,6011],{},"Here's how it works:",[36,6013,6014,6027,6034],{},[39,6015,6016,6017,6020,6021,3576,6024],{},"A device boots up and sends a ",[20,6018,6019],{},"Router Solicitation (RS)"," message to the all-routers multicast address (",[191,6022,6023],{},"FF02::2",[52,6025,6026],{},"\"Are there any routers out there? What network am I on?\"",[39,6028,6029,6030,6033],{},"A router responds with a ",[20,6031,6032],{},"Router Advertisement (RA)"," containing the network prefix, prefix length, and default gateway information.",[39,6035,6036,6037,6039],{},"The device combines the prefix with its own ",[20,6038,5697],{}," (often generated via EUI-64, more on this below) to form a complete global unicast address.",[16,6041,6042],{},"Routers also send RA messages periodically (roughly every 200 seconds), so even devices that missed the initial exchange will eventually get their information.",[16,6044,6045],{},"To enable a Cisco router for IPv6 routing, you need the command:",[4312,6047,6050],{"className":6048,"code":6049,"language":4317},[4315],"Router(config)# ipv6 unicast-routing\n",[191,6051,6049],{"__ignoreMap":812},[73,6053,6055],{"id":6054},"option-2-stateless-dhcpv6-slaac-dhcpv6","Option 2: Stateless DHCPv6 (SLAAC + DHCPv6)",[16,6057,6058,6059,6062],{},"In this hybrid approach, SLAAC handles the address and prefix, while a ",[20,6060,6061],{},"DHCPv6 server"," provides additional information such as DNS server addresses and domain names. The DHCPv6 server doesn't track which addresses are assigned — hence \"stateless.\"",[73,6064,6066],{"id":6065},"option-3-stateful-dhcpv6","Option 3: Stateful DHCPv6",[16,6068,6069,6070,6073],{},"This is closest to traditional DHCP in IPv4. A ",[20,6071,6072],{},"stateful DHCPv6 server"," assigns the full addressing information, including the global unicast address, prefix length, and DNS server addresses. The server maintains a record of which addresses are assigned to which devices.",[11,6075,6077],{"id":6076},"the-eui-64-process","The EUI-64 Process",[16,6079,6080,6081,6084,6085,415],{},"When using SLAAC, a device needs to generate a 64-bit Interface ID. One common method is ",[20,6082,6083],{},"EUI-64"," (Extended Unique Identifier, 64-bit), which derives the Interface ID from the device's ",[20,6086,6087],{},"48-bit MAC address",[16,6089,6090],{},"Here's the process:",[36,6092,6093,6099,6109],{},[39,6094,6095,6098],{},[20,6096,6097],{},"Split"," the 48-bit MAC address into two halves (24 bits each)",[39,6100,6101,6104,6105,6108],{},[20,6102,6103],{},"Insert"," the hex value ",[191,6106,6107],{},"FFFE"," (16 bits) in the middle",[39,6110,6111,6114],{},[20,6112,6113],{},"Flip"," the 7th bit (the Universal\u002FLocal bit) of the first byte",[4312,6116,6119],{"className":6117,"code":6118,"language":4317},[4315],"MAC Address:       FC:99:47:75:CE:E0\n \nStep 1 — Split:    FC:99:47  |  75:CE:E0\nStep 2 — Insert:   FC:99:47:FF:FE:75:CE:E0\nStep 3 — Flip 7th: FE:99:47:FF:FE:75:CE:E0\n \nInterface ID:      FE99:47FF:FE75:CEE0\n",[191,6120,6118],{"__ignoreMap":812},[16,6122,6123],{},"This gives each device a unique Interface ID derived from its hardware address.",[11,6125,6127],{"id":6126},"ipv6-multicast-addresses","IPv6 Multicast Addresses",[16,6129,6130,6131,6134],{},"Since IPv6 eliminates broadcast, ",[20,6132,6133],{},"multicast"," takes on a bigger role. There are two key types:",[73,6136,6138],{"id":6137},"assigned-multicast","Assigned Multicast",[16,6140,6141],{},"These are reserved addresses for well-known groups:",[691,6143,6144,6156],{},[694,6145,6146],{},[697,6147,6148,6150,6153],{},[700,6149,5332],{},[700,6151,6152],{},"Group",[700,6154,6155],{},"Purpose",[708,6157,6158,6171],{},[697,6159,6160,6165,6168],{},[713,6161,6162],{},[191,6163,6164],{},"FF02::1",[713,6166,6167],{},"All-nodes",[713,6169,6170],{},"Every IPv6-enabled device on the link receives packets sent here — this is the closest thing to a broadcast",[697,6172,6173,6177,6180],{},[713,6174,6175],{},[191,6176,6023],{},[713,6178,6179],{},"All-routers",[713,6181,6182],{},"Only IPv6 routers join this group; hosts use it to send Router Solicitations",[73,6184,6186],{"id":6185},"solicited-node-multicast","Solicited-Node Multicast",[16,6188,6189],{},"This is a clever mechanism for efficient neighbor discovery. Instead of broadcasting to every device, IPv6 creates a special multicast address that targets only the device(s) with a matching address suffix.",[16,6191,6192,6193,6196,6197,6200],{},"A solicited-node address is formed by combining the fixed prefix ",[191,6194,6195],{},"FF02:0:0:0:0:1:FF00::\u002F104"," with the ",[20,6198,6199],{},"last 24 bits"," of a device's unicast address. Only devices sharing those same 24 bits will process the packet — everyone else ignores it.",[16,6202,6203],{},"This means address resolution in IPv6 is far more efficient than ARP broadcasts in IPv4.",[11,6205,6207],{"id":6206},"icmpv6-and-neighbor-discovery-protocol-ndp","ICMPv6 and Neighbor Discovery Protocol (NDP)",[16,6209,6210,6213,6214,6217],{},[20,6211,6212],{},"ICMPv6"," is the upgraded messaging protocol for IPv6, and it plays a much larger role than its IPv4 counterpart. A key part of ICMPv6 is the ",[20,6215,6216],{},"Neighbor Discovery Protocol (NDP)",", which handles several functions that ARP and other protocols managed in IPv4.",[16,6219,6220],{},"NDP uses five message types:",[691,6222,6223,6235],{},[694,6224,6225],{},[697,6226,6227,6230,6233],{},[700,6228,6229],{},"Message",[700,6231,6232],{},"Abbreviation",[700,6234,6155],{},[708,6236,6237,6248,6259,6270,6281],{},[697,6238,6239,6242,6245],{},[713,6240,6241],{},"Router Solicitation",[713,6243,6244],{},"RS",[713,6246,6247],{},"Hosts ask routers for network configuration info",[697,6249,6250,6253,6256],{},[713,6251,6252],{},"Router Advertisement",[713,6254,6255],{},"RA",[713,6257,6258],{},"Routers announce prefix, gateway, and configuration options",[697,6260,6261,6264,6267],{},[713,6262,6263],{},"Neighbor Solicitation",[713,6265,6266],{},"NS",[713,6268,6269],{},"Resolve IPv6 address to a MAC address (replaces ARP); also used for Duplicate Address Detection",[697,6271,6272,6275,6278],{},[713,6273,6274],{},"Neighbor Advertisement",[713,6276,6277],{},"NA",[713,6279,6280],{},"Response to NS, providing the requested MAC address",[697,6282,6283,6286,6288],{},[713,6284,6285],{},"Redirect",[713,6287,4751],{},[713,6289,6290],{},"Informs a host of a better next-hop router for a destination",[73,6292,6294],{"id":6293},"duplicate-address-detection-dad","Duplicate Address Detection (DAD)",[16,6296,6297,6298,415],{},"Before a device starts using a new IPv6 address (whether global unicast or link-local), it should verify that no other device on the link already has the same address. This is called ",[20,6299,6294],{},[16,6301,6302],{},"The process:",[36,6304,6305,6312,6318],{},[39,6306,6307,6308,6311],{},"The device sends a ",[20,6309,6310],{},"Neighbor Solicitation (NS)"," message with its own tentative IPv6 address as the target",[39,6313,6314,6315],{},"If another device already uses this address, it replies with a ",[20,6316,6317],{},"Neighbor Advertisement (NA)",[39,6319,6320],{},"If no NA is received within a timeout period, the address is considered unique and safe to use",[73,6322,6324],{"id":6323},"address-resolution-replacing-arp","Address Resolution (Replacing ARP)",[16,6326,6327,6328,6330,6331,6334,6335,3586],{},"When a device knows the IPv6 address of a destination on the same link but not its MAC address, it sends a ",[20,6329,6263],{}," to the destination's ",[20,6332,6333],{},"solicited-node multicast address",". The destination responds with a ",[20,6336,6274],{},[16,6338,6339],{},"This is more efficient than IPv4's ARP, which broadcasts to every device on the network.",[11,6341,6343],{"id":6342},"transitioning-from-ipv4-to-ipv6","Transitioning from IPv4 to IPv6",[16,6345,6346],{},"The Internet can't switch to IPv6 overnight. The migration relies on three main strategies:",[73,6348,6350],{"id":6349},"dual-stack","Dual Stack",[16,6352,6353,6354,6357],{},"Devices run ",[20,6355,6356],{},"both"," IPv4 and IPv6 simultaneously. They have both an IPv4 and IPv6 address and can communicate using either protocol depending on what the destination supports. This is the most common transition approach today.",[73,6359,6361],{"id":6360},"tunneling","Tunneling",[16,6363,6364,6365,6368,6369,6372],{},"When an IPv6 packet needs to cross an ",[20,6366,6367],{},"IPv4-only"," network, it gets ",[20,6370,6371],{},"encapsulated"," inside an IPv4 packet for transit, then unwrapped at the other end. The IPv4 network acts as a tunnel, carrying the IPv6 traffic without needing to understand it.",[73,6374,6376],{"id":6375},"translation-nat64","Translation (NAT64)",[16,6378,6379,6382],{},[20,6380,6381],{},"NAT64"," enables IPv6-only devices to communicate with IPv4-only devices by translating between the two protocols — similar in concept to how NAT works in IPv4. This is useful when dual-stack isn't an option and the two endpoints speak different protocol versions.",[11,6384,6386],{"id":6385},"ipv6-subnetting","IPv6 Subnetting",[16,6388,6389,6390,6393,6394,415],{},"Subnetting in IPv6 has a fundamentally different philosophy from IPv4. In IPv4, subnetting is primarily about ",[20,6391,6392],{},"conserving addresses",". In IPv6, with its enormous address space, subnetting is about ",[20,6395,6396],{},"organizing your network logically and hierarchically",[73,6398,6400],{"id":6399},"the-standard-approach","The Standard Approach",[16,6402,6403,6404,6406,6407,6410],{},"With a typical ",[191,6405,5864],{}," global routing prefix, you have a ",[20,6408,6409],{},"16-bit Subnet ID"," to work with. That gives you:",[4312,6412,6415],{"className":6413,"code":6414,"language":4317},[4315],"2¹⁶ = 65,536 possible \u002F64 subnets\n",[191,6416,6414],{"__ignoreMap":812},[16,6418,6419],{},"And you haven't borrowed a single bit from the Interface ID. Each subnet still has a full 64-bit host portion, supporting an astronomical number of devices.",[4312,6421,6424],{"className":6422,"code":6423,"language":4317},[4315],"Address Block: 2001:0DB8:ACAD::\u002F48\n \nSubnets:\n  2001:0DB8:ACAD:0000::\u002F64\n  2001:0DB8:ACAD:0001::\u002F64\n  2001:0DB8:ACAD:0002::\u002F64\n  ... (up to)\n  2001:0DB8:ACAD:FFFF::\u002F64\n",[191,6425,6423],{"__ignoreMap":812},[73,6427,6429],{"id":6428},"subnetting-on-a-nibble-boundary","Subnetting on a Nibble Boundary",[16,6431,6432,6433,6435,6436,6439],{},"In some cases (often for security, to limit the number of hosts per subnet), you can extend the subnet prefix beyond ",[191,6434,5868],{}," by borrowing bits from the Interface ID. When doing this, the best practice is to subnet on a ",[20,6437,6438],{},"nibble boundary"," — meaning you extend in increments of 4 bits (one hex digit).",[16,6441,6442,6443,4561,6445,6448,6449,6452,6453,6455],{},"For example, extending from ",[191,6444,5868],{},[191,6446,6447],{},"\u002F68"," borrows 4 bits from the Interface ID, reducing it from 64 to 60 bits. This creates ",[20,6450,6451],{},"16 sub-subnets"," within each ",[191,6454,5868],{}," subnet, each supporting fewer hosts.",[4312,6457,6460],{"className":6458,"code":6459,"language":4317},[4315],"\u002F64 prefix → extend by 4 bits → \u002F68 prefix\n  Interface ID shrinks: 64 bits → 60 bits\n  Sub-subnets per \u002F64:  2⁴ = 16\n",[191,6461,6459],{"__ignoreMap":812},[16,6463,6464,6465,6467,6468,6467,6471,6467,6474,6467,6477,6467,6479,6481],{},"Nibble boundaries (",[191,6466,5864],{},", ",[191,6469,6470],{},"\u002F52",[191,6472,6473],{},"\u002F56",[191,6475,6476],{},"\u002F60",[191,6478,5868],{},[191,6480,6447],{},", ...) keep the math clean because each nibble corresponds to exactly one hexadecimal digit.",[11,6483,6485],{"id":6484},"quick-reference-summary","Quick Reference Summary",[691,6487,6488,6498],{},[694,6489,6490],{},[697,6491,6492,6495],{},[700,6493,6494],{},"Concept",[700,6496,6497],{},"Key Detail",[708,6499,6500,6508,6516,6527,6537,6547,6562,6571,6580,6589,6597,6604,6612],{},[697,6501,6502,6505],{},[713,6503,6504],{},"IPv6 address size",[713,6506,6507],{},"128 bits (vs. 32 bits for IPv4)",[697,6509,6510,6513],{},[713,6511,6512],{},"Address notation",[713,6514,6515],{},"8 hextets of 4 hex digits, separated by colons",[697,6517,6518,6521],{},[713,6519,6520],{},"Shorthand rules",[713,6522,6523,6524,6526],{},"Drop leading zeros; replace consecutive all-zero groups with ",[191,6525,5646],{}," (once only)",[697,6528,6529,6532],{},[713,6530,6531],{},"Global Unicast",[713,6533,6534,6536],{},[191,6535,5789],{}," — publicly routable, similar to public IPv4 addresses",[697,6538,6539,6542],{},[713,6540,6541],{},"Link-Local",[713,6543,6544,6546],{},[191,6545,5894],{}," — local link only, auto-generated, not routable",[697,6548,6549,6552],{},[713,6550,6551],{},"Unique Local",[713,6553,6554,6556,6557,6559,6560],{},[191,6555,5977],{}," — site-private, similar to ",[191,6558,5964],{}," \u002F ",[191,6561,5961],{},[697,6563,6564,6567],{},[713,6565,6566],{},"Loopback",[713,6568,6569],{},[191,6570,197],{},[697,6572,6573,6576],{},[713,6574,6575],{},"Multicast (all-nodes)",[713,6577,6578],{},[191,6579,6164],{},[697,6581,6582,6585],{},[713,6583,6584],{},"Multicast (all-routers)",[713,6586,6587],{},[191,6588,6023],{},[697,6590,6591,6594],{},[713,6592,6593],{},"SLAAC",[713,6595,6596],{},"Stateless auto-configuration using RA messages",[697,6598,6599,6601],{},[713,6600,6083],{},[713,6602,6603],{},"Generates Interface ID from MAC address",[697,6605,6606,6609],{},[713,6607,6608],{},"DAD",[713,6610,6611],{},"Duplicate Address Detection using NS\u002FNA messages",[697,6613,6614,6617],{},[713,6615,6616],{},"Transition methods",[713,6618,6619],{},"Dual Stack, Tunneling, NAT64",{"title":812,"searchDepth":813,"depth":813,"links":6621},[6622,6623,6630,6635,6643,6648,6649,6653,6657,6662,6666],{"id":5544,"depth":813,"text":5545},{"id":5593,"depth":813,"text":5594,"children":6624},[6625,6626,6627,6629],{"id":5597,"depth":819,"text":5598},{"id":5625,"depth":819,"text":5626},{"id":5642,"depth":819,"text":6628},"Rule 2: Replace Consecutive All-Zero Groups with ::",{"id":5673,"depth":819,"text":5674},{"id":5700,"depth":813,"text":5701,"children":6631},[6632,6633,6634],{"id":5711,"depth":819,"text":5712},{"id":5722,"depth":819,"text":5723},{"id":5733,"depth":819,"text":5734},{"id":5760,"depth":813,"text":5761,"children":6636},[6637,6638,6639,6640,6641,6642],{"id":5771,"depth":819,"text":5772},{"id":5872,"depth":819,"text":5873},{"id":5913,"depth":819,"text":5914},{"id":5933,"depth":819,"text":5934},{"id":5950,"depth":819,"text":5951},{"id":5983,"depth":819,"text":5984},{"id":5990,"depth":813,"text":5991,"children":6644},[6645,6646,6647],{"id":5997,"depth":819,"text":5998},{"id":6054,"depth":819,"text":6055},{"id":6065,"depth":819,"text":6066},{"id":6076,"depth":813,"text":6077},{"id":6126,"depth":813,"text":6127,"children":6650},[6651,6652],{"id":6137,"depth":819,"text":6138},{"id":6185,"depth":819,"text":6186},{"id":6206,"depth":813,"text":6207,"children":6654},[6655,6656],{"id":6293,"depth":819,"text":6294},{"id":6323,"depth":819,"text":6324},{"id":6342,"depth":813,"text":6343,"children":6658},[6659,6660,6661],{"id":6349,"depth":819,"text":6350},{"id":6360,"depth":819,"text":6361},{"id":6375,"depth":819,"text":6376},{"id":6385,"depth":813,"text":6386,"children":6663},[6664,6665],{"id":6399,"depth":819,"text":6400},{"id":6428,"depth":819,"text":6429},{"id":6484,"depth":813,"text":6485},{},"\u002Fblog\u002FNetwork-Communication,-Chapter-6",{"title":5539,"description":812},{"loc":6668},"blog\u002FNetwork-Communication,-Chapter-6","65R-yKC5M8mEkB6nirOrAHtxJqsNBLxV8NFQsLbmi1Y",[6674,6683,6692,6701,6710,6719,6728,6737,6746,6757],{"id":942,"title":943,"avatar":944,"banner":852,"bio":945,"body":6675,"description":812,"extension":851,"meta":6679,"name":943,"navigation":854,"path":951,"seo":6680,"sitemap":6681,"social":6682,"stem":958,"__hash__":959},{"type":8,"value":6676,"toc":6677},[],{"title":812,"searchDepth":813,"depth":813,"links":6678},[],{},{"description":812},{"loc":951},{"website":955,"twitter":956,"github":957},{"id":961,"title":962,"avatar":963,"banner":964,"bio":965,"body":6684,"description":812,"extension":851,"meta":6688,"name":971,"navigation":854,"path":972,"seo":6689,"sitemap":6690,"social":6691,"stem":978,"__hash__":979},{"type":8,"value":6685,"toc":6686},[],{"title":812,"searchDepth":813,"depth":813,"links":6687},[],{},{"description":812},{"loc":972},{"github":976,"twitter":812,"website":977},{"id":981,"title":982,"avatar":983,"banner":984,"bio":985,"body":6693,"description":812,"extension":851,"meta":6697,"name":991,"navigation":854,"path":992,"seo":6698,"sitemap":6699,"social":6700,"stem":997,"__hash__":998},{"type":8,"value":6694,"toc":6695},[],{"title":812,"searchDepth":813,"depth":813,"links":6696},[],{},{"description":812},{"loc":992},{"github":996,"twitter":812},{"id":1000,"title":1001,"avatar":1002,"banner":852,"bio":1003,"body":6702,"description":812,"extension":851,"meta":6706,"name":1001,"navigation":854,"path":1009,"seo":6707,"sitemap":6708,"social":6709,"stem":1014,"__hash__":1015},{"type":8,"value":6703,"toc":6704},[],{"title":812,"searchDepth":813,"depth":813,"links":6705},[],{},{"description":812},{"loc":1009},{"github":1013},{"id":1017,"title":1018,"avatar":1019,"banner":852,"bio":1020,"body":6711,"description":812,"extension":851,"meta":6715,"name":1018,"navigation":854,"path":1026,"seo":6716,"sitemap":6717,"social":6718,"stem":1031,"__hash__":1032},{"type":8,"value":6712,"toc":6713},[],{"title":812,"searchDepth":813,"depth":813,"links":6714},[],{},{"description":812},{"loc":1026},{"github":1030},{"id":1034,"title":1035,"avatar":852,"banner":852,"bio":1036,"body":6720,"description":812,"extension":851,"meta":6724,"name":1035,"navigation":854,"path":1042,"seo":6725,"sitemap":6726,"social":6727,"stem":1046,"__hash__":1047},{"type":8,"value":6721,"toc":6722},[],{"title":812,"searchDepth":813,"depth":813,"links":6723},[],{},{"description":812},{"loc":1042},{"github":812},{"id":1049,"title":1050,"avatar":1051,"banner":852,"bio":1052,"body":6729,"description":812,"extension":851,"meta":6733,"name":1050,"navigation":854,"path":1042,"seo":6734,"sitemap":6735,"social":6736,"stem":1062,"__hash__":1063},{"type":8,"value":6730,"toc":6731},[],{"title":812,"searchDepth":813,"depth":813,"links":6732},[],{},{"description":812},{"loc":1042},{"github":1061},{"id":1065,"title":1066,"avatar":1067,"banner":1068,"bio":1069,"body":6738,"description":812,"extension":851,"meta":6742,"name":1066,"navigation":854,"path":1042,"seo":6743,"sitemap":6744,"social":6745,"stem":1079,"__hash__":1080},{"type":8,"value":6739,"toc":6740},[],{"title":812,"searchDepth":813,"depth":813,"links":6741},[],{},{"description":812},{"loc":1042},{"github":1078,"twitter":812},{"id":1082,"title":1083,"avatar":1084,"banner":1085,"bio":1086,"body":6747,"description":1091,"extension":851,"meta":6753,"name":1083,"navigation":854,"path":1042,"seo":6754,"sitemap":6755,"social":6756,"stem":1100,"__hash__":1101},{"type":8,"value":6748,"toc":6751},[6749],[16,6750,1091],{},{"title":812,"searchDepth":813,"depth":813,"links":6752},[],{},{"description":1091},{"loc":1042},{"twitter":1098,"github":1099},{"id":1103,"title":1104,"avatar":1105,"banner":852,"bio":1106,"body":6758,"description":1111,"extension":851,"meta":6770,"name":1104,"navigation":854,"path":1042,"seo":6771,"sitemap":6772,"social":6773,"stem":1129,"__hash__":1130},{"type":8,"value":6759,"toc":6768},[6760,6762],[16,6761,1111],{},[16,6763,6764,1117,6766,1121],{},[20,6765,1116],{},[20,6767,1120],{},{"title":812,"searchDepth":813,"depth":813,"links":6769},[],{},{"description":1111},{"loc":1042},{"github":1128},1776087887487]