Chapter One Overview of IP Address and Subnetting

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Network device configuration (ITec4113) 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

Page 1 of 10 DTU prepared by: Alemu W.


Network device configuration (ITec4113) Chapter One Overview of IP Address and Subnetting

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)

127.0.0.0-127.255.255.255 Loopback address

224-239 Class D

240-255 Class E

169.254.x.x APIPA

0.0.0.0 Default route

1.2 Types of IP address

Public and Private IP Addresses

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.

Address Calss Network Address Number of Networks reserved

A 10.0.0.0 1

Page 2 of 10 DTU prepared by: Alemu W.


Network device configuration (ITec4113) Chapter One Overview of IP Address and Subnetting

B 172.16.0.0 – 172.31.0.0 16

C 192.168.0.0 – 192.168.255.0 256


Private addresses can be used internally by hosts in an organization as long as the hosts do not
connect directly to the Internet. Therefore, the same set of private addresses can be used by
multiple organizations. Private addresses are not routed on the Internet and will be quickly
blocked by an ISP router.

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.

1.3 Static and Dynamic Address Assignment

IP addresses can be assigned for devices either statically or dynamically.

Page 3 of 10 DTU prepared by: Alemu W.


Network device configuration (ITec4113) Chapter One Overview of IP Address and Subnetting

Static IP Address Assignment

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.

Dynamic IP Address Assignment

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

Page 4 of 10 DTU prepared by: Alemu W.


Network device configuration (ITec4113) Chapter One Overview of IP Address and Subnetting

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.

1.4 Introduction to Subnetting


Before subnetting:

• In any network (or subnet) one can use most of the IP addresses for host addresses.

• Two hierarchy (Network and Host)

• One loses two addresses for every network or subnet.


1. Network Address - One address is reserved to that of the network.

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:

Page 5 of 10 DTU prepared by: Alemu W.


Network device configuration (ITec4113) Chapter One Overview of IP Address and 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.

• Three hierarchy (Network, Subnet and Host) addresses will be created.

Example: Network address 172.16.0.0 with /16 network mask can be subnetted as follow.

• Default network mask: 255.255.0.0 or /16

Network Network Host Host

11111111 00000000 00000000


11111111
• etwork mask is subnet ted using a new subn et mask 255.255.255.0
The above /16 n
/24 as follow:

Network Subnet Host


Network

11111111 11111111 11111111 00000000


or

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.

Page 6 of 10 DTU prepared by: Alemu W.


Network device configuration (ITec4113) Chapter One Overview of IP Address and Subnetting

In the following sections you will learn how to create subnetting.

1.4.1 Creating subnets based on the network requirement


Steps:

1. Determine the number of networks required 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 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

1. Determine the number of networks required and convert it into binary


9 networks= 000001001
We need only 4 bits to denote 9 in binary.
2. Reserve bits in the mask and find the increment
Default mask: /24=255.255.255.0=11111111.11111111.11111111.00000000
Reserve bits in the mask: 11111111.11111111.11111111.11110000
New subnet mask: 255.255.255.240 or /28

Page 7 of 10 DTU prepared by: Alemu W.


Network device configuration (ITec4113) Chapter One Overview of IP Address and Subnetting

Increment=lowest bit in the network portion (Italic one) i.e. 16.


3. Find the network ranges based on the increment
Subnet Network Broadcast
Range of Valid Hosts
Address Address
(0000) (0001–1110) (1111)

0 (0000) 192.168.100.0 192.168.100.1–192.168.100.14 192.168.100.15


1 (0001) 192.168.100.16 192.168.100.17–192.168.100.30 192.168.100.31
2 (0010) 192.168.100.32 192.168.100.33–192.168.100.46 192.168.100.47
3 (0011) 192.168.100.48 192.168.100.49–192.168.100.62 192.168.100.63
4 (0100) 192.168.100.64 192.168.100.65–192.168.100.78 192.168.100.79
5 (0101) 192.168.100.80 192.168.100.81–192.168.100.94 192.168.100.95
6 (0110) 192.168.100.96 192.168.100.97– 192.168.100.111
192.168.100.110
7 (0111) 192.168.100.112 192.168.100.113– 192.168.100.127
192.168.100.126
8 (1000) 192.168.100.128 192.168.100.129– 192.168.100.143
192.168.100.142
9 (1001) 192.168.100.144 192.168.100.145– 192.168.100.159
192.168.100.158
10 (1010) 192.168.100.160 192.168.100.161– 192.168.100.175
192.168.100.174
11 (1011) 192.168.100.176 192.168.100.177– 192.168.100.191
192.168.100.190
12 (1100) 192.168.100.192 192.168.100.193– 192.168.100.207
192.168.100.206
13 (1101) 192.168.100.208 192.168.100.209– 192.168.100.223
192.168.100.222
14 (1110) 192.168.100.224 192.168.100.225– 192.168.100.239
192.168.100.238
15 (1111) 192.168.100.240 192.168.100.241– 192.168.100.255
192.168.100.254
For the organization you can take the first 9 sub networks i.e. (From subnet 0-8 both inclusive)
192.168.100.0/28
192.168.100.16/28
192.168.100.32/28
192.168.100.48/28
192.168.100.64/28

Page 8 of 10 DTU prepared by: Alemu W.


Network device configuration (ITec4113) Chapter One Overview of IP Address and Subnetting

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

1 172.16.2.0 172.16.2.1-172.16.3.254 172.16.3.255

2 172.16.4.0 172.16.4.1-172.16.5.254 172.16.5.255

3 172.16.6.0 172.16.6.1-172.16.7.254 172.16.7.255

. . . .

Page 9 of 10 DTU prepared by: Alemu W.


Network device configuration (ITec4113) Chapter One Overview of IP Address and Subnetting

. . . .

. . . .

127 172.16.254.0 172.16.254.1-172.16.255.254 172.16.255.255

VLSM (Variable Length Subnet Masks)

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:

• Create a larger subnet of more than 255 host addresses

• Create very small subnets for WAN links


Example: Given the 172.16.5.0/24 network and requirements below, develop a subnetting
scheme with the use of VLSM:

• LAN1 must support 330 hosts

• WAN must support 2 hosts for a T1 circuit to a remote site

• LAN3 must support 6 hosts


The first step is to determine what mask allows the required number of hosts.

• LAN1 requires a /23 (255.255.254.0) mask to support 510 hosts

• WAN requires a /30 (255.255.255.252) mask to support 2 hosts

• 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:

• LAN1 —172.16.5.0/23 address range 5.0 to 6.255

• LAN3 —172.16.7.0/28 address range 0 to 7

• WAN —172.16.7.8/28 address range 8 to 11

Reading Assignment

1. IPv6
2. Unicast, multicast and broadcast addresses in IPv4 and IPv6 (if any)
3. CIDR (will be covered on chapter 4)

Page 10 of 10 DTU prepared by: Alemu


W.

You might also like