How to learn ip addressing and subnetting

how to learn ip addressing and subnetting

Classless Inter-Domain Routing

Aug 10,  · This document provides basic information needed in order to configure your router for routing IP, such as how addresses are broken down and how subnetting works. You learn how to assign each interface on the router an IP address with a unique subnet. There are examples included in order to help tie everything together. Prerequisites Requirements. Learn the basics of IPv4 addressing with this unlimited supply of exercises. These basic exercises walk your through the structure of an IPv4 address and subnetmasks. Practice with classful and classless IP addresses, calculate the network and broadcast addresses, and determine whether a host is .

This document provides basic information needed in order to configure your router for routing IP, such as how addresses are broken down and how subnetting works. You learn how to assign each interface on the router an IP address with a unique subnet.

There are examples included in order to help tie everything together. The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared default configuration. If your network is live, make sure that you understand the potential impact of any command.

Address - The unique number ID assigned to one host or interface in a network. Subnet - A portion of a network that shares a particular subnet address. Subnet mask - A bit combination used to describe which portion of an address refers to the subnet and which part refers to the host. If you do not plan to connect to the Internet, Cisco strongly suggests that you use reserved addresses from RFC An IP address is an address used in order to uniquely identify a device on an IP network.

The address is made up of 32 binary bits, which can be divisible into a network portion and host portion with the help of a subnet mask. Each octet is converted to decimal and separated by a period dot.

For this reason, an IP address is said to be expressed in dotted decimal format for example, The value in each octet ranges from 0 to decimal, or - binary. Here is how binary octets convert to decimal: The right most bit, or least significant bit, of an octet holds a value of 2 0. The bit just to the left of that holds how to learn ip addressing and subnetting value of 2 1. This continues until the left-most bit, or most significant bit, which holds a value of 2 7.

So if all binary bits are a one, the decimal equivalent would be as shown here:. These octets are broken down to provide an addressing scheme that can accommodate large and small networks. There how to learn ip addressing and subnetting 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" what stores sell air yeezy 2 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 how to remove ingrown hair scars on face 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 what is the best gps brand to buy allows what is contextual analysis in art 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 how to learn ip addressing and subnetting it is attached.

Each subnetwork could potentially support up to 30 host addresses. This brings up an interesting point. The more how to learn ip addressing and subnetting 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 how to troll your friend in minecraft from the original host bits for subnets.

This allows you to have 32 subnets 2 5. After using the five bits for subnetting, you are left with 11 bits for host addresses. This allows each subnet so have host addresses 2 11of which could be assigned to devices.

Note : In the past, there were limitations to the use of a subnet 0 all subnet bits are set to zero and all ones subnet all subnet bits set to one. Some devices would not allow the use of these subnets. Cisco Systems devices allow the use of these subnets when the ip subnet zero command is configured. Now that you have an understanding of subnetting, put this knowledge to use. Your task is to determine if these devices are on the same subnet or different subnets.

You can use how to learn ip addressing and subnetting address and mask of each device in order to determine to which subnet each address belongs.

Looking at the address bits that have a corresponding mask bit set to one, and setting all the other address bits to zero this is equivalent to performing a logical "AND" between the mask and addressshows you to which subnet this address belongs. In this case, DeviceA belongs to subnet Given the Class C network of Looking at the network shown in Figure 3you can see that you are required to create five subnets. The largest subnet must support 28 host addresses.

Is this possible with a Class C network? You can start by looking at the subnet requirement. In order to create the five needed subnets you would need to use three bits from the Class C host bits.

Two bits would only allow you four subnets 2 2. Since you need three subnet bits, that leaves you with five bits for the host portion of the address. How many hosts does this support? This meets the requirement. Therefore you have determined that it is possible to create this network with a Class C network.

An example of how you might assign the subnetworks is:. In all of the previous examples of subnetting, notice that the same subnet mask was applied for all the subnets. This means that each subnet has the same number of available host addresses.

You can need this in some cases, but, in most cases, having the same subnet mask for all subnets ends up wasting address space. For example, in the Sample Exercise 2 section, a class C network was split into eight equal-size subnets; however, each subnet did not utilize all available host addresses, which results in wasted address space.


uCertify offers courses, test prep, simulator, and virtual labs to prepare for Microsoft, Oracle, Cisco, CompTIA, CIW, Adobe, PMI, ISC2, Linux, and many more certification exams. These prep-kits come with the comprehensive study guide and interactive activities that offer % pass guarantee. The IP addressing scheme and Subnet Mask i.e Subnetting are the building blocks in defining the subnetworks and IPs within a large network. The need for IP addressing and Subnetting in the computer networking systems is explained in detail with simple examples. A subnetwork or subnet is a logical subdivision of an IP network.: 1,16 The practice of dividing a network into two or more networks is called subnetting. Computers that belong to the same subnet are addressed with an identical most-significant bit-group in their IP results in the logical division of an IP address into two fields: the network number or routing prefix and the.

Our knowledge of binary numbers leads us directly into the structure of IP addresses, and best practices in allocating them.

We are going to describe classful and classless operations, including use of subnets. Using real-life examples we will describe the process of calculating sudden host addresses. In doing so, we will describe the use of subnet masks, and how they are used by insistence and by routers.

You will actually get a chance to practice, subnet mask operations using class A, B, and C IP addresses. When talking about routing one tends to think about forwarding packets to remote destinations.

The immediate thought is WAN and the Internet; however, routing also makes sense in the campus network and even in smaller local area networks for the purposes of traffic segmentation. If we do not have routing, then we are talking about one flat network or flat topology where all devices belong to the same logical segment.

The only intelligence in filter mechanism would be a layer 2 switch, which forwards based on MAC addresses. MAC addresses have no hierarchical structure and we are still talking about a flat network. The more machines you add, and more devices you add, the more performance degradation you are going to experience.

Routers can be used in these scenarios to break the network into multiple broadcast domains or subnets. The advantages are not only on the performance side. With the segmentation like this in multiple subnets, overall traffic is reduced, each subnet is a broadcast domain and, therefore, broadcasts coming from engineering in this example would not touch manufacturing.

A router effectively stops local broadcasts; however, there are more advantages with the subnetting. You are breaking things into smaller pieces and this divide-and-conquer approach will make things easier to manage.

Also, you compartmentalize the network and then you can apply different polices to the different compartments. The router would be a policy in force or at that point, because it controls traffic from one subnet to the other, here also isolating network problems.

If something happens on one subnet, then the effect is mitigated even by the router in other subnets. Examples are also related to security. A denial of service attack may not reach other subnets if the router is acting as some sort of a firewall in the middle, regardless of the reason for subneting when we do we need to assign each subnet a different network or subnet ID and then hosts within that subnet would have a unique host ID portion of the IP address.

How can we tell which portion of the IP address is the network and which portion is the host? In classful routing, the class would tell us which bytes are dedicated to the network ID and which bytes are dedicated to the host. When we subnet a classful IP address, what we are doing is stealing bits from the host portion of the address and then making them part of the subnet portion of the address. We are effectively creating a third leg of the hierarchy. We are going to have the network defined by the class, but also a subnet and also then the host.

We are dividing networks into subnets and then subnets contain hosts. This is a hierarchy that is similar to our telephone numbering system; we have country codes and then city codes and then telephone numbers. Telephone numbers make sense within a city, which has a city code and the cities are part of a country. When we do this, we are talking about a classless environment. In classless routing, the class of the address no longer tells us what portion of the address is network, subnet, or host.

It is in the subnet mask, the one component that will tell us each section. In this context, then the mask is not similar to the Halloween masks that your kids may use. This is a mask that serves as a pair of glasses to look at the addresses differently. It is a measuring tool that tells you how far to look into the IP address to find the network piece, then the subnet piece, and then what is left is the host piece.

The subnet mask is going to be used by hosts, to identify traffic that goes outside of their own subnet, and it is also going to be used by routers to identify networks and subnets and be able to forward traffic toward those destinations.

In more specific terms, it is nothing more than a tool for borrowing bits, the example here is a class C network.

The classful paradigm tells us that the first three bytes of the address represent the network portion, whereas the last byte represents the host portion. Well, when subnetting, we want to create subnets out of the network; the network bytes are fixed and so we are going to need to use some of the bits dedicated to the host as subnet bits. One general rule here is that we are borrowing bits, in other words, the more bits we take from the host portion, the fewer hosts we are going to be able to represent.

But the more subnets we will have, how many subnets and how many hosts, it depends on the number of bits we borrow; it will also be a factor of powers of 2. In this class C example, we will call the number of borrowed bits S, and then that gives us H number of hosts, where H is nothing more than 8-S.

Again, the more subnet bits we borrow, the fewer hosts we are going to have and the total bits we have available to borrow in a class C is 8. With 1 bit, we are going to be able to represent 2 to the first power as a number of subnets that is 2 subnets.

That leaves us with the 7 bits for the host and that means possible hosts per subnet. Notice that 2 to the seventh power is , but we do have 2 reserved addresses, all 0s and all ls. Neither can be used as a host address because those are reserved; they represent the network itself and the broadcast. You can reach similar conclusions if you increase the number of bits borrowed.

The more bits you borrow, the more subnets you will have, the fewer hosts you will have. In this class B example, we have more room to borrow bits from the host portion.

But it follows the similar process and a similar logic. In this example, we borrow, let us say, 4 bits. That means we have room for 16 subnets out of the class B network; that leaves us with 12 bits for the host.

This time we have 16 available minus 4 and that is 12; 2 to the 12th power is , but we have to subtract the two reserved addresses and that gives us hosts for each one of the four subnets. The same goes for class A addresses. This time, we have a lot more bits to borrow and this is probably the most flexible one in terms of subnetting. That is probably why one of the most popular private IP addresses or network addresses is the network 10, the class A private address.

With that, you can actually borrow the whole second byte to represent your subnets and still you have a few thousand hosts available per subnet.

End systems and hosts will use the subnet mask to identify the network that they are located at in terms of the IP hierarchy. They will then compare that network with the destination address of their packets; if the destination matches their own network according to the mask, then they will try to send an ARP request in trying to obtain the MAC address of the destination.

It will then forward a packet straight to the destination in the local subnet. The router is the component that will take them to or forward their packets to the remote destination. The function of the subnet mask is the same in the case of routers, but the routers are going to use the information differently.

They will receive packets in understanding that they are responsible for forwarding them to the intended destination. They will use the mask to compare the destination IP with the known destinations in the routing table. Also, in this example, host A is trying to send packets to destination This time, They do not match, so host A will send the packet to the router.

That is how the packet reaches router B, which follows the same procedure and delivers the packet to the directly connected subnet. So when subnetting the network, we need to make sure of several things.

First, we need to plan our subnetting scheme and our subnetting strategy and steal as many bits from the host portion of the address as needed to represent the subnets that we have and the hosts that we have.

When that design portion is complete, then we need to allocate and assign the subnets to actual network segments. The subnet mask is a tool that will tell all devices, hosts, and routers how to read the destinations and how to forward packets accordingly.

We know why we need subnet masks, but what does one look like and how do we build them and design them? Well, a subnet mask will be nothing more than a 4-byte word similar to an IP address. In other words, it is a string of 32 bits, 1s or 0s. So the subnet mask looks like an IP address, but it is not, because along with the IP address to allow you to identify the host portion of the address, the subnet ID and the network portion of the address, in that sense, all 1s in the subnet mask indicate that the corresponding bits of the IP address is part of the network portion of the address.

All 0s in the subnet mask indicate that the corresponding bit of the IP address will be part of the host portion of the address. Now remember, we said that subnet masks are nothing more than a borrowing mechanism. We will shift the default mask to the right and borrowing bits from the host portion of the address, and so that results in one of the key features of the subnet mask, which is that the 1s are always consecutive and so are the 0s.

As we move down this diagram, then we will see that this makes sense in terms of our knowledge of the binary to decimal conversions. In the end, you also see that all 1s is number , which is the greatest subnet mask or representation of the subnet mask in decimal numbers for any byte.

That is why in the example below, 24 consecutive bits set to 1 results in the subnet mask This is starting to get annoying, so let us take a look at couple of examples. In the case of a class A address, the Well that is nothing more than We human beings are not only not too smart but also we tend to be a little lazy, and so instead of typing This gives you another feature of subnet masks.

When we subnet, we always start from the left and move to the right in defining the number of bits set to 1 that will give us the network and subnet IDs. Knowing that a subnet mask has 32 bits, all we need to know is how many bits are set to 1, because with that we know that the rest of the bits will be a consecutive string of 0s. Something similar happens in classes B and C. For class B, It is now time to look at this as a process in which we obtain an IP address from a registry authority like IANA or Internet Assigned Numbers Authority and then split it into multiple subnets.

We get one network; will need more than one, because most likely we do not have a flat structure or topology. The number of segments in our network will give us the number of subnets we need. It is time then to define a new subnet mask that extends the default mask to the right.

Well, we know that the subnet mask is nothing more than a borrowing tool and so we will go ahead and calculate the number of bits we need to borrow in order to represent the number of subnets required. Remember that every bit we borrow from the host will take away from the host number. The more subnets we have, the fewer hosts per subnet.

More articles in this category:
<- How to shrink a dollar bill - What continent is hawaii part of->

2 thoughts on “How to learn ip addressing and subnetting

Add a comment

Your email will not be published. Required fields are marked*