0% found this document useful (0 votes)
13 views6 pages

Lsn6 IP Addressing

Ict Notes

Uploaded by

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

Lsn6 IP Addressing

Ict Notes

Uploaded by

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

IP Addressing

What is an IP address?
- An Internet Protocol address (IP address) is a numerical label assigned to each device
connected to a computer network that uses the Internet Protocol for communication
especially on the internet.
- It is an address with information on how to reach a specific host or resource, especially
outside the LAN.
- An IP address should not be confused with a MAC address. Media Access Control (MAC)
address is a unique number that is embedded on a device connected to a network for
identification purposes. The MAC address is hardwired on the device’s NIC and therefore it
is used to identify a device on a network. MAC addresses are usually important on LAN
setup other than on the internet. Thus, MAC addresses allows physical and have a
permanent identification whereas IP addresses are logical and may change each time a
device is connected to the internet. Only IP addresses for servers can be permanent.
Private, Public and Reserved IP addresses
IP addresses are classified into private and public IP addresses.
Public IP Addresses
A public IP address is the one that is used to identify a host on the internet and is not reserved for
use on private organisation’s network. A computer with a public IP addresses can be viewed on a
global scale, allowing other machines on the internet to communicate with it. Public IP addresses
are unique the world over, allowing computers to see each other and exchange data on a global
scale. Public IP addresses are assigned by the ISP.
Private IP addresses
Private IP addresses, also known as local IP addresses, are those that are reserved for use within
an organisation’s network, e.g on a LAN or intranet. Computers with private IP addresses cannot
communicate on the internet directly but have to communicate with the outside through a router.
Private IP addresses are available for use behind the router. Private IP addresses are issued by a
router to computers that are connected to it. This provides unique identification for devices on
the LAN during that session. Private IP addresses never leave a LAN.
Private IP addresses provide an entirely separate set of addresses that still allow access on a
network but without taking up a public IP address space. This is because the world is running out
of IP addresses as too many electronic gadgets are being connected to the internet. The following
IP address ranges are available for use as private IPs:
- 10.0.0.0 to 10.255.255.255
- 172.16.0.0 to 172.31.255.255
- 192.168.0.0 to 192.168.255.255
It does not matter if the private IP addresses for different organisations’ computers are the same
since they do not directly communicate with each other over the internet. They communicate
through their router.
Note: An organization can be given both a private IP address and a public IP address. The private
IP address would be used when communicating with other devices locally within the intranet.
The public IP address would be used for communication with other devices over the internet.
Reserved IP addresses
These are IP addresses that cannot be used for communications between hosts on the internet.
Additionally, reserved IP addresses are set aside for other purposes, for example, IP address
127.0.0.1 is used as a loop back facility. It is used for testing your computer’s network adapter. If
used, the user would be informed that he or she is trying to connect to his or her own computer.
No data or traffic addressed to this IP address would be transferred either on a LAN or over the
internet. Also, the first address 0.0.0.0 refers to the default network while the IP address
255.255.255.255 is called the broadcast address.
Static and Dynamic IP addressing
Static IP addressing
A static IP address is the address provided by the ISP for an individual organization and this
would never change. Even if users reboot the router or modem, it will stay the same. It is
assigned permanently and physically to a host, for example IP address of a server. Static IP
addresses are ideal as public IP addresses for large organisations. On a LAN, one can also assign
specific IP addresses to individual computer and every time the computer connects to the
internet, it will use that IP address assigned to it. However, if two or more computers are
assigned the same static IP address, then only one of them will connect to the internet at a time,
the other computers would get connected if the currently connected computer is disconnected.
Dynamic IP Addressing
Using this scheme, computers pick an IP address that is not in use at that time. Thus every time
the computer connects to the internet, it can use a different IP address. However, only available
IP addresses within the range or address space can be picked. This is ideal for public IP
addresses for home users and other small businesses. A dynamic IP address is automatically
assigned to a host by a DHCP server every time it needs an internet connection. A dynamic IP
address is different each time a device gets connected to the internet.
Dynamic IP addressing is very flexible, easy to setup, easy to administer and to manage than
static IPs. Devices would be free to pick up any available IP address. Also, they offer some form
of security since no one is more likely to track users using a dynamic IP address.
IP address Versions
There two versions of IP addresses, namely:
- IPv6 (Internet protocol Version 6)
- IPv4 (Internet Protocol Version 4)
(a) IPv6
IPv6 was developed as a response to exhaustion of IP addresses available for IPv4. However, it
is still to be fully deployed and adopted, most devices still run on IPv4. IPv6 would change the
address size from 32 bits to 128 bits, giving an address space of 2 128. This change needs existing
hardware to be changed. IPv6 addresses are written in hexadecimal.
(b) IPv4
IPv4 has been in existence for a long time and is the widely used protocol for internet
connections to this day. Most computers on the internet use IPv4. IPv4 addresses are in binary
notation but are displayed in human readable form. The IP Address is a 32 bit unique address
having an address space of 232.
Format of an IP address
This section looks at the format of IPv4 address since it is the most widely used as compared to
IPv6. Generally, an IPv4 address is written in dotted decimal notation, hexadecimal notation,
octal notation or binary notation. However, the dotted decimal and the binary notions are of
concern in this book. IP address classes also form part of the IP address format.
(a) Dotted decimal notation
Using the dotted decimal notation, an IPv4 address always consists of 4 base ten numbers
separated by periods, with the numbers having a possible range of 0 through 255, e.g.
192.168.1.102
(b) Using the binary notation
This represents an IP address as a binary number with 4 octets that are separated by a full stop,
for example 10000000.00001101.00000011.00011111. Each octet has 8 bits, which give 32 bits
in total. The binary notation is usually converted to the decimal notation for readability to users.
Each IP address format, whether in decimal or binary notation, serves two principal functions:
- Network identification and
- Host identification
The Network Identifier (NetworkID) identifies the specific network where the host computer is
found. The Host identifier (HostID) is used to identify the host computer within the network. The
general format of an IP address is as given below.

32 bits

Network Host

8 bits 8 bits 8 bits 8 bits


. . .
192 . 168 . 1 . 102

Fig 3.30 IP Address format

The decimal format for IP address 192.168.1.102 can be represented in binary notation by simply
converting each octet to binary and representing the value using 8 bit. This this gives us
11000000.10101000.00000001.01100110

The higher order left-most bits indicate Network class while the right bits indicate the host. The
assigned NetworkID and HostID could differ with the class that the IP address belongs to. Using
the classiful IP addressing mechanism, the following indicates the various IP address classes.

IP address Classes

Class Format Start Default Subnet Theoretical IP No. of Bits


Bits Mask Address Range Network Host
A N.H.H.H 0 255.0.0.0 1.0.0.0 – 7 24
127.255.255.255
B N.N.H.H 10 255.255.0.0 128.0.0.0 – 14 16
191.255.255.255
C N.N.N.H 110 255.255.255.0 192.0.0.0 – 22 8
223.255.255.255
D N/A 1110 N/A 224.0.0.0 – N/A
239.255.255.255
E N/A 1111 N/A 240.0.0.0 – N/A
255.255.255.255

N-Network bits, H – Host bits

IP address classes include Class A, Class B, Class C, Class D and class E as illustrated in the
table above. Classes A, B and C are the only ones available for commercial use.
Class A
If the first bit of the first octet of an IP address is a binary 0, the address is a Class A address.
With that first bit being a 0, the lowest network number that can be represented is 00000000,
decimal 0. The highest network number that can be represented is 01111111, decimal 127. Any
address that starts with a value between 0 and 127 in the first octet is a Class A address. These
two numbers, 0 and 127, are reserved and cannot be used as a network address.
Class A is for very few large organisations. Class A address uses the first 8 bits for the network
Address and the other 24 bits for host addresses. We can write this as N.H.H.H. IP addresses
127.0.0.0 to 127.255.255.255 cannot be used and is reserved for loopback, broadcasting and
diagnostic functions.

Calculating the number of network blocks


- From the format N.H.H.H, we have 1 byte for N, which give us 8 bits. However the first
bit, 0 is not available so we have 7 bits left
- 27 = 128 networks
- However, networks 0 and 127 are not utilized therefore 126 networks are addressable.

Number of Hosts
- From the format N.H.H.H, we have 3 bytes of H, which gives us 24 bits
- 224 = 16 777 216
- Two of these IP addresses, the lowest (which is all 0s, representing the NetworkID) and
the highest (all 1s, for broadcasting) are reserved. This gives us 16 777 214 hosts that can
be addressed. For example, IP address 192.0.0.0 is a Network ID, while 192.255.255.255
will be a broadcasting IP address.

Total number of addresses


- 128 networks multiplied by 16 777 214 hosts per network

Note: Also note that address 127.0.0.0/8 is used for loopback.

Class B
Class B addresses start with a binary 10 in the first 2 bits of the first octet. Therefore, the lowest
network number that can be represented with a Class B address is 10000000, decimal 128. The
highest network number that can be represented is 10111111, decimal 191. Any address that
starts with a value in the range of 128 to 191 in the first octet is a Class B address.
This is a class reserved for medium-size organisations. Class B address uses 16 bits for the
network address and 16 bits for host addresses. We can write this as N.N.H.H.

Calculating the number of network blocks


- From the format N.N.H.H, we have 2 bytes for N, which give us 16 bits. However the
first 1 bits, 10 are not available so we have 14 bits left
- 214 = 16 384 networks

Number of Hosts
- From the format N.N.H.H, we have 2 bytes of H, which gives us 16 bits
- 216 = 65 536
- Two of these are reserved, leaving us with 65 534 hosts

Total number of addresses


- 16 384 networks multiplied 65 534 hosts per network

Other bits represent broadcasting address.

Class C
A Class C address begins with binary 110. Therefore, the lowest number that can be represented
is 11000000, decimal 192. The highest number that can be represented is 11011111, decimal
223. If an IPv4 address contains a number in the range of 192 to 223 in the first octet, it is a
Class C address. This is for small organisations.
The first three octets of a Class C address represent the network number. The last octet may be
used for hosts. One host octet yields 256 (2 8) possibilities. After the all-0s network number and
the all-1s broadcast address are subtracted, only 254 hosts may be addressed on a Class C
network. Whereas Class A and Class B networks prove impossibly large without subnetting,
Class C networks can impose an overly restrictive limit on hosts.
Because the first 3 bits of a Class C address are always 110, 21 bits are left in the network
portion of the address, resulting in 221 or 2 097 152 Class C networks.
Class D
A Class D address begins with binary 1110 in the first octet. Therefore, the first octet range for a
Class D address is 11100000 to 11101111, or 224 to 239. Class D addresses are not used to
address individual hosts. Instead, each Class D address can be used to represent a group of hosts
called a host group, or multicast group
Class E
If the first octet of an IP address begins with 1111, the address is a Class E address. Therefore,
the first octet range for Class E addresses is 11110000 to 1111111, or 240 to 255. Class E
addresses are reserved for experimental purposes and should not be used to address hosts or
multicast groups.
IP Address Subnetting
Large and complex networks can be split into multiple smaller network segments called subnets.
This gives rise to classless IP addressing. This concept is beyond the scope of this book.

You might also like