So just to summarize, we know that the subnet are host resides on its 172.16.32.0
We also have work out that the next subnet in the range is 172.16.48.0
It’s important that you work out both the subnet that the host resides on
as well as the next subnet, now just to help you with the analogy.
In the real world we have an odometer in a car or motor bike something
like this picture it will roll over from a 9 to 0.
When travelling if the right most value is 9 and you drive another kilometer
or mile that will change to 0, and the 0 to the left of it, will move to 1.
So in a standard odometer if you had a value of, let say 7 0's
and a 1 because you got a brand new vehicle.
So that’s the distance that you've travel, let say 1 mile
and you drive another mile, the odometer will show that you have driven
7 0's 2 miles (00000002), if you have driven 9 miles and you drove 1 extra mile
that would display as six 0's followed by 1 followed by 0 (00000010) in
other words 10 miles, if you have driven 999 miles and drove in extra mile
that would display as 4 0's followed by 1 followed by 3 0's
(00001000), in other words a thousand miles.
Not that you would ever do this, but let say you reverse the odometer.
So you had a thousand miles and you took 1 mile away that would give you
5 0's followed by 3 9's(00000999) in other words 999 miles.
Now as analogy we have a binary odometer.
If you had an IP address of 10.1.1.254 and you added 1 to it
the value will become 10.1.1.255 that should be very simple to understand.
However if you had 10.1.1.255 and added 1 to that you now get 10.1.2.0
in the similar manner to a standard odometer in a car.
10.1.2.0 + 1 would equate to 10.1.2.1 or if we went in reverse 10.1.2.0 - 1
would give you 10.1.1.1.255
In a standard odometer the values can go from 0 to 9, in a binary odometer the
values can go to 0 to 255 and then I have to click over in the next octet.
Thus, if the last octet is equal to 255 and you add 1, notice the 3rd octet
clicks over from 1 to 2 and the last octet clicks over to 0
So use this analogy to help you work out the first host,
the last host and the broadcast address.
So the broadcast address is equal to the next network that we work out less 1
so the next network that we work out was 172.16.48.0 and if we subtract 1 from that
we'll get 172.16.47.255 just remember how the binary odometer works each octet
can go from 0.255 and then it has to click over or in this example click back.
So the broadcast address for host 172.16.35.123 is 172.16.47.255
we work this out by leaving the network portion the same in other words
the first 2 octets in blue and then the subnet in the host portion is set to 1 less
than the next network which in this case is 48.0
To work out the first host in the same subnet, take your subnet and add 1 to it.
So the subnet that we've worked out is 172.16.32.0 and if you add 1 to that .
you get 172.16.32.1, the last host is equal to the broadcast address less 1.
So 172.16.47.255 which is our broadcast address less 1 is equal to 172.16.47.254
and thats it we’ve work out the answers to the question.
Now initially that might seem like a lot of work but you should be able to start
doing examples within 30 to 60 seconds using this method, thus, the quick method.
So to summarize this example 172.16.32.0 is the subnet for host 172.16.35.123
with the subnet mask of 255.255.240.0 the broadcast is 172.16.47.255
and the first host is 172.16.32.1 and the last host is 172.16.47.254
In the second part of this section we're gonna look at how to subdivide a network
or subnet when given a specific number of host that would be required
on a subnet or a specific number of subnets that are required.
So the 2 scenarios when ask for specific number of host on the subnets
you would have to subdivide a specific network or subnet that you were given
into multiple subnets that can support that number of host
or you may be required to subdivide a subnet into multiple subnets.
Why would this be required in the real world?
Well you might been the administrator of a remote side and
the head office is allocated US specific subnet, let say 192.168.1.0/24.
Now that is only 1 subnet, what happens if you require multiple subnets?
well, you could ask the head office to give you more subnets, but then may tell
you that you don’t require multiple subnet
and that you are to subdivide that subnet into more subnets.
Now if your sites only had 2 physical segments, with let say the first segment
having 3 hosts on it and the second segment having 2 hosts on it.
It’s very unlikely that the head office is gonna allocate
you 2 separates subnets because this subnet 192.168.1.0 can support 254 hosts.
And you only have a requirement for 3 hosts on 1 segment
and 2 hosts on another segment, so you may be required to subdivide the subnet
that you have been given so that you can support this infrastructure.
Another reason to subnet is that the original classfull networks
like a class A network supports 16,777,214 host per network of 10.0.0.0/8 and
you had all of your host on that one subnet, the network would die the amount of
broadcast and traffic sent on this segment will just destroy the network.
It’s not practically possible to have so many hosts on the subnet.
A lot of network engineers will put a maximum of 254 hosts on a subnet.
In other words they would subnet down to a class C subnet
class B network supports 16,382 host per subnet and once again
that's far too many hosts on a subnet or network.
That segment will not operate properly with so many hosts within that subnet.
So once again we will more than likely subnet down to at least 254 hosts
on the subnet, on a point to point 1 link only 2 host addresses are required
so it make sense to subnet down even further or subdivide a network
down even further until you only have 2 hosts on that subnet.
The formula to work out how many host are supported on a subnet
is 2 to n minus 2 where n is number of binary bits in the host portion.
So as an example of class A address is 32 bits in size where 8 bits
is the network portion and 24 bits is the host portion