{"id":177384,"date":"2025-05-27T10:13:36","date_gmt":"2025-05-27T03:13:36","guid":{"rendered":"https:\/\/it.telkomuniversity.ac.id\/subnet-mask-adalah\/"},"modified":"2025-05-27T10:37:55","modified_gmt":"2025-05-27T03:37:55","slug":"what-is-subnet-mask","status":"publish","type":"post","link":"https:\/\/it.telkomuniversity.ac.id\/en\/what-is-subnet-mask\/","title":{"rendered":"Subnet Mask: Definition, Function, and How to Calculate It"},"content":{"rendered":"\n<p>Almost all aspects of life depend on data communication in an increasingly advanced digital era. Computer networks are essential for communication in education, business, and government. The term <strong>subnet mask<\/strong> is crucial in this network structure, especially for IP addressing and efficient network distribution.<\/p>\n\n\n\n<p><strong>Subnet mask<\/strong> is an important component of network configuration that helps divide large networks into smaller networks or subnets. This division allows better control of data traffic, improved security, and increased efficiency in IP address usage.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What is a Subnet Mask?<\/h3>\n\n\n\n<p>What is meant by a subnet mask? This question often arises when someone begins learning about computer networks, especially IP addressing (Internet Protocol).<\/p>\n\n\n\n<p>A <strong>subnet mask<\/strong> is a series of binary numbers used to distinguish between the network portion and the host portion of an address. A subnet mask is usually used alongside an IP address. A common example of a subnet mask notation is: 255.255.255.0<\/p>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<p>Suppose we have an IP address: 192.168.1.10 and a subnet mask: 255.255.255.0.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The 192.168.1 part is the <strong>network address<\/strong><\/li>\n\n\n\n<li>The .10 part is the <strong>host address (device)<\/strong><\/li>\n<\/ul>\n\n\n\n<p>In this way, the subnet mask helps network devices determine whether the destination IP is within the same network or in a different one.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Function of Subnet Mask<\/h3>\n\n\n\n<p>The function of a subnet mask is to maintain the performance and efficiency of the network. In addition, here are some important functions of the subnet mask to note:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Dividing large networks into smaller networks (subnets)<\/strong><br>This helps make network management more efficient and easier to control.<\/li>\n\n\n\n<li><strong>Identifying network and host portions<\/strong><br>The subnet mask separates which part of the IP address indicates the network and which part indicates the host. The IP address identifies the network location of a device, while the host identifies individual devices (hosts) within that network.<\/li>\n\n\n\n<li><strong>Improving network security<\/strong><br>By dividing the network into smaller subnets, unauthorized access to the entire network can be minimized. This helps prevent cyber attacks.<\/li>\n\n\n\n<li><strong>Reducing network traffic (broadcast domain)<\/strong><br>Since each subnet has its own broadcast domain, broadcast traffic is limited to that specific subnet.<\/li>\n\n\n\n<li><strong>Optimizing IP address usage<\/strong><br>In large organizations, subnet masks allow more efficient and economical IP allocation.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Differences Between IPv4 and IPv6 Subnet Masks<\/h3>\n\n\n\n<p>Understanding subnet masks is essential for proper network addressing. As technology evolves and the need for a larger address space increases, IP protocols have evolved from IPv4 to IPv6.<\/p>\n\n\n\n<p>Although both have the same basic function in identifying networks and devices, there are fundamental differences in how subnet masks work and are structured in IPv4 and IPv6. The following comparison table discusses the differences:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Aspect<\/th><th>IPv4<\/th><th>IPv6<\/th><\/tr><\/thead><tbody><tr><td>Address Format<\/td><td>32-bit (e.g., 192.168.1.1)<\/td><td>128-bit (e.g., 2001:0db8:85a3::8a2e:0370:7334)<\/td><\/tr><tr><td>Subnet Representation<\/td><td>Uses CIDR Notation or subnet mask (e.g., 255.255.255.0 or \/24)<\/td><td>Uses only CIDR Notation (e.g., \/64)<\/td><\/tr><tr><td>Subnet Mask Notation<\/td><td>Written in decimal format (e.g., 255.255.255.0)<\/td><td>No numeric mask used (no ffff:ffff:ffff&#8230;)<\/td><\/tr><tr><td>Subnet Mask Usage<\/td><td>Used to distinguish between network and host in an IP address<\/td><td>\/64 CIDR is commonly used; subnetting is done using prefix length<\/td><\/tr><tr><td>Number of Addresses per Subnet<\/td><td>Limited (~4.3 billion addresses max)<\/td><td>Extremely large (2^128 IP addresses)<\/td><\/tr><tr><td>Subnet Calculation<\/td><td>Uses binary bits from subnet mask<\/td><td>Uses prefix length (e.g., \/64, \/56, \/48)<\/td><\/tr><tr><td>Subnetting Purpose<\/td><td>Efficient IP allocation through small-scale network segmentation<\/td><td>Focused on network structure and management, not address efficiency<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Also Read : <a href=\"https:\/\/it.telkomuniversity.ac.id\/en\/ipv6-vs-ipv4\/\" target=\"_blank\" rel=\"noreferrer noopener\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#cf2e2e\" class=\"has-inline-color\">IPv4 vs IPv6<\/mark><\/a><\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Is Subnetting Suitable for All IP Addresses?<\/h3>\n\n\n\n<p>A common question is: is subnetting suitable for all IP addresses?<\/p>\n\n\n\n<p>The answer depends on the type of IP address used and the network scale. Here&#8217;s an explanation:<\/p>\n\n\n\n<p><strong>Types of IP Addresses:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Public IPs:<\/strong> Usually used for internet connectivity. Subnetting can still be used to separate departments in large organizations.<\/li>\n\n\n\n<li><strong>Private IPs:<\/strong> Such as 192.168.x.x, 10.x.x.x, 172.16.x.x \u2013 172.31.x.x. Subnetting is commonly used in local area networks (LANs).<\/li>\n<\/ul>\n\n\n\n<p><strong>When Subnetting is Not Suitable:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Very small networks (e.g., only 2\u20133 devices) may not require subnetting.<\/li>\n\n\n\n<li>Older systems or applications that do not support efficient subnet grouping.<\/li>\n<\/ul>\n\n\n\n<p>However, in general, subnetting is suitable and beneficial for almost all networks, from small-scale to enterprise-level.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to Calculate a Subnet Mask<\/h3>\n\n\n\n<p>For those who want to understand how to calculate a subnet mask, here is the step-by-step explanation:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Convert IP Address and Subnet Mask to Binary<\/strong><\/h3>\n\n\n\n<p>Example:<br>IP Address = 192.168.1.10<br>Subnet Mask = 255.255.255.0<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"586\" src=\"https:\/\/it.telkomuniversity.ac.id\/wp-content\/uploads\/2025\/05\/Konversi-IP-Address-dan-Subnet-Mask-ke-Biner-1024x586.png\" alt=\"Convert IP Address and Subnet Mask to Binary\" class=\"wp-image-177376\" srcset=\"https:\/\/it.telkomuniversity.ac.id\/wp-content\/uploads\/2025\/05\/Konversi-IP-Address-dan-Subnet-Mask-ke-Biner-1024x586.png 1024w, https:\/\/it.telkomuniversity.ac.id\/wp-content\/uploads\/2025\/05\/Konversi-IP-Address-dan-Subnet-Mask-ke-Biner-300x172.png 300w, https:\/\/it.telkomuniversity.ac.id\/wp-content\/uploads\/2025\/05\/Konversi-IP-Address-dan-Subnet-Mask-ke-Biner-768x439.png 768w, https:\/\/it.telkomuniversity.ac.id\/wp-content\/uploads\/2025\/05\/Konversi-IP-Address-dan-Subnet-Mask-ke-Biner-1536x879.png 1536w, https:\/\/it.telkomuniversity.ac.id\/wp-content\/uploads\/2025\/05\/Konversi-IP-Address-dan-Subnet-Mask-ke-Biner-2048x1172.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Get the Network Address<\/strong><\/h3>\n\n\n\n<p>Perform an AND operation between the IP Address and Subnet Mask:<\/p>\n\n\n\n<p>Result = 192.168.1.0<br>This is the <strong>Network Address<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"586\" src=\"https:\/\/it.telkomuniversity.ac.id\/wp-content\/uploads\/2025\/05\/Operasi-AND-pada-IP-Address-dan-Subnet-Mask-1024x586.png\" alt=\"AND operation between the IP Address and Subnet Mask\" class=\"wp-image-177378\" srcset=\"https:\/\/it.telkomuniversity.ac.id\/wp-content\/uploads\/2025\/05\/Operasi-AND-pada-IP-Address-dan-Subnet-Mask-1024x586.png 1024w, https:\/\/it.telkomuniversity.ac.id\/wp-content\/uploads\/2025\/05\/Operasi-AND-pada-IP-Address-dan-Subnet-Mask-300x172.png 300w, https:\/\/it.telkomuniversity.ac.id\/wp-content\/uploads\/2025\/05\/Operasi-AND-pada-IP-Address-dan-Subnet-Mask-768x439.png 768w, https:\/\/it.telkomuniversity.ac.id\/wp-content\/uploads\/2025\/05\/Operasi-AND-pada-IP-Address-dan-Subnet-Mask-1536x879.png 1536w, https:\/\/it.telkomuniversity.ac.id\/wp-content\/uploads\/2025\/05\/Operasi-AND-pada-IP-Address-dan-Subnet-Mask-2048x1172.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3: Calculate the Number of Available Hosts<\/strong><\/h3>\n\n\n\n<p>Using subnet mask 255.255.255.0, which is \/24, you can use a CIDR-to-host table for quick reference:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>CIDR<\/th><th>Subnet Mask<\/th><th>Usable Hosts<\/th><\/tr><\/thead><tbody><tr><td>\/30<\/td><td>255.255.255.252<\/td><td>2<\/td><\/tr><tr><td>\/29<\/td><td>255.255.255.248<\/td><td>6<\/td><\/tr><tr><td>\/28<\/td><td>255.255.255.240<\/td><td>14<\/td><\/tr><tr><td>\/27<\/td><td>255.255.255.224<\/td><td>30<\/td><\/tr><tr><td>\/26<\/td><td>255.255.255.192<\/td><td>62<\/td><\/tr><tr><td>\/25<\/td><td>255.255.255.128<\/td><td>126<\/td><\/tr><tr><td>\/24<\/td><td>255.255.255.0<\/td><td>254<\/td><\/tr><tr><td>\/23<\/td><td>255.255.254.0<\/td><td>510<\/td><\/tr><tr><td>\/22<\/td><td>255.255.252.0<\/td><td>1022<\/td><\/tr><tr><td>\/16<\/td><td>255.255.0.0<\/td><td>65,534<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Host Count = 2^number of host bits &#8211; 2<\/strong><\/p>\n\n\n\n<p>Example: \/24 = 32 &#8211; 24 = 8 bits for host<br>Host = 2^8 &#8211; 2 = 256 &#8211; 2 = <strong>254 hosts<\/strong><br>(-2 for one network address and one broadcast address)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Another Example<\/strong><\/h3>\n\n\n\n<p>IP = 10.0.0.1 with subnet mask \/16<br>\/16 = 255.255.0.0<br>Host bits = 32 &#8211; 16 = 16<br>Hosts = 2^16 &#8211; 2 = <strong>65,534 hosts<\/strong><\/p>\n\n\n\n<p>So, one \/16 subnet can support 65,534 hosts such as printers, computers, routers, servers, or IP cameras.<\/p>\n\n\n\n<p><strong>See Also: <a href=\"http:\/\/Is Subnetting Suitable for All IP Addresses?\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#cf2e2e\" class=\"has-inline-color\">What is SSL<\/mark><\/a><\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to Use Subnet Masks Properly?<\/h3>\n\n\n\n<p>Using subnet masks should align with the network\u2019s needs to avoid IP address waste or device conflicts.<\/p>\n\n\n\n<p><strong>Efficient Subnet Mask Usage Tips:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Match the number of devices:<\/strong> Don\u2019t use a subnet for 254 hosts if only 10 devices are needed.<\/li>\n\n\n\n<li><strong>Separate networks by function or location:<\/strong> For example, one subnet for finance division, another for HR, etc.<\/li>\n\n\n\n<li><strong>Consider network growth scale:<\/strong> Use a subnet mask that allows future expansion without major reconfiguration.<\/li>\n\n\n\n<li><strong>Use CIDR (Classless Inter-Domain Routing):<\/strong> Allows more flexible subnetting than traditional IP classes.<\/li>\n<\/ul>\n\n\n\n<p><strong>Best Practices:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use <strong>network documentation<\/strong> to record each subnet.<\/li>\n\n\n\n<li>Assign IP addresses consistently, such as assigning the gateway to the first IP of each subnet.<\/li>\n\n\n\n<li>Avoid overlapping IP addresses across different subnets.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Is This Technique Suitable for All IP Address Classes?<\/h3>\n\n\n\n<p>In theory, subnetting can be applied to almost all IP addresses, whether Class A, B, or C. However, there are practical limitations.<\/p>\n\n\n\n<p><strong>Application by IP Class:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Class A (1.0.0.0 \u2013 126.0.0.0):<\/strong><br>Very large. Typically used by large organizations. Subnetting is highly recommended for efficiency.<\/li>\n\n\n\n<li><strong>Class B (128.0.0.0 \u2013 191.255.0.0):<\/strong><br>Medium size. Subnetting helps grouping by office branches or departments.<\/li>\n\n\n\n<li><strong>Class C (192.0.0.0 \u2013 223.255.255.0):<\/strong><br>Most commonly used in small to medium networks. Subnetting helps in isolating broadcast and managing IPs.<\/li>\n<\/ul>\n\n\n\n<p><strong>Implementation Barriers:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Legacy systems that are not compatible with subnetting.<\/li>\n\n\n\n<li>Low-end networking devices that do not support dynamic subnet configuration.<\/li>\n<\/ul>\n\n\n\n<p>However, with today\u2019s modern network technology, almost all devices support flexible subnet mask configuration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<p>A <strong>subnet mask<\/strong> is a key component in managing modern computer networks by dividing large networks into smaller subnets. By understanding what a subnet mask is, its functions, and how to calculate it, we can build efficient, secure, and scalable network systems.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Referensi<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Forouzan, B. A. (2013). <em>Data Communications and Networking<\/em> (5th ed.). New York: McGraw-Hill Education.<\/li>\n\n\n\n<li>Kurose, J. F., &amp; Ross, K. W. (2017). <em>Computer Networking: A Top-Down Approach<\/em> (7th ed.). Boston: Pearson Education.<\/li>\n\n\n\n<li>Tanenbaum, A. S., &amp; Wetherall, D. J. (2010). <em>Computer Networks<\/em> (5th ed.). Boston: Pearson.<\/li>\n\n\n\n<li>Odom, W. (2020). <em>CCNA 200-301 Official Cert Guide, Volume 1<\/em>. Indianapolis: Cisco Press.<\/li>\n\n\n\n<li>Dean, T. (2015). <em>Network+ Guide to Networks<\/em> (7th ed.). Boston: Cengage Learning.<\/li>\n\n\n\n<li>Lammle, T. (2021). <em>CompTIA Network+ Study Guide<\/em> (Exam N10-008). Hoboken: Wiley.<\/li>\n\n\n\n<li>ScienceDirect. (2009). <em>Masker Subnet<\/em>. Dalam Ilmu Komputer. Diakses dari <a href=\"https:\/\/www.sciencedirect.com\/topics\/computer-science\/subnet-mask\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">https:\/\/www.sciencedirect.com\/topics\/computer-science\/subnet-mask<\/a><\/li>\n<\/ul>\n\n\n\n<p>Authors : Indah Ayu Putri Purnama, Meilina Eka Ayuningtyas<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n","protected":false},"excerpt":{"rendered":"<p>Almost all aspects of life depend on data communication in an increasingly advanced digital era. Computer networks are essential for communication in education, business, and government. The term subnet mask is crucial in this network structure, especially for IP addressing and efficient network distribution. Subnet mask is an important component of network configuration that helps [&hellip;]<\/p>\n","protected":false},"author":32,"featured_media":177382,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":182,"footnotes":""},"categories":[182,2828,2892],"tags":[3829,3830,3831,3832,3833,3834,3835,3836,3837,3838,3839,3840,3841,3842,3843],"class_list":["post-177384","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs-en","category-networking","category-infrastructure","tag-cidr-notation-en","tag-how-to-subnet-en","tag-ip-addressing-en","tag-ipv4-subnet-en","tag-ipv6-subnet-en","tag-network-configuration-2-en","tag-network-mask-en","tag-subnet-calculator-en","tag-subnet-mask-en","tag-subnet-mask-examples-en","tag-subnet-mask-explained-en","tag-subnet-mask-vs-ip-address-en","tag-subnetting-en","tag-subnetting-tutorial-en","tag-what-is-subnet-mask-en"],"blocksy_meta":[],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/it.telkomuniversity.ac.id\/en\/wp-json\/wp\/v2\/posts\/177384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it.telkomuniversity.ac.id\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it.telkomuniversity.ac.id\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it.telkomuniversity.ac.id\/en\/wp-json\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/it.telkomuniversity.ac.id\/en\/wp-json\/wp\/v2\/comments?post=177384"}],"version-history":[{"count":0,"href":"https:\/\/it.telkomuniversity.ac.id\/en\/wp-json\/wp\/v2\/posts\/177384\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/it.telkomuniversity.ac.id\/en\/wp-json\/wp\/v2\/media\/177382"}],"wp:attachment":[{"href":"https:\/\/it.telkomuniversity.ac.id\/en\/wp-json\/wp\/v2\/media?parent=177384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it.telkomuniversity.ac.id\/en\/wp-json\/wp\/v2\/categories?post=177384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it.telkomuniversity.ac.id\/en\/wp-json\/wp\/v2\/tags?post=177384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}