Spring 2016
Table of Contents
1 0 1 1 1 is equal to 16 + 4 + 2 + 1 = 23
As you can see, the decimal number place farthest to the right represents the number one,
the place to its left represents two, the place to the two’s left represents four, and so on.
The ones and zeroes corresponding to the decimal numbers indicate whether that number
is “turned” on or off. A one means the number is turned on, and you must add it to the
total. A zero means it is turned off, and you don’t add it to the total. In the above
example, the eight’s position is represented by a zero, and that is why we did not add the
eight to our total.
An IP address consists of four octets (1 octet = 8 bits), or 32 bits. The value in each octet
can range from 0 to 255 in decimal notation, or 00000000 - 11111111 in binary. This is
how the decimal number 255 is expressed in binary form:
128 64 32 16 8 4 2 1
1 1 1 11111
As you can see, 255 is the largest number that can possibly be expressed using an 8 bit
binary notation, since all the decimal number positions are turned on (represented by
ones). It is important to note that there are 256 total numbers possible because zero is
counted as a number (0 – 255 = 256 total values). The above example is only one octet.
An IP address contains four octets and looks like this in decimal form:
134.71.64.229
Network Classes
IP address octets provide an addressing method that accommodates large, small and
medium networks. These are divided into five classes of networks: A, B, C, D, and E. D
and E are reserved for special purposes, so they will not be discussed here. Network
classes A, B and C compose the following address space (The numbers in bold represent
the FIRST of the four octets in an IP address):
Class A is the largest class of network, followed by class B and finally class C. In a class
A network, the FIRST octet identifies the entire network. In a class B network, the first
TWO octets identify the network, and in a class C network, the first THREE octets
identify the network. But how does this all work?
Look at the class A address used above (24.2.23.15). In this address, the number 24
defines the network, meaning that everything to the right of the 24 is within the same
Our example of a class B network is 172.32.16.16. The 172.32 portion of the address is
the network portion of the address, meaning that any number following the first two
octets (172.32.x.x where ‘x’ represents any number from 0-255) will be located within
that class B network. The total class B network range is from 128.0.0.0 to
191.255.255.255.
This means that a class A network can have 256 * 256 * 256, or 16,777,216 addresses,
because each of the three right octets can have up to 256 addresses (0-255) each. A class
B network can have 256 * 256, or 65,536 addresses, and a class C network can have 256
addresses.
You may be wondering whether these different classes of networks can be broken down
into smaller subnetworks. For instance, let’s say you’re a network manager and you want
one network with 32 addresses and another with only 16. According to what we’ve
learned so far, the smallest network available is a class C network, which includes 256
addresses (0-255), which means you’re out of luck.
Good news, though – there is indeed a way to divide a network into smaller networks.
This is known as subnetting. It is also possible to combine smaller networks into larger
ones. An example of this would be combining two class C networks into one network
with 512 addresses (256 from one class C network and 256 from the other). This
technique is known as supernetting. Subnetting and supernetting are “classless”
addressing schemes, meaning the existing A, B and C class networks can be combined or
divided to create different sized networks. So far, we have discussed “classfull”
addressing, which divides networks up perfectly along class lines. In the classless IP
addressing module we will learn how subnetting and supernetting are used to further
divide networks.
There is a network mask that is associated with each of the three classes of networks we
have discussed. Next week when we talk about subnetting and supernetting we’ll refer to
this network mask as a subnet mask. Let’s take a look at the network mask for each of the
three network classes we discussed:
We looked at the class A address 24.2.23.15 earlier. We discussed the fact that we know
this is a class A address because its first octet is within the range 1 – 126. We also
discussed earlier that the network mask for this address range is 255.0.0.0. All that is
required now is a binary AND operation to get the network definition. For our example
we can think of a binary AND operation as multiplication. We’ll take the binary
equivalent of our address and network mask, then AND them together.
Note that each bit in the IP address is “multiplied” with its corresponding bit in the
network mask. Only when each bit is a “1” do we get a “1” in the network definition. By
Recall we said you can also discover the broadcast address, which is the highest
address in the network. First let’s look at the class C example we were just working on:
We can simply take all the bits that are “0” in the network mask and set the
corresponding “0” bits in the network definition to “1,” and that is the broadcast address.
In other words, each of the last eight bits in the network mask above were zeroes, and to
find the broadcast address, we write out the network definition, but we now leave the
network portion of the address alone and place “1’s” in the host portion of the address.
This method may seem harder at first, but we’ll see this is useful when we get to
subnetting and supernetting in the following module. Recall that in this module we
learned about the form of an IP address, and the three basic network classes (A, B and C).
We also learned how to derive both the network definition and the broadcast address for a
given network. The network definition is the identifier for the entire network. For
instance, the rest of the world knows Chico States network as 132.241.0.0. This is our
class B network definition. Of course here on campus we break this network down into
many smaller subnetworks, but that’s a topic for later.
Hexadecimal Notation
When we work with Ethernet addresses and IPv6 addresses we’ll discover a need to work
with hexadecimal (hex) numbers as well. Instead of being binary (base 2) hex has sixteen
possible values, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F) the numbers A-F refer to 10 –
15 respectively making 16 total values 0-F. We’ll be dealing with octets so let’s look at
an example where we want to convert the decimal 195 to its hex equivalent. There are a
number of ways to do this, however, this time we’ll convert our number to binary first
and then to hex. In the example below we convert the decimal number to binary then we
divide the byte of data in half make two nibbles. We then convert the nibbles to hex by
noting that the leftmost bit in a nibble has a value of 8, the next bit is a 4, then 2 and
finally 1. The left nibble is then 8+4 = 12 = C and the right nibble is 2+1 = 3.
134.71.0.0 /16
Subnetting
Let’s look at a class C example and see how an existing class C network can be split into
three smaller networks (one with 128 addresses, and two with 64 addresses):
However, the broadcast address will not be the same, since we have only 128 addresses
within this new smaller network. Here is how to find the broadcast address:
2. Take two to the same power as the number of zeroes in the mask. This will give
you the number of addresses within the network (example: if there are four zeroes
in the subnet mask, there are 2*2*2*2 = 16 addresses in that network).
3. Now, since you know the network definition (the FIRST address in the network)
and the total number of addresses in the network, simply take the last address in
the network, and that is the broadcast address.
Let’s see how this works in our example. Here is the network definition:
1. Count the number of zeroes in the subnet mask. There are SEVEN zeroes.
2. Since there are seven zeroes, take two to the seventh power (2*2*2*2*2*2*2 =
128) to find the total number of addresses in the network. Since we know the
network definition is 192.64.12.0, and we know there are 128 addresses in the
network, simple addition will give us the broadcast address.
3. Add 127 to the network definition to get the broadcast address 192.64.12.127.
Remember that the 0 in 192.64.12.0 counts as an address itself, so there are
127 other addresses (192.64.12.1 - 192.64.12.127) in the network, creating a total
of 128 addresses.
With this information, it is obvious that the network definition of the next network is
192.64.12.128 (it is simply the address immediately following the previous network’s
broadcast address). Since the next network has 64 addresses, we know the broadcast
address is 192.64.12.128 + 63 = 192.64.12.191. What is the subnet mask? It is
255.255.255.192 because there are 64 (2*2*2*2*2*2 = 64) addresses:
We now know the network definition and broadcast address of the second network, as
well as the number of addresses in the network. The last network of 64 addresses begins
at 192.64.12.192. The broadcast addresses is 192.64.12.255, and the network mask is
again 255.255.255.192, because there are 64 addresses in the network.
In this section, we took the class C network 192.64.12.0 and subnetted it into three
smaller networks. This is what we ended up with:
The “slash method” is an easy shorthand way of writing a subnet mask. All you do is take
the number of ones in a subnet mask and notate it as “/number of ones.” Look at the
example below:
Using the slash method, this subnet mask would be expressed as /23 because there are 23
ones in the subnet mask. Here’s another example:
Using the slash method, this subnet mask would be expressed as /26 because there are 26
ones in the subnet mask. On the following page a chart is provided that may help in
gaining perspective on all of these numbers. IPv6 exclusively uses the slash method for
expressing subnet masks.
Class B
Tot_Addr Subnets Mask Mask Available_Addr
65,536 1 255.255.0.0 /16 65,534
32,768 2 255.255.128.0 /17 32,766
16,384 4 255.255.192.0 /18 16,382
8,192 8 255.255.224.0 /19 8,190
4,096 16 255.255.240.0 /20 4,094
2,048 32 255.255.248.0 /21 2,046
1,024 64 255.255.252.0 /22 1,022
512 128 255.255.254.0 /23 510
256 256 255.255.255.0 /24 254
Class C
Tot_Addr Subnets Mask Mask Available_Addr
256 1 255.255.255.0 /24 254
128 2 255.255.255.128 /25 126
64 4 255.255.255.192 /26 62
32 8 255.255.255.224 /27 30
16 16 255.255.255.240 /28 14
8 32 255.255.255.248 /29 6
4 64 255.255.255.252 /30 2
2 128 255.255.255.254 /31 0
1 256 255.255.255.255 /32 0
2. Provide the binary octet derived from ANDing 01110011 & 11000000.
____________
3. Provide the binary octet derived from ANDing 10010010 & 11111000.
____________
4. Provide the binary octet derived from ANDing 10111010 & 11110000.
____________
5. Provide the decimal number derived from ANDing 11110100 & 11100000.
____________
6. Provide the decimal number derived from ANDing 11000010 & 11111000.
7. Provide the decimal number derived from ANDing 00110100 & 11100000.
____________
8. How many total IP addresses are contained within a network with a subnet mask
of 11111111.11111111.11111111.00000000?
____________
9. How many total IP addresses are contained within a network with a subnet mask
of 11111111.11111111.11111111.11110000?
____________
10. How many total IP addresses are contained within a network with a subnet mask
of 255.255.255.192?
____________
5. Given the IP address 137.214.67.25 and a subnet mask of /28, provide the
network definition.
____________
6. Given the IP address 132.241.67.25 and a subnet mask of /24, provide the
network definition.
____________
7. Given the IP address 117.21.67.25 and a subnet mask of /24, provide the
broadcast address.
____________
8. Given the IP address 221.73.67.71 and a subnet mask of /27, provide the
broadcast address.
____________
Table 1
Network Broadcast
Network Definition Address Router Address Total Hosts Subnet Mask
A
B
C
D
E
Range of unused addresses ________________ - _______________
Table 2
Network Broadcast
Network Definition Address Router Address Total Hosts Subnet Mask
A
B
C
D
E
Range of unused addresses ______________ - _______________
Table 3
Network Network Definition Broadcast Address Router Address Total Hosts Subnet Mask
A
B
C
D
E
Table 4
Network Broadcast Total
Network Definition Address Router Address Hosts Subnet Mask
A
B
C
D
E
Range of unused addresses ______________ - ______________
Table 5
Network Broadcast
Network Definition Address Router Address Total Hosts Subnet Mask
A
B
C
D
E
Table 6
Network Broadcast
Network Definition Address Router Address Total Hosts Subnet Mask
A
B
C
D
E
Table 7
Network Network Definition Broadcast Address Router Address Total Hosts Subnet Mask
A
B
C
D
E
Table 8
Network Broadcast Router
Network Definition Address Address Total Hosts Subnet Mask
A
B
C
D
E
Table 9
Network Broadcast
Network Definition Address Router Address Total Hosts Subnet Mask
A
B
C
D
E
Range of unused addresses _______________ - _________________
10. You are a network planner tasked with developing an IP structure for
the following networks. The IP space is to be assigned sequentially from
the lowest to the highest address. The largest subnet is to be assigned first
then followed in turn by the next largest subnet until they are all assigned.
The answers are to be put into the appropriate boxes in Table 10. You
have the address space 172.16.24.0 /21. The networks are listed below:
Table 10
Network Broadcast
Network Definition Address Router Address Total Hosts Subnet Mask
A
B
C
D
E
Range of unused addresses _______________ - ________________
Network A: 22 hosts
Network B: 235 hosts
Network C: 1073 hosts
Network D: 148 hosts
Network E: 501 hosts
Table 11
Network Network Definition Broadcast Address Router Address Total Hosts Subnet Mask
A
B
C
D
E
12. You are a network planner tasked with developing an IP structure for
the following networks. The IP space is to be assigned sequentially from
the lowest to the highest address. The largest subnet is to be assigned first
then followed in turn by the next largest subnet until they are all assigned.
The answers are to be put into the appropriate boxes in Table 12. You
have the address space 172.16.160.0 /23. The networks are listed below:
Table 12
Network Broadcast Total
Network Definition Address Router Address Hosts Subnet Mask
A
B
C
D
E
Range of unused addresses ______________ - ______________
Table 13
Network Broadcast
Network Definition Address Router Address Total Hosts Subnet Mask
A
B
C
D
E
14. You are a network planner tasked with developing an IP structure for
the following networks. The IP space is to be assigned sequentially from
the lowest to the highest address. The largest subnet is to be assigned first
then followed in turn by the next largest subnet until they are all assigned.
The answers are to be put into the appropriate boxes in Table 14. You
have the address space 142.16.160.0 /23. The networks are listed below:
Table 14
Network Broadcast
Network Definition Address Router Address Total Hosts Subnet Mask
A
B
C
D
E
Table 15
Network Network Definition Broadcast Address Router Address Total Hosts Subnet Mask
A
B
C
D
E
16. You are a network planner tasked with developing an IP structure for
the following networks. The IP space is to be assigned sequentially from
the lowest to the highest address. The largest subnet is to be assigned first
then followed in turn by the next largest subnet until they are all assigned.
The answers are to be put into the appropriate boxes in Table 16. You
have the address space 192.16.16.0 /20. The networks are listed below:
Table 16
Network Broadcast Router
Network Definition Address Address Total Hosts Subnet Mask
A
B
C
D
E
2. Provide the binary octet derived from ANDing 01110011 & 11000000.
01000000
3. Provide the binary octet derived from ANDing 10010010 & 11111000.
10010000
4. Provide the binary octet derived from ANDing 10111010 & 11110000.
10110000
5. Provide the decimal number derived from ANDing 11110100 & 11100000.
224
6. Provide the decimal number derived from ANDing 11000010 & 11111000.
192
7. Provide the decimal number derived from ANDing 00110100 & 11100000.
32
8. How many total IP addresses are contained within a network with a subnet mask
of 11111111.11111111.11111111.00000000?
256
9. How many total IP addresses are contained within a network with a subnet mask
of 11111111.11111111.11111111.11110000?
16
10. How many total IP addresses are contained within a network with a subnet mask
of 255.255.255.192?
64
5. Given the IP address 137.214.67.25 and a subnet mask of /28, provide the
network definition.
137.214.67.16
6. Given the IP address 132.241.67.25 and a subnet mask of /24, provide the
network definition.
132.214.67.0
7. Given the IP address 117.21.67.25 and a subnet mask of /24, provide the
broadcast address.
117.21.67.255
8. Given the IP address 221.73.67.71 and a subnet mask of /27, provide the
broadcast address.
221.73.67.95
Table 1
Network Broadcast
Network Definition Address Router Address Total Hosts Subnet Mask
A 198.116.52.0 198.116.53.255 198.116.52.1 510 /23
B 198.116.55.128 198.116.55.135 198.116.55.129 6 /29
C 198.116.55.0 198.116.55.127 198.116.55.1 126 /25
D 198.116.54.0 198.116.54.255 198.116.54.1 254 /24
E 198.116.48.0 198.116.51.255 198.116.48.1 1022 /22
Range of unused addresses _198.116.55.136_ - _198.116.55.255_
Table 2
Network Broadcast
Network Definition Address Router Address Total Hosts Subnet Mask
A 172.16.88.0 172.16.88.255 172.16.88.1 254 /24
B 172.16.80.0 172.16.87.255 172.16.80.1 2046 /21
C 172.16.89.128 172.16.89.191 172.16.89.129 62 /26
D 172.16.89.0 172.16.89.127 172.16.89.1 126 /25
E 172.16.89.192 172.16.89.207 172.16.89.193 14 /28
Range of unused addresses _172.16.89.208_ - _172.16.95.255_
Table 3
Network Network Definition Broadcast Address Router Address Total Hosts Subnet Mask
A 137.161.52.0 137.161.52.255 137.161.52.1 254 /24
B 137.161.54.0 137.161.54.31 137.161.54.1 30 /27
C 137.161.32.0 137.161.47.255 137.161.32.1 4094 /20
D 137.161.53.0 137.161.53.255 137.161.53.1 254 /24
E 137.161.48.0 137.161.51.255 137.161.48.1 1022 /22
Table 4
Network Broadcast Total
Network Definition Address Router Address Hosts Subnet Mask
A 172.16.160.0 172.16.160.255 172.16.160.1 254 /24
B 172.16.161.192 172.16.161.223 172.16.161.193 30 /27
C 172.16.161.128 172.16.161.191 172.16.161.129 62 /26
D 172.16.161.0 172.16.161.127 172.16.161.1 126 /25
E 172.16.161.224 172.16.161.239 172.16.161.225 14 /28
Range of unused addresses _172.16.161.240_ - _172.16.161.255_
Table 5
Network Broadcast
Network Definition Address Router Address Total Hosts Subnet Mask
A 192.168.244.0 192.168.245.255 192.168.244.1 510 /23
B 192.168.247.128 192.168.247.135 192.168.247.129 6 /29
C 192.168.247.0 192.168.247.127 192.168.247.1 126 /25
D 192.168.246.0 192.168.246.255 192.168.246.1 254 /24
E 192.168.240.0 192.168.243.255 192.168.240.1 1022 /22
Table 6
Network Broadcast
Network Definition Address Router Address Total Hosts Subnet Mask
A 12.16.24.0 12.16.24.255 12.16.24.1 254 /24
B 12.16.16.0 12.16.23.255 12.16.16.1 2046 /21
C 12.16.25.128 12.16.25.191 12.16.25.129 62 /26
D 12.16.25.0 12.16.25.127 12.16.25.1 126 /25
E 12.16.25.192 12.16.25.207 12.16.25.193 14 /28
Table 7
Network Network Definition Broadcast Address Router Address Total Hosts Subnet Mask
A 17.169.244.0 17.169.245.255 17.169.244.1 510 /23
B 17.169.246.128 17.169.246.159 17.169.246.129 30 /27
C 17.169.224.0 17.169.239.255 17.169.224.1 4094 /20
D 17.169.246.0 17.169.246.127 17.169.246.1 126 /25
E 17.169.240.0 17.169.243.255 17.169.240.1 1022 /22
Table 8
Network Broadcast Router
Network Definition Address Address Total Hosts Subnet Mask
A 192.16.14.0 192.16.14.255 192.16.14.1 254 /24
B 192.16.15.192 192.16.15.223 192.16.15.193 30 /27
C 192.16.15.128 192.116.15.191 192.16.15.129 62 /26
D 192.16.15.0 192.16.15.127 192.16.15.1 126 /25
E 192.16.15.224 192.16.15.239 192.16.15.225 14 /28
Table 9
Network Broadcast
Network Definition Address Router Address Total Hosts Subnet Mask
A 14.25.104.0 14.25.107.255 14.25.104.1 1022 /22
B 14.25.108.0 14.25.109.255 14.25.108.1 510 /23
C 14.25.110.0 14.25.110.127 14.25.110.1 126 /25
D 14.25.96.0 14.25.103.255 14.25.96.1 2046 /21
E 14.25.64.0 14.25.95.255 14.25.64.1 8190 /19
Range of unused addresses _14.25.110.128_ - _14.25.127.255_
10. You are a network planner tasked with developing an IP structure for
the following networks. The IP space is to be assigned sequentially from
the lowest to the highest address. The largest subnet is to be assigned first
then followed in turn by the next largest subnet until they are all assigned.
The answers are to be put into the appropriate boxes in Table 10. You
have the address space 172.16.24.0 /21. The networks are listed below:
Table 10
Network Broadcast
Network Definition Address Router Address Total Hosts Subnet Mask
A 172.16.28.0 172.16.28.255 172.16.28.1 254 /24
B 172.16.29.64 172.16.29.79 172.16.29.65 14 /28
C 172.16.29.0 172.16.29.63 172.16.29.1 62 /26
D 172.16.24.0 172.16.27.255 172.16.24.1 1022 /22
E 172.16.29.80 172.16.29.95 172.16.29.81 14 /28
Range of unused addresses _172.16.29.96_ - _172.16.31.255_
Network A: 22 hosts
Network B: 235 hosts
Network C: 1073 hosts
Network D: 148 hosts
Network E: 501 hosts
Table 11
Network Network Definition Broadcast Address Router Address Total Hosts Subnet Mask
A 137.161.236.0 137.161.236.31 137.161.236.1 30 /27
B 137.161.234.0 137.161.234.255 137.161.232.1 254 /24
C 137.161.224.0 137.161.231.255 137.161.224.1 2046 /21
D 137.161.235.0 137.161.235.255 137.161.235.1 254 /24
E 137.161.232.0 137.161.233.255 137.161.232.1 510 /23
12. You are a network planner tasked with developing an IP structure for
the following networks. The IP space is to be assigned sequentially from
the lowest to the highest address. The largest subnet is to be assigned first
then followed in turn by the next largest subnet until they are all assigned.
The answers are to be put into the appropriate boxes in Table 12. You
have the address space 172.16.160.0 /23. The networks are listed below:
Table 12
Network Broadcast Total
Network Definition Address Router Address Hosts Subnet Mask
A 172.16.160.0 172.16.160.255 172.16.160.1 254 /24
B 172.16.161.128 172.16.161.191 172.16.161.129 62 /26
C 172.16.161.192 172.16.161.223 172.16.161.193 30 /27
D 172.16.161.0 172.16.161.127 172.16.161.1 126 /25
E 172.16.161.224 172.16.161.239 172.16.161.225 14 /28
Range of unused addresses _172.16.161.240_ - _172.16.161.255_
Table 13
Network Broadcast Total
Network Definition Address Router Address Hosts Subnet Mask
A 192.168.196.0 192.168.196.255 192.168.196.1 254 /24
B 192.168.197.192 192.168.197.223 192.168.197.193 30 /27
C 192.168.197.128 192.168.197.191 192.168.197.129 62 /26
D 192.168.197.0 192.168.197.127 192.168.197.1 126 /25
E 192.168.192.0 192.168.195.255 192.168.192.1 1022 /22
14. You are a network planner tasked with developing an IP structure for
the following networks. The IP space is to be assigned sequentially from
the lowest to the highest address. The largest subnet is to be assigned first
then followed in turn by the next largest subnet until they are all assigned.
The answers are to be put into the appropriate boxes in Table 14. You
have the address space 142.16.160.0 /23. The networks are listed below:
Table 14
Network Broadcast Total
Network Definition Address Router Address Hosts Subnet Mask
A 142.16.160.0 142.16.160.255 142.16.160.1 254 /24
B 142.16.161.64 142.16.161.95 142.16.161.65 30 /27
C 142.16.161.0 142.16.161.63 142.16.161.1 62 /26
D 142.16.161.112 142.16.161.119 142.16.161.113 6 /29
E 142.16.161.96 142.16.161.111 142.16.161.97 14 /28
Table 15
Network Network Definition Broadcast Address Router Address Total Hosts Subnet Mask
A 17.45.242.0 17.45.242.255 17.45.242.1 254 /24
B 17.45.243.128 17.45.243.191 17.45.243.129 62 /26
C 17.45.243.192 17.45.243.223 17.45.243.193 30 /27
D 17.45.243.0 17.45.243.127 17.45.243.1 126 /25
E 17.45.240.0 17.45.241.255 17.45.240.1 510 /23
16. You are a network planner tasked with developing an IP structure for
the following networks. The IP space is to be assigned sequentially from
the lowest to the highest address. The largest subnet is to be assigned first
then followed in turn by the next largest subnet until they are all assigned.
The answers are to be put into the appropriate boxes in Table 16. You
have the address space 192.16.16.0 /20. The networks are listed below:
Table 16
Network Broadcast Router
Network Definition Address Address Total Hosts Subnet Mask
A 192.16.20.0 192.16.20.255 192.16.20.1 254 /24
B 192.16.21.64 192.16.21.95 192.16.21.65 30 /27
C 192.16.21.0 192.16.21.63 192.16.21.1 62 /26
D 192.16.16.0 192.16.19.255 192.16.16.1 1022 /22
E 192.16.21.96 192.16.21.103 192.16.21.97 6 /29