Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support. This article is intended as a general introduction to the concepts of Internet Protocol IP networks and subnetting.
A glossary is included at the end of article. These networks are arbitrarily defined into three main classes along with a few others that have predefined sizes. Each of them can be divided into smaller subnetworks by system administrators.
A subnet mask is used to divide an IP address into two parts. One part identifies the host computer , the other part identifies the network to which it belongs. To better understand how IP addresses and subnet masks work, look at an IP address and see how it's organized. An IP address is a bit number. IP addresses are normally expressed in dotted-decimal format, with four numbers separated by periods, such as To understand how subnet masks are used to distinguish between hosts, networks, and subnetworks, examine an IP address in binary notation.
For example, the dotted-decimal IP address This number may be hard to make sense of, so divide it into four parts of eight binary digits. These 8-bit sections are known as octets. The example IP address, then, becomes This number only makes a little more sense, so for most uses, convert the binary address into dotted-decimal format The decimal numbers separated by periods are the octets converted from binary to decimal notation.
Routers only know what network the host is a member of and use information stored in their route table to determine how to get the packet to the destination host's network. After the packet is delivered to the destination's network, the packet is delivered to the appropriate host. For this process to work, an IP address has two parts. The first part of an IP address is used as a network address, the last part as a host address. If you take the example Unless you have more information, the network and host addresses above can't be determined.
This information is supplied in another bit number called a subnet mask. The subnet mask is It isn't obvious what this number means unless you know in binary notation equals So, the subnet mask is Lining up the IP address and the subnet mask together, the network, and host portions of the address can be separated:.
The first 24 bits the number of ones in the subnet mask are identified as the network address. The last 8 bits the number of remaining zeros in the subnet mask are identified as the host address. It gives you the following addresses:. So now you know, for this example using a When a packet arrives on the Almost all decimal subnet masks convert to binary numbers that are all ones on the left and all zeros on the right.
Some other common subnet masks are:. Decimal Binary These IP addresses are divided into classes. The most common of them are classes A, B, and C. Classes D and E exist, but aren't used by end users. Each of the address classes has a different default subnet mask. You can identify the class of an IP address by looking at its first octet. These tools may provide information such as IP range, IP address, subnet mask, and network address. In this situation, the IP address is followed by the number of bits in the mask.
For example:. Blog Contact Support. Request a Demo. Subnet Mask Definition Every device has an IP address with two pieces: the client or host address and the server or network address. IP Address Classes and Subnet Masks Since the internet must accommodate networks of all sizes, an addressing scheme for a range of networks exists based on how the octets in an IP address are broken down.
How Does Subnetting Work? What Is a Subnet Mask Calculator? Use a HEX Subnet Calculator to calculate the first and last subnet addresses, including the hexadecimal notations of multicast addresses.
A simple IP Subnet Mask Calculator determines the smallest available corresponding subnet and subnet mask. For example: Featured Resources White Papers. Learn about how Avi's elastic container services integrate with Kubernetes clusters.
View Now. White Papers. There are five different classes of networks, A to E. This document focuses on classes A to C, since classes D and E are reserved and discussion of them is beyond the scope of this document.
Note : Also note that the terms "Class A, Class B" and so on are used in this document in order to help facilitate the understanding of IP addressing and subnetting. These terms are rarely used in the industry anymore because of the introduction of classless interdomain routing CIDR. Given an IP address, its class can be determined from the three high-order bits the three left-most bits in the first octet.
Figure 1 shows the significance in the three high order bits and the range of addresses that fall into each class. For informational purposes, Class D and Class E addresses are also shown. In a Class A address, the first octet is the network portion, so the Class A example in Figure 1 has a major network address of 1.
Class A addresses are used for networks that have more than 65, hosts actually, up to hosts! In a Class B address, the first two octets are the network portion, so the Class B example in Figure 1 has a major network address of Octets 3 and 4 16 bits are for local subnets and hosts. Class B addresses are used for networks that have between and hosts. In a Class C address, the first three octets are the network portion. The Class C example in Figure 1 has a major network address of Octet 4 8 bits is for local subnets and hosts - perfect for networks with less than hosts.
A network mask helps you know which portion of the address identifies the network and which portion of the address identifies the node. Class A, B, and C networks have default masks, also known as natural masks, as shown here:. In order to see how the mask helps you identify the network and node parts of the address, convert the address and mask to binary numbers. Once you have the address and the mask represented in binary, then identification of the network and host ID is easier. Any address bits which have corresponding mask bits set to 1 represent the network ID.
Any address bits that have corresponding mask bits set to 0 represent the node ID. Subnetting allows you to create multiple logical networks that exist within a single Class A, B, or C network. If you do not subnet, you are only able to use one network from your Class A, B, or C network, which is unrealistic. Each data link on a network must have a unique network ID, with every node on that link being a member of the same network. If you break a major network Class A, B, or C into smaller subnetworks, it allows you to create a network of interconnecting subnetworks.
In order to subnet a network, extend the natural mask with some of the bits from the host ID portion of the address in order to create a subnetwork ID. For example, given a Class C network of By extending the mask to be With these three bits, it is possible to create eight subnets. With the remaining five host ID bits, each subnet can have up to 32 host addresses, 30 of which can actually be assigned to a device since host ids of all zeros or all ones are not allowed it is very important to remember this.
So, with this in mind, these subnets have been created. Note : There are two ways to denote these masks. First, since you use three bits more than the "natural" Class C mask, you can denote these addresses as having a 3-bit subnet mask.
Or, secondly, the mask of This second method is used with CIDR. For example, The network subnetting scheme in this section allows for eight subnets, and the network might appear as:.
Notice that each of the routers in Figure 2 is attached to four subnetworks, one subnetwork is common to both routers. Also, each router has an IP address for each subnetwork to which it is attached. Each subnetwork could potentially support up to 30 host addresses. This brings up an interesting point. The more host bits you use for a subnet mask, the more subnets you have available. However, the more subnets available, the less host addresses available per subnet.
For example, a Class C network of If you use a mask of Since you now have four bits to make subnets with, you only have four bits left for host addresses. So in this case you can have up to 16 subnets, each of which can have up to 16 host addresses 14 of which can be assigned to devices. Take a look at how a Class B network might be subnetted. If you have network Extending the mask to anything beyond You can quickly see that you have the ability to create a lot more subnets than with the Class C network.
You use five bits from the original host bits for subnets.
0コメント