0% found this document useful (0 votes)
31 views34 pages

CPEN105 Module 5

This module covers the TCP/IP protocol suite and IP addressing, focusing on IPv4 and its structure, subnetting, and practical exercises. Students will learn to explain TCP/IP, compare it with the OSI model, and identify necessary information for network communication. The module includes a pre-test and post-test to assess understanding and readiness for subsequent topics.

Uploaded by

butch.cubelo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views34 pages

CPEN105 Module 5

This module covers the TCP/IP protocol suite and IP addressing, focusing on IPv4 and its structure, subnetting, and practical exercises. Students will learn to explain TCP/IP, compare it with the OSI model, and identify necessary information for network communication. The module includes a pre-test and post-test to assess understanding and readiness for subsequent topics.

Uploaded by

butch.cubelo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Title: A module on TCP/IP protocol suite and IP addressing

Introduction:

This module builds on our previous WLAN and WAN topics. We’ll explore the
TCP/IP protocol suite, which is crucial for internet access. We’ll also learn about IP
addresses, especially IPv4, and how they are structured. The module includes
subnetting, a technique for managing network traffic, and ends with practical
exercises. This knowledge will help you understand network communication and IP
address management.

Objectives:

At the end of the topic module, the students should be able to:

1) explain what a TCP/IP is;


2) enumerate the similarities and differences of the OSI reference model
and the TCP/IP model;
3) compare IPv4 and IPv6 addresses;
4) identify the required information for each computer to identify itself on
a TCP/IP network;
5) describe the structure of an IPv4 address;
6) discuss notations to show an IPv4 address;
7) describe the classes of an IP address;
8) calculate network address;
9) explain subnetting; and
10) subnet an IP network in a given scenario.
Instruction to the users:

By way of a sample, instructions for using a given module are


reproduced below:
1) Before you begin this module, take the pre-test to find out
whether or not you need to go through it. If you get a score of
80% or better in the pre-test, you need not to do the module. If
you do not, then you should go through a module carefully at
your own pace.
2) Each activity has a test. This is a test to find out what you know
already about the unit. Try to answer each exercise thoroughly
and completely. Write down your answers on the answer sheet.
3) If you do not know the answers, go ahead to the next part.
4) Check your answer against the answer key found in the next
page.
5) Consult your teacher only when you have a problem or difficulty
regarding the module which you cannot solve by yourself.
6) After completion of this module, ask for the post-test. You must
get a score of 80 percent or better to be able to move on to the
next module. If you do not reach this criterion for the post test,
you will have to go through the module again.
7) Now, you are ready for the next module.
Pre-test:
I. Multiple choice
Read each statement carefully. You can write down your
answers on a separate answer sheet. (1 point each)
1) What is the correct order of layers in the TCP/IP model from highest
to lowest?
a) Application, b) Network Access,
Transport, Internet, Internet, Transport,
Network Access Application
c) Transport, d) Internet, Transport,
Application, Application, Network
Internet, Network Access
Access
2) Which of the following is a feature of IPv6 over IPv4?
a) Smaller address b) Dotted decimal
space notation
c) Larger address d) Deployed in 1981
space
3) Which class of IP address provides the largest number of host
addresses?
a) Class A b) Class B
c) Class C d) Class D
4) What is the primary purpose of subnetting?
a) To reduce the b) To increase network
number of IP traffic
addresses
available
c) To create smaller, d) To change the physical
manageable network layout
network segments
5) What does the MAC address uniquely identify?
a) A network protocol b) A network interface
card
c) An IP address d) A subnet mask
6) What is the role of a default gateway in a network?
a) To assign IP b) To provide data
addresses to hosts storage
c) To forward packets d) To filter traffic based on
to other networks MAC addresses
7) How many layers does the OSI model have compared to the TCP/IP
model?
a) OSI has 4 layers, b) OSI has 7 layers,
TCP/IP has 7 TCP/IP has 4 layers
layers
c) Both have 7 layers d) Both have 4 layers
8) What is the structure of an IPv4 address?
a) 16-bit hexadecimal b) 32-bit binary notation
notation
c) 128-bit dotted d) 32-bit dotted decimal
decimal notation notation
9) What does a subnet mask do?
a) Identifies the host b) Identifies the network
portion of an IP portion of an IP
address address
c) Assigns IP d) Encrypts data packets
addresses to hosts
10) Who usually assigns IP addresses within a network?
a) The ISP b) The network
administrator
c) The default d) The MAC address
gateway
Answer Key:
If you get a score of 80% or better, you need not to do this module. If
you do not, then you should go through this module carefully at your own pace.
Passing Score is 4 points.
1) A
2) C
3) A
4) C
5) B
6) C
7) B
8) D
9) B
10) B
Presentation:
TCP/IP Suite

As mentioned in our previous topics, millions of people all over the world today
depend on the applications enabled by the interconnection of networks (Internet and
World Wide Web (WWW)) build by TCP/IP.

The TCP/IP, known as Transmission Control Protocol/Internetworking


Protocol, is a four-layer representation of the network (shown in Figure 6.1) that defines
how information or data should travel between networks and devices across the
Internet; if not because of it, information on the internet won’t be available to anyone
and there would be no such thing as internet access.

Figure 6.1: Four - layered TCP/IP Suite

Figure 6.1 denotes data flowing through the layers, with headers being added
at each layer. As seen, on the way down, headers are added and the data starts
growing and, on the way, up at the receiving end, the headers and trailers are stripped
away to finally receive the original data.

For further understanding, the TCP/IP is likened to the English language that
the whole world is using to communicate with each other. If our computer or device
does not support it, there is NO way we can connect to the internet. Like if we don’t
know the English language and we travel around the world, it won’t be so easy for us
unless we have a travel guide or a companion who speaks English.

The TCP/IP was originally created by the U. S. Department of Defense because


it wanted a network that could survive any conditions (even a nuclear war) and a
reliable data that could be transmitted to any destination on the network under any
circumstances. This difficult design problem of having the DOD’s packets to get
through every time, under any conditions, from any one point to any other point brought
about the creation of the TCP/IP model and has since become the de facto standard
for internetwork communications that enables millions of computers to communicate
globally.

The two (2) most important protocols in the TCP/IP suite are as follows:

• Transmission Control Protocol (TCP): This is responsible for


breaking messages into packets, handling them off to the IP software
for delivery, and then orders and reassembles the packets at their
destination.
• Internet Protocol (IP): This is responsible for identifying the hosts
through an IP addressing scheme and for the routing of packets through
the maze of interconnected networks to their final destination.

The function of the TCP/IP protocol stacks, or suite (which will be discussed in
detail in Week 15 – TCP/IP Transport and Application Layer), is to transfer information
from one network device to another. In doing so, it closely maps the OSI reference
model (which is an ISO standard for worldwide communications that defines a
networking framework shown at the left of Figure 6.1) in the lower layers, and supports
all standard physical and data link protocols.

Figure 6.2: OSI and TCP/IP model


The layers most closely affected by TCP/IP are Layers 7 (application), 4
(transport), and 3 (network). Included in these layers are other types of protocols with
a variety of purposes/functions, all of which are related to the transfer of information.

Similarities Differences
The OSI has seven (7) layers, while the
Both have layers TCP/IP appears simpler because it has
fewer layers (four [4] layers
The TCP/IP combines the presentation
and session layers into its application
layer; the characteristics of presentation
Both have application layers, though
layer are provided by the application
they include very different services
layer, whereas, the characteristics of
the session layer are provided by the
transport layer
Both have comparable transport and The TCP/IP combines the OSI data link
network layers and physical layers into one layer
The TCP/IP transport layer using UDP
Packet – switched (not circuit – does not always guarantee reliable
switched) technology is assumed delivery of packets as the transport
layer in the OSI model does
The OSI is truly a general model, while
Networking professionals need to know
TCP/IP cannot be used for any other
both
application
Table 6.1: Similarities and differences of the OSI reference

The Internet Protocol (IP) had undergone several version changes. Currently,
there are two (2) versions of an IP, which are the IP version 4 (IPv4) and the IP version
6 (IPv6). Table 6.2 below shows the comparisons between the two (2) IP versions:

IP version 4
IP version 6 (IPv6)
(IPv4)
Deployed 1981 1992
32 – bit (4 bytes)
Address
addressing 128 – bit (16 bytes) addressing scheme
Size
scheme
Dotted Decimal
Address Hexadecimal Notation:
Notation:
Format 3FFE:F200:0234:AB00:0123:4567:8 901:ABCD
192.149.252.76
Prefix
192.149.0.0/24 3FFE:F200:0234::/48
Notation
Number
of
2128
Addresse 232 =
=~340,282,366,920,938,463,374,607,431,768,211,4
s ~4,294,967,296
56
(Address
Space)
Table 6.2: IPv4 vs. IPv6

Note: Dotted decimal notation and hexadecimal notation will be discussed further in
IP addressing.

The present version of the TCP/IP, which is the IPv4 that was standardized in
September 1981 is obsolete. In 1992, the Internet Engineering Task Force (IETF)
supported the standardization of a new generation of IP, often called the IPng (ng for
next generation) and now known as the IPv6 improves on the current version through
providing a much larger address space.

The IPv6 has not yet gained wide implementation, but most vendors of
networking equipment have already released it. The technical functioning of the
Internet remains the same in both versions and it is likely that both versions will
continue to operate simultaneously on networks well into the future. At the current time,
networks that use IPv6 support both IPv4 and IPv6 addresses in their networks.

Hence, time will come that the IPv4 will be completely obsolete and IPv6 will
be the commonly used version and will become the dominant standard in the future.

Note: Inform the students that the discussion for the whole session will focus on the
IPv4. IPv6 is mentioned in the topic for them to recognize the IPv4’s limitation and how
it will be addressed by the IPv6.

IP Addressing

Each company or organization listed on the Internet is seen as a single unique


network that must be reached before contacting an individual host within a certain
company. Hence, for each computer to identify itself on a TCP/IP network, each host
must be uniquely identified by the following information:

MAC (Media Access Control) address (aka physical address) refers to the
unique physical address of all computers, which are assigned by the manufacturer of
the network interface card. It is supposed to be permanent and could not be changed
by anyone as it was meant to identify a specific network interface card no matter where
it is in the world.
Each MAC address is a 48 bit value commonly represented in a hexadecimal
(base 16) format and comprised of two parts (shown in Figure 6.2) that attempt to
ensure that every MAC address is globally unique.

Figure 6.3: Parts of a MAC Address

• Organizational Unique Identifier (OUI) – This is the first 24 bits of the


MAC address that is vendor specific; it identifies the company that
manufactured or sold the device (e.g. network interface card, or router
ports, etc.). Within those 24-bits, there are two (2) bits with special
significance. The broadcast bit can be used to indicate that the address
is a broadcast or a multicast address. The locally administered address
bit is typically used when the MAC address is changed.
• Vendor Assigned – This is the remaining 24 bits of the MAC address
that is incrementally and uniquely assigned by the specific vendor of
the hardware – denotes the serial number of the individual device.

One of the uses of a MAC address which people are most likely to encounter
is MAC filtering, used by wireless routers to allow or disallow certain computers from
accessing the network. This is a quick and easy method if you only want a handful of
computers or laptops to connect. A MAC address can also be used to assign an IP
address to a certain computer. The server queries the MAC address of the network
card, looks it up in a list, and assigns the corresponding IP address.

An IP address, on the other hand, refers to an address that is usually assigned


by the network administrator or internet service provider in order to uniquely and
universally identify each device on an IP network.
It is unique in the sense that each address defines one and only one connection
to the Internet. Two (2) devices on the Internet can never have the same address.
However, if a device has two (2) connections to the Internet, via two (2) networks, it
has two (2) IP addresses.

It is universal in the sense that the addressing system must be accepted by any
host that wants to be connected to the Internet.

Figure 6.4: IP addresses in Router

Figure 6.4 shows a yellow line that represents the division of two (2) different
IP addresses. The public IP address is what the computers use to find each other
online and exchange information. It is assigned to the computer by the Internet Service
Provider as soon as the computer is connected to the Internet gateway; user has no
control over the IP address (public) that is assigned to the computer. A public IP
address can be either of the following:

• Static public IP address – It is a fixed IP address and is used primarily for


hosting web pages or services on the Internet. The computer always keeps the
same address every time it connects to the Internet.
• Dynamic public IP address – It is chosen from a pool of available addresses
and changes each time one connects to the Internet. Most Internet users will
only have a dynamic IP assigned to their computer which goes off when the
computer is disconnected from the Internet. Thus, when it is re-connected it
gets a new IP.

On the other hand, the private IP address is what computers on a network used
to talk to the router. It can change each time they are connected. An IP address is
considered private if the IP number falls within the class A, B and C address ranges
(shown in Table 6.3) to prolong the rapid decline in the number of available IP
addresses.

Address Class Address Range


10.0.0.0 – 10.255.255.255 (Total
Class A
Addresses: 16,777,216)
172.16.0.0 – 172.31.255.255 (Total
Class B
Addresses: 1,048,576)
192.168.0.0 – 192.168.255.255 (Total
Class C
Addresses: 65,536)
Table 6.3: Private Address Ranges

Note: Class A, B, and C address ranges will be discuss further as we go along the
topic.

Aside from public and private IP addresses, Table 6.4 shows the other three
(3) special ranged that are reserved for special purposes.

It is used for testing and


127.0.0.0 –
Diagnostic debugging of programs or
127.255.255.255
hardware
It is generally used for
Default Network 0.0.0.0
routing
It is used for broadcasting
messages to the entire
Network Broadcast 255.255.255.255
network that the computer
resides on
Table 6.4: Special Addresses

Each IP Address includes a network ID/field and a host ID/field shown in Figure
6.5.

Table 6.5: Parts of an IP Address


• The network ID/field identifies the host that is located on the same physical
network bounded by IP routers. All hosts on the same physical network are
assigned by the registry authority or the Network Admin and usually should not
be changed; it must have the same network ID/field. The network ID/field must
be unique to the internetwork.
• The host ID (also known as a host address) identifies the individual host (e. g.
workstation, server, router, or other TCP/IP host) within a network. The host
address is assigned by the Network Admin to individual devices and must be
unique to the network ID/field.

Subnet mask or a default mask (shown in Table 6.5) determines which portion
of an IP address identifies the network and which portion identifies the host. Like the
IP address, it is represented by four octets. The network bits are represented by the
1s in the network mask, and the node bits are represented by the 0s.

Figure 6.5: IP Address Class and Its Default Mask

Class D & E are used for Multicast and Research purposes and we are not
allowed to subnet them so they are not mentioned here.

The number behind the slash notation (/) specifies how many bits are turned
on (bit 1). For example:

“/8″ equals “1111 1111.0000 0000.0000 0000.0000 0000″ → 8 bits are turned
on (bit 1)

“/12″ equals “1111 1111.1111 0000.0000 0000.0000 0000″ → 12 bits are


turned on (bit 1)
“/24″ equals “1111 1111.1111 1111.1111 1111.0000 0000″ → 24 bits are
turned on (bit 1)

Default Gateway (shown in Figure 6.5) is used to specify the address of the
nearest routing device that is used by the host device to forward addressed packets
on to the network.

Figure 6.6: Default Gateway

These are the procedures on how to find/display the abovementioned information in


one’s local computer using “Command Prompt (DOS Command)”:

• Click the Start menu button on the Windows taskbar.


• Click “Run...” on this menu.
• Type “cmd” in the text box that appears. A command prompt window (shown in
Figure 6.6) launches on the desktop.
Figure 6.7: Command prompt window

• In the command window, type “ipconfig /all” to show the MAC address, IP
address and the subnet mask (shown in Figure 6.8)

Figure 6.8: Command window showing the MAC address, IP address and the subnet mask

• However, if you only want to display the MAC address, just key in “getmac” to
the command window and the Figure 6.9 below will appear.
Figure 6. 9: Command window showing only the MAC

An IPv4 address is a 32-bit binary IP address segmented in a way that it can


be expressed using four (4) octets separated by “dots”. Each octet is often referred to
as a byte, which consists of 8 – bit numbers from 0 through 255. Hence, four (4) octets
make up 4 * 8 = 32 bits, the exact number of bits in an IP address shown in Figure
6.10 below.

Figure 6.10: IPv4 Address Format

An IPv4 address is expressed in three (3) different notations below. The most
prevalent, however, is the dotted-decimal notation.

• Dotted – Binary Notation (Base 2)


01110101.10010101.00011101.00000010
• Dotted – Decimal Notation (Base 10) – This allows for easier identification of
the IP address. Each decimal number (octet) represents 8 individual bits. Those
bits are used to represent either the host or network portion of this unique
address.
01110101.10010101.00011101.00000010 → N10

Solution:

Using Positional Notation:

The IP address in the form of binary notation above is equivalent to


117.149.29.2 when written in dotted-decimal notation.

• Dotted – Hexadecimal Notation (Base 16)

01110101.10010101.00011101.00000010 → N16

Solution:
The IP address in the form of binary notation above is equivalent to
75.95.1D.02 when written in dotted-hexadecimal notation.

Knowledge on decimal-to-binary-to-hexadecimal conversion is important in


dealing with IP addresses. Computers and network nodes work with binary information
and treat IP addresses as such binary numbers. For ordinary network users, it is more
convenient (easier to remember) to deal with IP addresses if these are expressed in
dotted-decimal format. For high-level network personalities, e.g., network
administrators and engineers, who troubleshoot network problems, using network tools
may require them proficiency in reading IP addresses in the dotted-hexadecimal
format.

An IPv4 Address is divided into categories called classes, which define the
large, medium, and small networks. The classes were determined during the early
days of the Internet by the Internet Assigned Numbers Authority (IANA). The five (5)
IP address classes are as follows:

• Class A address – This uses only the first octet (8 bits) of the 32-bit number
to indicate the network address. The entire second to fourth octet are used for
host addresses, which is now equivalent to a total of 24 bits. With 24 bits, there
could be 224 = 16,777,216 addresses in the address space. However, an IP
address with the host bits zeroed out is used to identify the network address
while an IP address whose host bits are set to all ones is used for network
broadcast. Hence, this reduces the effective number of possible host
addresses in the address space to 16,777,214. Therefore, Class A addresses
are given out to networks with millions of hosts that need unique identification
numbers – a very large network.

Figure 6. 11: Class A IP Address formats

Aside from the description above, the Class A address always has its higher-
ordered bit in the 32- bit number set to “0” (shown in Figure 6.9). Hence, the
first octet of this address would range from 00000000 to 01111111, or from 0
to 127 if expressed in decimal. However, 0 is reserved to refer to “This
Network”, while 127 is reserved for loopback testing (as in the case of the
loopback address of 127.0.0.1). With 0 and 127 reserved, this reduces to 126
Class A network addresses – from 128 unique values less two (2) reserved (0
and 127).

• Class B address – This uses two (2) of the four (4) octets (16 bits) to indicate
the network address. The two other octets, which specify the host addresses,
have now a total of 16 bits. With 16-bits for the host address part, there can be
up to 216 = 65,536 possible addresses in the address space. With the rule of all
host bits set to zeros for network address, and all host bits set to ones for
broadcast, the effective number of addresses in the space is 65,534. Class B
networks are given out to the networks that are mid-sized.

Figure 6.12: Class B IP Address formats


Aside from that, the Class B address always has its first two higher-ordered bits
in the 32-bit number set to “10” (shown in Figure 6.10). The first octet would
then range from 10000000 to 10111111, or from 128 to 191 in decimal. Unlike
Class A addresses, all addresses in the address space are assignable. Given
that six (6) bits can be used to define the first octet value, plus the whole eight-
bits of the second octet, there could be up to 214 = 16,384 Class B network
addresses.
• Class C address – This uses the first three octets (24 bits) of the IP address
to identify the network portion, with the remaining octet reserved for the host
portion, which is equivalent to eight (8) bits. With only eight bits remaining for
the host address part, there can be up to 28 = 256 addresses in the address
space. Again, with the all zeros and all ones rule for the host bits, the effective
number of host addresses in the space is 254. Compared to Class A and B
networks, Class C networks would then be relatively small.

Figure 6.13: Class C IP Address formats

In addition to the description above, the Class C address always has the first
three higher-ordered bits in the 32-bit number set to “110” (shown in Figure
6.11). The first octet would then range from 11000000 to 11011111, or from
192 to 223 in decimal. Similar to Class B addresses, all addresses in the
address space are assignable. Given that only five (5) bits can be used to
define the first octet value, plus the whole 16-bits of the second and third octets,
there could be up to 221 = 2,097,152 Class C network addresses.

• Class D address – This is created to enable multicasting using an IP address.


A multicast address is a unique address that directs packets with that
destination address to predefined groups of hosts. Therefore, a single station
can simultaneously transmit a single stream of datagrams to multiple
recipients.
Figure 6. 14: Class D IP Address formats

The first four bits of a Class D address must be 1110 (shown in Figure 6.12).
Hence, the first octet range for this class is 11100000 to 11101111, or 224 to
239. An IP address that starts with the above – mentioned range in the first
octet is a Class D address.

• Class E address – This is reserved by the Internet Engineering Task Force


(IETF) for its own research. Therefore, this is not released for use in the
Internet.

Figure 6. 15: Class E IP Address formats

The first four bits of a Class E address are always set to “1111” (shown in
Figure 6.13). Therefore, the first octet range for Class E addresses is 11110000
to 11111111, 240 to 255.

By inspection, we can automatically determine the network and the host portion
of an IP address through its corresponding IP address class. Unfortunately, our
computer doesn’t think that way.

For our computer to tell where to break the IP address apart to get the
abovementioned parts of an IP address, the IP address must be “ANDed” with its
default mask in binary.

Note: In case AND is unfamiliar, here is how it works in pairs of bits: If the input
is ALL one (1), the output is one (1), otherwise the output will be zero (0)

Input Output
x y F=xy
0 0 0
0 1 0
1 0 0
1 1 1
Table 6. 6: ANDing Equation

Example:

Determine the network and the host portion of an IP address, 200.133.175.33.

Solution:

By inspection:

By looking at the first octet of the given IP address, we can conclude that it is Class C,
since it belongs to the range of 192 to 223. Hence, by following the pattern for Class
C in Figure 6.13, we can say that:

By computation:

Note: The following steps will be illustrated by the instructor on the whiteboard for a
step-by-step process.

Step 1:

Convert each octet of an IP address, 200.133.175.33 (written in dotted-decimal


notation) to its binary form to determine its first three (3) bits.

For first octet (200 → N2):


The value now of the first octet (200) in binary is equal to 11001000; its first three bits
from the left, which is considered as the highest order bits is 110. Hence, it is under
class C, since it belongs to the range of 11000000 to 11011111.

The default subnet mask for Class C is 225.255.255.0, which is equivalent to


11111111.11111111.11111111.00000000 in binary.

For second octet (133 → N2):

The second octet (133) in binary is equal to 10000101.

For third octet (175 → N2):

The third octet (175) in binary is equal to 10101111.

For fourth octet (33 → N2):

The fourth octet (33) in binary is equal to 00100001; 00 is added to the left side to
value to complete the 8–bit binary value.

Thus, the binary equivalent of an IP address, 200.133.175.33 is:


11001000.10000101.10101111. 00100001

Step 2:

“AND” the binary equivalent of the IP address with its equivalent default mask in binary.

Note: By referring to Table 6.2, it is understood that the default mask to be used is
225.255.255.0 and/or 11111111.11111111.11111111.00000000 when an IP Address
is in Class C.

By doing the above process, the network address is essentially the first three octets,
written either as 200.133.175 or 200.133.175.00, while the host address is the last
octet to the right, the 33.

Hence, ANDing a particular IP address with its corresponding default subnet mask in
binary extracts the network address. This just zeros out the host address portion of the
IP address.

Subnetting:

As the number of computers on an IP network grows, transfer of data becomes


heavy and causes packets to become slow, which results in network traffic due to
collision and retransmission. This situation can be avoided by means of subnetting.

What is subnetting? Subnetting refers to a process of borrowing bits from the


host ID field to form a new subnet ID field as shown in Figure 6.15 below:
Figure 6. 16: Creating a subnet by dividing the host identifier

As you can see, an IP address above already accommodates a network ID and


a host ID. Since we can’t expand the size of the IP address (32 bits for IPv4), we must
“borrow” some bits from the existing address to use for the subnet ID. However, we
can’t borrow bits from the network ID part of the IP address for the sole reason that
this has been pre-assigned by our ISP to uniquely identify our organization’s network.
Changing the network ID would wreck our ISP’s assignments of network ID’s to the
ISP’s customers. Hence, we are forced to borrow bits to create the subnet ID from the
existing host ID field.

When “borrowing” bits from the host ID to create the subnet ID, it is needed to
accurately determine the following information:

1) How many subnets are needed?


When estimating the required number of subnets, it is critical to consider
not only your current subnet needs, but also to plan for future growth. If
there is historical information available, use it as a guide to predict how
many subnets will be needed next year, two years from now, three, etc.
Remember to include both current and anticipated subnetworks in your
total. If your WAN links are handled as separate subnets, then count
each WAN link too.
2) How many bits must be “borrowed” from the host ID field for the new
subnet ID field to accommodate the required number of subnets?
3) What is the largest number of hosts that will ever be on a given subnet?
The maximum number of interfaces that will ever be needed for the
largest subnet must be counted. As with step 1, we must remember to
plan for growth. Use historical data if available, but also look for the
upcoming changes that could lead to significant growth not reflected in
the historical data. Remember to include not only network interfaces for
computers, but also any network interfaces in printers, routers, or any
other networked devices. Some computers (called multihomed hosts)
may have more than one NIC, in which case each NIC is counted
separately. Other devices (such as bridges or routers) will also have
more than one network interface.
4) How many bits must be retained in the host ID field to accommodate
the maximum number of hosts needed?

Sample Problem:

A company is granted a site address 138.45.0.0 and it needs to be subnet into


45 individual networks.

Solution:

1) Determine the class and the default mask of the IP address you have
been given.

By looking at the first octet of the given IP address, we can conclude


that it is a Class B, since it belongs to the range of 128 to 191. Hence,
it is also clear that the default mask to be used for this is 255.255.0.0
and/or 11111111.11111111.00000000.00000000.

2) Identify the number of subnetworks (subnets) that are required. Based


on the given problem, 45 individual networks (subnets) will be
required.
3) Determine how many bits are required to support the total number of
subnets.
You can determine this by figuring the binary value of 45.
This tells us that it takes a total of 6 bits to support the value of 45,
101101.

4) Once we have decided how many bits to use for the subnet ID, we can
determine the custom subnet mask for our network through changing
the leftmost zeroes of the default masks to ones based from the six (6)
bits as being instructed above. Please see example below.

Thus, the custom subnet mask in dotted-decimal notation is


255.255.252.0; to support 45 individual networks with a given network
ID of 138.45.0.0, we would have to use a subnet mask of
255.255.252.0.

5) Given our previous IP address of 138.45.0.0 with a subnet mask of


255.255.252.0, we can also determine all of the valid network IDs by
using the smallest bit of the custom subnet mask. This value becomes
the incremental value. Hence,
The decimal value of the smallest bit used is 4, so 4 will be the first
available subnetwork address with each address that follows increasing
by increments of 4. Thus, the first available subnet address will be
138.45.4.0 followed by 138.45.8.0 and so on.

6) List each subnet address starting with the incremental value determined
in step 5 and increase that value until the total number of available
subnets is reached. Get the total number of subnets available by using
the formula 2s – 2. The s component is the number of bits required to
support the total number of subnets.
Thus, 26 – 1 will be equal to 64 – 2 = 62.
7) Determine the number of host addresses that could support each
subnetwork by means of counting the remaining bits (zero’s) to the
right-hand side of the custom subnet mask and then use the formula 2h
- 2 to acquire the number of hosts. The h component is the number of
host bits in the custom subnet mask. For a host, the bit is 0, which
means it’s off.
Post-test:

I. Multiple Choice:

Read each statement carefully. You can write down your answers on a
separate answer sheet. (1 point each)

1) What is the correct order of layers in the TCP/IP model from highest
to lowest?
a) Application, b) Network Access,
Transport, Internet, Internet, Transport,
Network Access Application
c) Transport, d) Internet, Transport,
Application, Application, Network
Internet, Network Access
Access
2) Which of the following is a feature of IPv6 over IPv4?
a) Smaller address b) Dotted decimal
space notation
c) Larger address d) Deployed in 1981
space
3) Which class of IP address provides the largest number of host
addresses?
a) Class A b) Class B
c) Class C d) Class D
4) What is the primary purpose of subnetting?
a) To reduce the b) To increase network
number of IP traffic
addresses
available
c) To create smaller, d) To change the physical
manageable network layout
network segments
5) What does the MAC address uniquely identify?
a) A network protocol b) A network interface
card
c) An IP address d) A subnet mask
6) What is the role of a default gateway in a network?
a) To assign IP b) To provide data
addresses to hosts storage
c) To forward packets d) To filter traffic based on
to other networks MAC addresses
7) How many layers does the OSI model have compared to the TCP/IP
model?
a) OSI has 4 layers, b) OSI has 7 layers,
TCP/IP has 7 TCP/IP has 4 layers
layers
c) Both have 7 layers d) Both have 4 layers
8) What is the structure of an IPv4 address?
a) 16-bit hexadecimal b) 32-bit binary notation
notation
c) 128-bit dotted d) 32-bit dotted decimal
decimal notation notation
9) What does a subnet mask do?
a) Identifies the host b) Identifies the network
portion of an IP portion of an IP
address address
c) Assigns IP d) Encrypts data packets
addresses to hosts
10) Who usually assigns IP addresses within a network?
a) The ISP b) The network
administrator
c) The default d) The MAC address
gateway
Answer Key with explanation:

1) A - The TCP/IP model layers are ordered from highest to lowest as Application,
Transport, Internet, and Network Access.
2) C - IPv6 has a larger address space than IPv4, using 128-bit addressing scheme
compared to IPv4’s 32-bit.
3) A - Class A IP addresses use only one octet for the network identifier, leaving
three octets for host addresses, providing the largest number of host addresses.
4) C - Subnetting is used to divide a larger network into smaller, more manageable
segments or subnetworks.
5) B - The MAC address uniquely identifies a network interface card (NIC) on a
network.
6) C - The default gateway is used to forward packets from a local network to other
networks.
7) B - The OSI model has 7 layers, while the TCP/IP model has 4 layers.
8) D - An IPv4 address is structured in a 32-bit dotted decimal notation.
9) B - A subnet mask identifies the network portion of an IP address.
10) B - The network administrator or internet service provider usually assigns IP
addresses within a network
Reference:

Mueller, S. (2013). Upgrading and Repairing PC's 21st Edition. Indianapolis, Ind.:
Que

Oliviero, A. (2014)., Cabling: the complete guide to copper and fiberoptic networking,
5th ed. Indianapolis, IN: John Wiley and Sons

Sosinsky, B. (2009). Networking bible. Indianapolis, IN: Wiley Pub., inc.

Tanenbaum, A. (2011). Computer Networks (5th Edition). Boston: Pearson Prentice


Hall

You might also like