What is a Subnet?
In IP networking, a subnet, short for subnetwork, is an identifiable separate part of an organization’s network. Typically, a subnet may represent all the machines at one geographic location, in one building, or on the same local area network (LAN). Subnetting allows an organization’s network to be divided into multiple smaller, interconnected networks, which can improve the network’s efficiency and performance. For example, a company with a Class A network address could use subnetting to create subnetworks that segment the network for different offices around the world.
Network Administrator Career Path
This comprehensive training series is designed to provide both new and experienced network administrators with a robust skillset enabling you to manager current and networks of the future.
Subnet Cheat Sheets
Cheat sheets for subnetting are incredibly handy for network professionals. They often include information such as the number of possible subnets, the number of host addresses available in each subnet, the binary mask, the hexadecimal representation, and the wildcard mask. For instance, a cheat sheet might note that a /24 subnet provides 256 IP addresses (254 usable) with a subnet mask of 255.255.255.0. Here’s a quick reference for common subnet masks:
Subnet Mask Formats
- CIDR Notation: The most common format, e.g., /24.
- Dotted Decimal: Traditional format, e.g., 255.255.255.0.
IP Address Classes
- Class A: 1.0.0.0 to 126.0.0.0 (1.0.0.0/8).
- Class B: 128.0.0.0 to 191.255.0.0 (128.0.0.0/16).
- Class C: 192.0.0.0 to 223.255.255.0 (192.0.0.0/24).
- Class D (Multicast): 224.0.0.0 to 239.255.255.255.
- Class E (Experimental): 240.0.0.0 to 255.255.255.255.
Private IP Address Ranges
- Class A: 10.0.0.0 to 10.255.255.255 (10.0.0.0/8).
- Class B: 172.16.0.0 to 172.31.255.255 (172.16.0.0/12).
- Class C: 192.168.0.0 to 192.168.255.255 (192.168.0.0/16).
Subnetting Basics
- Subnet: A smaller network created from a larger network.
- Subnet Mask: Determines the network and host portions.
- Hosts per Subnet: Calculated as 2^(32 – subnet mask bits).
Subnet Mask Cheat Sheet
Subnet Mask | CIDR Notation | Usable IPs | Total IPs | Network Class |
---|---|---|---|---|
255.255.255.255 | /32 | 1 | 1 | Single Host |
255.255.255.254 | /31 | 2 | 2 | Point-to-Point |
255.255.255.252 | /30 | 4 | 4 | Small Network |
255.255.255.248 | /29 | 6 | 8 | Small Network |
255.255.255.240 | /28 | 14 | 16 | Small Network |
255.255.255.224 | /27 | 30 | 32 | Small Network |
255.255.255.192 | /26 | 62 | 64 | Small Network |
255.255.255.128 | /25 | 126 | 128 | Small Network |
255.255.255.0 | /24 | 254 | 256 | Class C |
255.255.254.0 | /23 | 510 | 512 | Extended Class C |
255.255.252.0 | /22 | 1022 | 1024 | Small Network |
255.255.248.0 | /21 | 2046 | 2048 | Small Network |
255.255.240.0 | /20 | 4094 | 4096 | Small Network |
255.255.224.0 | /19 | 8190 | 8192 | Small Network |
255.255.192.0 | /18 | 16382 | 16384 | Small Network |
255.255.128.0 | /17 | 32766 | 32768 | Small Network |
255.255.0.0 | /16 | 65534 | 65536 | Class B |
255.254.0.0 | /15 | 131070 | 131072 | Extended Class B |
255.252.0.0 | /14 | 262142 | 262144 | Extended Class B |
255.248.0.0 | /13 | 524286 | 524288 | Extended Class B |
255.240.0.0 | /12 | 1048574 | 1048576 | Extended Class B |
255.224.0.0 | /11 | 2097150 | 2097152 | Extended Class B |
255.192.0.0 | /10 | 4194302 | 4194304 | Extended Class B |
255.128.0.0 | /9 | 8388606 | 8388608 | Extended Class B |
255.0.0.0 | /8 | 16777214 | 16777216 | Class A |
254.0.0.0 | /7 | 33554430 | 33554432 | Extended Class A |
252.0.0.0 | /6 | 67108862 | 67108864 | Extended Class A |
248.0.0.0 | /5 | 134217726 | 134217728 | Extended Class A |
240.0.0.0 | /4 | 268435454 | 268435456 | Extended Class A |
224.0.0.0 | /3 | 536870910 | 536870912 | Extended Class A |
192.0.0.0 | /2 | 1073741822 | 1073741824 | Extended Class A |
128.0.0.0 | /1 | 2147483646 | 2147483648 | Extended Class A |
Example Subnetting
- Given IP: 192.168.1.0/24
- Subnet Mask: 255.255.255.0
- Usable IPs: 192.168.1.1 to 192.168.1.254
- Network Address: 192.168.1.0
- Broadcast Address: 192.168.1.255
VLSM (Variable Length Subnet Masking)
- Allocate different-sized subnets to different network segments.
Supernetting
- Combine multiple smaller subnets into a larger one.
Subnetting Tools
- Online Subnet Calculators (e.g., subnetmask.info)
- Command Line Tools (e.g., ipcalc, subnetcalc)
IP Calculators and Tools
There are numerous IP calculators and tools available online and for download. A popular example is the subnet calculator provided by SolarWinds, which allows you to input an IP address and subnet mask to receive detailed information about the network. These tools are invaluable for network engineers and IT professionals when designing and troubleshooting IP addressing and subnetting.
Subnet Calculations Explained
Subnet calculations are at the heart of network design. Here are some examples:
- /24 Subnet Mask: With a mask of 255.255.255.0, this is a standard default subnet mask for many networks, allowing for up to 256 IP addresses.
- /28 Subnet Mask: This mask of 255.255.255.240 is used for smaller subnets within a larger network and is perfect for networks with up to 16 devices.
- /29 Subnet Mask: With a mask of 255.255.255.248, this allows for 8 IP addresses, which is useful for segmenting a small group of hosts.
- /26 Subnet Mask: A 255.255.255.192 mask provides 64 IP addresses, suitable for a small to medium-sized office.
- /30 Subnet Mask: The 255.255.255.252 mask is used for point-to-point links, providing just 2 usable IP addresses.
Cisco Network Enginner Career Path
Targeting Cisco specific Networks, this Cisco Network Engineer Training series provides in-depth curriculum for those wanting to learn networking basics and advance his/her career opportunities as a Cisco Network Engineer.
Understanding Network Masks
The network mask is synonymous with the subnet mask and is critical for determining the network portion of an IP address. It’s used to segregate networks at the IP level.
Example: The subnet mask 255.255.255.0 for an IP address 192.168.0.1 tells us that the network portion is 192.168.0 and the host portion is .1.
Calculating Netmasks
To calculate a netmask, you need to understand the binary representation of an IP address. The netmask is applied to separate the network identifier from the host identifier within an IP address.
Example: A netmask of 255.255.255.0 applied to the IP address 10.0.0.1 would result in a network identifier of 10.0.0.0.
Online Subnet Calculators
Online subnet calculators provide a quick and error-free method for performing subnet calculations. These tools are accessible from any device with internet access and do not require the user to perform manual calculations.
Example: By entering the IP address and selecting a subnet size, such as /26, an online calculator will display the subnet network address, broadcast address, and available IP addresses.
Key Term Knowledge Base: Key Terms Related to Subnetting and Networking
Understanding key terms in subnetting and networking is crucial for anyone working in or interested in the field of network administration, cybersecurity, or IT infrastructure. Subnetting is a core concept in managing and organizing network traffic, ensuring efficient use of IP addresses, and enhancing network security. Familiarity with these terms will help in understanding network design, troubleshooting, and optimizing network performance.
Term | Definition |
---|---|
Subnet | A segmented part of a network, created by dividing a network into two or more networks. |
IP Address | A unique identifier for a device on a network, following the Internet Protocol standard. |
IPv4 | The fourth version of the Internet Protocol, using a 32-bit address scheme. |
IPv6 | The sixth version of the Internet Protocol, featuring a 128-bit address scheme for increased address space. |
Subnet Mask | A 32-bit number used to divide an IP address into network and host portions. |
CIDR (Classless Inter-Domain Routing) | A method for allocating IP addresses and routing that replaces the older system based on classes A, B, and C. |
Network Address | The first address in a subnet, used to identify the network itself. |
Broadcast Address | The last address in a subnet, used to communicate with all devices on that subnet. |
Default Gateway | A network node that serves as an access point or IP router to pass traffic from a local network to other networks. |
DHCP (Dynamic Host Configuration Protocol) | A network management protocol used to automate the process of configuring devices on IP networks. |
DNS (Domain Name System) | The hierarchical and decentralized naming system for computers, services, or other resources connected to the Internet or a private network. |
Routing | The process of selecting paths in a network along which to send network traffic. |
Router | A networking device that forwards data packets between computer networks. |
Switch | A networking device that connects devices together on a computer network, using packet switching to receive, process, and forward data to the destination device. |
NAT (Network Address Translation) | A method of remapping one IP address space into another by modifying network address information in the IP header of packets while they are in transit across a traffic routing device. |
VLAN (Virtual Local Area Network) | A logical subgroup within a local area network that can group together a collection of devices from different physical LAN segments. |
ICMP (Internet Control Message Protocol) | Used by network devices, like routers, to send error messages and operational information. |
TCP/IP (Transmission Control Protocol/Internet Protocol) | A set of communication protocols used to interconnect network devices on the internet. |
UDP (User Datagram Protocol) | A communication protocol used for time-sensitive transmissions such as video playback or DNS lookups. |
Network Topology | The arrangement of the elements (links, nodes, etc.) of a communication network. |
This list covers fundamental concepts in subnetting and networking, providing a solid foundation for further exploration and understanding in this field.
Frequently Asked Questions Related to Subnets
What is subnetting, and why is it important in networking?
Subnetting is the process of dividing a large IP network into smaller, manageable subnetworks or subnets. It is essential in networking to efficiently allocate IP addresses, reduce network congestion, and improve security by isolating segments of a network. Subnetting also helps in optimizing routing and managing IP address space effectively.
How do I determine the number of hosts in a subnet?
To calculate the number of hosts in a subnet, you can use the formula 2^(32 – subnet mask bits). For example, with a subnet mask of /24 (255.255.255.0), you have 2^(32 – 24) = 2^8 = 256 possible host addresses, subtracting the network address and the broadcast address.
What is a subnet mask, and how does it work?
A subnet mask is a 32-bit numeric address that is used to divide an IP address into network and host portions. It consists of ones (1) in the network portion and zeros (0) in the host portion. When an IP address is “ANDed” with its corresponding subnet mask, the result is the network address, which helps routers determine how to forward packets within a network.
What is CIDR notation, and how is it used in subnetting?
CIDR (Classless Inter-Domain Routing) notation is a compact way to represent IP address ranges and subnet masks. It includes the IP address followed by a forward slash and a number indicating the number of network bits (e.g., 192.168.1.0/24). CIDR notation simplifies subnetting by specifying both the network address and the subnet mask in a concise format.
What is VLSM (Variable Length Subnet Masking), and why is it valuable in network design?
VLSM is a subnetting technique that allows network administrators to allocate subnets with different subnet mask lengths within the same larger network. This flexibility is valuable in network design because it enables efficient utilization of IP address space by allocating larger subnets to segments with more hosts and smaller subnets to those with fewer hosts, reducing IP address waste.