Welcome back during a re, and article we discussed how addresses are important devices need them in order that they know where to send their data IP addressing may be a good example of this is not only does it include the address of the device, but the address of the network that the device is therein means with one simple address we will find a tool on our local network or on the opposite side of the world IP addresses are available in two different flavors these are called ipv4 and ipv6 and that they look quite different ipv6 is newer but ipv4 remains more common, so we’re getting to focus our attention entirely on ipv4 for now firstly this is often what IP address seems like it’s four numbers separated by dots each of those numbers is named an octet as each number is an 8-bit value we break it up into four separate octets to form it easier for us humans oh and if you’re having trouble remembering one octet is consider an octopus is eight tentacles and octet has eight bits means these numbers can range from 0 to 255 meaning that IP address starts at 0 0 0 0 and ends at 255.255.255.255 we call a range of addresses the IP space straight away you’ll see that knowing how binary works is vital for IP addressing if you do not know a binary or if you would like a refresher I even have a video to assist I’ll add it to the outline IP addresses are literally two addresses in one the IP address is the address of the device, but it is also the address of the network that the device is in two addresses in one how is that this possible lets’s take a check out this sample IP address here 172.16.0.1 the primary part 172.16 refers to the network the second part 0.1 is the host address don‘t be concerned I’ll get to explaining how we all know the difference between the 2 soon all the hosts here that start with 1:7 2.16 are within the same network if we add more hosts and therefore, the IP addresses start with 1:7 2.17 then this is often a different network if hosts in several IP networks need to speak then we’ll get to be a router between them
You’re probably wondering is it always the primary half the address that represents the network short answer? no how then cans we know which a part of the IP addresses the network and which part is the host the solution to the present question strangely has changed over time, so let’s start back at the start, and we’ll work along from there when the web Protocol was first created the primary octet always represented the network and the subsequent three octets were used for hosts the most important value that we will get out of one octet is 255 meaning there was only room for 255 different networks on the opposite hand three octets meant there could be over 16 million hosts IPS in each network this sounds a touch unbalanced but within the beginning the web was not international, and there have been only a few organizations using it but because the internet began to grow it became obvious that this wouldn’t work for very long 255 networks just wasn‘t enough so back in 1981 a replacement method was introduced this broke the whole IP space into five, classes that’s Class A through to E Class A B and C were wont to address devices Class D is for multicast, and we’ll touch thereon a touch within the next video Class E is reserved for special purposes so Class A B and C are those we got to believe immediately there are little number of sophistication A network but each network supports an outsized number of hosts Class A works a touch just like the old method the primary octet is the network and therefore, the remaining three octets are for hosts. However the primary little of the network is usually 0 that leaves seven bits for us to allocate to our networks meaning there are 128 Class A networks with quite 16 million host IPS per Network the category A address base then is 0.000 through to at least one 27000 there’s a little catch with this though networks starting with 0 and 127 are reserved therefore the usable class area is really 1.000 to 120 6.000 Class B networks are used for a medium number of hosts the primary two octets are used for the network and therefore, the second two is used for host addresses the primary two bits of the network are always 1 0 which leaves 14 bits or 16384 possible networks each network can have the over 65,000 hosts the entire Class B IP space is from 1 28000 to 191 to 5500 Class C are small networks, but there are tons of them the primary 3 octets are only for the network the primary three bits are always 1 1 0 leaving 21 Network bits or a touch over 2 million networks with just one octet left though we will have only 256 hosts IP’s per Class C Network the address space ranges from 190 to 0 0 0 2 223 255 255 0 so to summarize Class A uses 1 octet – 1 bit for networks Class B uses two octets – 2 bits and eventually Class C uses 3 octets – 3 bits addresses outside this our classes D and E which are reserved for special uses if you are the quite person that likes the maths we will show this as an equation the amount of networks is 2 to the facility of n and is the amount of network bits so Class B has 14 network bits to the facility of 14 years 16384 an equivalent is true for hosts B has 16 bits four hosts two to the power of 16 is about 65,000 ready for some practices take a glance at these IP addresses which classes are they in time to seem at an example if device 18.104.22.168.1 wants to send a packet to 172 1602 it starts by watching the first few bits of the destination IP address because the first two bits are 1 0 it knows that this is often a category B address it can then assume that the primary 2 octets are the network and therefore, the last two is the host it sees that the destination network is 172.16 which is the same as its own as they’re within the same network, it can send traffic on to the destination now what if it wants to send a packet to 172.17.0 to 1 it does an equivalent thing, and it determines that the destination is on the 170 2.17 network this is often different to its own network, so it can’t send traffic directly, it must send traffic to a router first take the rehearsal from before a step further tell me which a part of “> a part of “> a part of each address is the host address.
Classless Networs and Subnets
because the internet began to grow we started consumption IP addresses faster and faster, and that we started running low on IP addresses again so in 1993 yet, one more new method was introduced it’s called classless inter-domain routing or cider previously we could identify IP address class by watching the primary few bits knowing the category we than knew which parts of the IP were for the network, and which parts were for the hosts, but now we throw all that away, and that we introduce something new the subnet mask the subnet mask is additionally made from four octet s– this lines up with the IP address bit for bit the bits set to at least one tell us which part of the IP address is the network the zero bits are used for hosts it is vital to note that each one ones continue the left, and every one the zeros go on the proper we never misunderstanding those and zeros during a subnet mask take a category A address for an example we all know eight bits are utilized in the network therefore the subnet mask would appear as if these eight one bits for the network the remaining 24 bits set to zero for hosts a category B address follows an equivalent rules sixteen bits for the network set to 1 and therefore, the host bits set to zero and eventually Class C well you get the thought by now’s this making sense thus far the subnet mask tells us which part of the IP is for the network and which party’s for the hosts, but this hasn‘t really addressed our original problem yet has it thus far we’ve just seen a special way to point out Class A B and C addresses, thus, far we haven’t seen anything on the way to save IP addresses the important power of cider is the power to interrupt an outsized network into small ones we call this subnetting for instance that you simply have the classful network of 170 to 1600 this is able to have the subnet mask of 255 255 0 0 this enables for about 65,000 hosts that’s tons of hosts that could be fine if we’ve one massive office but what if we’ve several smaller offices can we want to allocate 65,000 IPS to every office that seems like overkill to me so instead what we can do is ready to “> we’ll break the category B Network using our subnet mask we may plan to use 255.255.255.0 instead now our large office network has been broken into 256 different subnets why 256 wells our subnet mask is now using an additional 8 bits for the network the largest 8-bit value is 256 nows ready to “> we will allocate 256 host IPS per network which is way more reasonable once we have a few small offices if we would like to communicate between our subnets just like before we will need a router let me take a flash to form sure that I’m clear on these devices within the same subnet must be within the same IP network if not they’re going not to be able to communicate likewise if devices within the same subnet is separated by a router they’re going to also not be able to communicate I’d wish to challenge you to think this through for yourself take the 172 dot 1600 networks with a subnet mask 255 255 0 0 if we broke that network up by using the subnet mask of 255 255 to 40.0 what percentage subnets can we have what percentage host IPS per subnet is there if you are taking notes you’ve probably noticed that’s a pain to Write the subnet masks all the time to form things simple we’ve what’s referred to as cider notation take 172.16.1.0 / 24 as an example the slash 24 is the subnet mask written inside a notation this suggests that the first 24 bits of the subnet mask are turned on it’s that easy we’ll be using side of notation more and more from here on so attempt to get more comfortable with it see if you understand by testing yourself with this example we’ve to slash 24 networks these are joined together by alittle slash 30 networks a tool in network an is unable to speak with a tool in network B why are they unable to communicate classful is an older method of networking and subnetting is newer so why are we even talking about classful networking hasn‘t it been replaced yes it’s been replaced except for one if you’re doing an exam you’ll still find exam questions that ask class for addressing we even have some remnants of classes in everyday networking consider when you set IP address in Windows for instance if you configure an IP of 10.8 62 windows will automatically give you the subnet to 55000 it’s assuming classful networking and what we’re mostly classless now ton of people tend to consider subnetting are starting with a classful network and breaking it up from there which isn‘t always strictly true sometimes we may have a couple of small networks, and that we decide to hitch them together this is often called super netting for instance it’s going to have one nine two one six eight zero zero slash 24 and one nine two one six eight one zero slash 24 if we would like we will join these into one network 192.168.0.0 slash twenty-three in my opinion, we shouldn’t really worry about class all networks within the world use subnetting all the way but what does one think tell me if you agree or disagree within the comments i might like to hear your opinion join me subsequent article, and we’ll dive deeper into IP addressing concepts.