Chapter One Overview of IP Address and Subnetting
Chapter One Overview of IP Address and Subnetting
Chapter One Overview of IP Address and Subnetting
Chapter One
Overview of IP address and Subnetting
1.1 Basics of IPv4
One of TCP/IP’s distinguishing features is its universal addressing scheme whereby each
computer on a TCP/IP network has an address that uniquely identifies it. This universal
addressing scheme extends even to the world-wide Internet, connecting more than two million
computers that are connected to thousands of separate networks.
It’s IP’s responsibility to deliver datagrams among the TCP/IP networked computers. To make
such deliveries possible, each computer has a unique IP address. The IP address contains
sufficient information to uniquely identify a network and a specific computer on the network.
In short, 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. The 32 binary bits are broken into four octets (1
octet = 8 bits). 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,
172.16.81.100). The value in each octet ranges from 0 to 255 decimal, or 00000000 - 11111111
binary.
Network Classes
Because a computer’s IP address must uniquely identify not only the computer but also the
network the computer is attached to, the IP address is split between a network identifier (net
id) part and a host identifier (host id) part. The split between these two identifiers isn’t the same
for all IP addresses. The class of the address determines how many bits of the IP address are
reserved for network identification and how many are reserved for host identification. There
are five classes of IP address with only the first three relevant to the majority of users. Classes
A, B, and C are for general-purpose use; classes D and E are reserved for special purposes.
CLASSES Network ranges No. of possible Hosts per Default
networks subnet mask
Network
A 1 –126 126 16,777,214 255.0.0.0
B 128-191 16,382 65,534 255.255.0.0
C 192-223 2,097,150 254 255.255.255.0
SPECIAL IP ADDRESSES
There are some IP addresses that are reserved for special purpose. So these IP addresses can’t
be used for any personal use like as IP address to a router, PC, Printer etc. Some of the
followings are reserved / special IPv4 addresses.
IP addresses also called Description (Complete yourself)
224-239 Class D
240-255 Class E
169.254.x.x APIPA
All hosts that connect directly to the Internet require a unique public IP address. Because of
the finite number of 32-bit addresses available, there is a risk of running out of IP addresses.
One solution to this problem was to reserve some private addresses for use exclusively inside
an organization. This allows hosts within an organization to communicate with one another
without the need of a unique public IP address.
RFC 1918 is a standard that reserves several ranges of addresses within each of the classes A,
B and C. As shown in the table, these private address ranges consist of a single Class A
network, 16 Class B networks and 256 Class C networks. This gives a network administrator
considerable flexibility in assigning internal addresses.
A very large network can use the Class A private network, which allows for over 16 million
private addresses. On medium size networks, a Class B private network could be used, which
provides over 65,000 addresses. Home and small business networks typically use a single class
C private address, which allows up to 254 hosts.
The Class A network, the 16 Class B networks, or the 256 Class C networks can be used within
any size organization. Typically many organizations use the Class A private network.
A 10.0.0.0 1
B 172.16.0.0 – 172.31.0.0 16
The use of private addresses can provide a measure of security since they are only visible on
the local network, and outsiders cannot gain direct access to the private IP addresses.
With a static assignment, the network administrator must manually configure the network
information for a host. At a minimum, this includes the host IP address, subnet mask and
default gateway. Static addresses have some advantages. For instance, they are useful for
printers, servers and other networking devices that need to be accessible to clients on the
network. If hosts normally access a server at a particular IP address, it would not be good if
that address changed. Static assignment of addressing information can provide increased
control of network resources, but it can be time consuming to enter the information on each
host. When entering IP addresses statically, the host only performs basic error checks on the
IP address. Therefore, errors are more likely to occur.
When using static IP addressing, it is important to maintain an accurate list of which IP
addresses are assigned to which devices. Additionally, these are permanent addresses and are
not normally reused.
On local networks it is often the case that the user population changes frequently. New users
arrive with laptops and need a connection. Others have new workstations that need to be
connected. Rather than have the network administrator assign IP addresses for each
workstation, it is easier to have IP addresses assigned automatically. This is done using a
protocol known as Dynamic Host Configuration Protocol (DHCP). DHCP provides a
mechanism for the automatic assignment of addressing information such as IP address, subnet
mask, default gateway, and other configuration information. DHCP is generally the preferred
method of assigning IP addresses to hosts on large networks since it reduces the burden on
network support staff and virtually eliminates entry errors. Another benefit of DHCP is that an
address is not permanently assigned to a host but is only leased for a period of time. If the host
is powered down or taken off the network, the address is returned to the pool for reuse. This is
especially helpful with mobile users that come and go on a network.
• In any network (or subnet) one can use most of the IP addresses for host addresses.
2. Broadcast Address – One address is reserved to address all hosts in that network or
subnet.
For example, a Class B address of 172.16.0.0/16 is used to assign 216-2=65, 534 IP
addresses for hosts. Suppose the organization needs 1000 IP addresses and if the technician
uses this Network address without subnetting we will lose a number of IP addresses.
During subnetting:
• Applying a mask which is larger than the default subnet mask, will divide your network
into subnets. This is possible by borrowing bits from the host portion to network.
Example: Network address 172.16.0.0 with /16 network mask can be subnetted as follow.
Important formulas:
• Noof possible Networks: 2N (N is the number of bits for the network/subnet portion)
• Noof hosts per networks: 2H-2 (H is the number of bits for the host portion)
With the new subnet mask you will have 256 networks/ subnets addresses and each subnet will
support 254 hosts which is manageable for the network administrator. Out of the total subnets,
for instance, four of them are used for the following network topology: Netwok A:
172.16.0.0/24, Netwok B: 172.16.10.0/24, Netwok C: 172.16.5.0/24 and Netwok D:
172.16.15.0/24.
Assume that the organization has a network address of 192.168.100.0/24 and if this
organization asks you to make this a Class C address in to nine valid networks, show that how
you do the subnetting.
Solution
192.168.100.80/28
192.168.100.96/28
192.168.100.112/28
192.168.100.128/28
1.4.2 Creating subnets based on the host requirement
Steps:
1. Determine the number of host required per networks and convert it into binary.
2. Reserve bits in the mask and find the increment
3. Find the network ranges based on the increment Example:
Assume that the organization has a network address of 172.16.0.0/16 and this organization asks
you to divide this Class B address in to subnets. The organization needs each sub network to
support 400 hosts. Show that how you do the subnetting.
Solution
1. Determine the number of hosts required per network and convert it into binary
400 hosts per networks= 110010000
We need only 9 bits to denote 400 in binary.
2. Reserve bits in the mask and find the increment
Default mask: /16=255.255.0.0=11111111.11111111.00000000.00000000
Reserve bits in the mask: 11111111.11111111.11111110.00000000
New subnet mask: 255.255.254.0 or /23
Increment=lowest bit in the network portion (Italic one) i.e. 2.
3. Find the network ranges based on the increment
Network Broadcast
Address Range of Valid Hosts Address
Subnet
0 172.16.0.0 172.16.0.1-172.16.1.254 172.16.1.255
. . . .
. . . .
. . . .
VLSMs allow you to use different masks for each subnet, and thereby use address space
efficiently. With private address space, it is rarely necessary to shrink below a /24 subnet mask
as space is plentiful. Use VLSM to:
• LAN3 requires a /29 (255.255.255.248) mask to support 6 hosts The easiest way
to assign the subnets is to assign the largest first.
For example: You can assign the subnets in this manner:
Reading Assignment
1. IPv6
2. Unicast, multicast and broadcast addresses in IPv4 and IPv6 (if any)
3. CIDR (will be covered on chapter 4)