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

Lab 6 - IPv4 Addressing

The document provides an overview of IPv4 addressing, focusing on binary conversion and classful addressing. It explains how to convert binary addresses to dotted decimal format and vice versa, detailing the structure of IPv4 addresses and the significance of octets. Additionally, it outlines the classification of IPv4 addresses into classes A, B, C, D, and E, with a focus on private addresses used within local networks.

Uploaded by

sengelrogers
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)
28 views6 pages

Lab 6 - IPv4 Addressing

The document provides an overview of IPv4 addressing, focusing on binary conversion and classful addressing. It explains how to convert binary addresses to dotted decimal format and vice versa, detailing the structure of IPv4 addresses and the significance of octets. Additionally, it outlines the classification of IPv4 addresses into classes A, B, C, D, and E, with a focus on private addresses used within local networks.

Uploaded by

sengelrogers
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

Computer Networks 1

IPv4 Classless addressing & Binary Conversion

Lab 6
IPv4 Address Structure

Binary Notation

A string of 32 bits is difficult to interpret and even more difficult to remember. Therefore, we represent IPv4
addresses using dotted decimal format instead of binary.

Binary Number System

In IPv4, addresses are 32-bit binary numbers. However, for ease of use by people, binary patterns representing
IPv4 addresses are expressed as dotted decimals. This is first accomplished by separating each byte (8 bits) of
the 32-bit binary pattern, called an octet, with a dot. It is called an octet because each decimal number
represents one byte or 8 bits.

The binary address:

11000000 10101000 00001010 00001010 is expressed in dotted decimal as: 192.168.10.10

Converting a Binary Address to Decimal

Each octet is made up of 8 bits and each bit has a value, either 0 or 1. The four groups of 8 bits have the same
set of valid values in the range of 0 to 255 inclusive. The value of each bit placement, from right to left is 1, 2,
4, 8, 16, 32, 64, and 128.

Determine the value of the octet by adding the values of positions wherever there is a binary 1 present.

If there is a 0 in a position, do not add the value.

If all 8 bits are 0s, 00000000, the value of the octet is 0.

If all 8 bits are 1s, 11111111, the value of the octet is 255 (128+64+32+16+8+4+2+1)

If the 8 bits are mixed, the values are added together. For example, the octet 00100111 has a value
of 39 (32+4+2+1).

So the value of each of the four octets can range from 0 to a maximum of 255.
Reference : http://teachweb.milin.cc/datacommunicatie/tcp_osi_model/network_layer/ipv4.htm
https://www.geeksforgeeks.org/introduction-of-classful-ip-addressing/
Using the 32-bit IPv4 address, 11000000101010000000101000001010, convert the binary
representation to dotted decimal using the following steps:

Step 1. Divide the 32 bits into 4 octets.


Step 2. Convert each octet to decimal.
Step 3. Add a "dot" between each decimal.

Sample Questions

1. 11000000.10101000.00001110.10000011

2. 10101100.00010000.10000000.00000001

3. 00001000.10100111.10101010.00101101

Videos: https://www.youtube.com/watch?v=Y5yk4UJMq2A
https://www.khanacademy.org/math/algebra-home/alg-intro-to-
algebra/algebra-alternate-number-bases/v/number-systems- introduction
https://www.youtube.com/watch?v=dhjgLwqsUI8
https://networklessons.com/subnetting/subnetting-in-binary

Reference : http://teachweb.milin.cc/datacommunicatie/tcp_osi_model/network_layer/ipv4.htm
https://www.geeksforgeeks.org/introduction-of-classful-ip-addressing/
Converting from Decimal to Binary

In addition to being able to convert binary to decimal, it is also necessary to understand how to convert
decimal to binary.

Because we represent IPv4 addresses using dotted decimal format, it is only necessary that we examine
the process of converting 8-bit binary to the decimal values of 0 to 255 for each octet in an IPv4 address.

To begin the conversion process, we start by determining if the decimal number is equal to or greater than
our largest decimal value represented by the most-significant bit. In the highest position, we determine if
the octet number is equal to or greater than 128. If the octet number is smaller than 128, we place a 0 in
the bit position for decimal value 128 and move to the bit position for decimal value 64.

If the octet number in the bit position for decimal value 128 is larger than or equal to 128, we place a 1 in
the bit position for decimal value 128 and subtract 128 from the octet number being converted. We then
compare the remainder of this operation to the next smaller value, 64. We continue this process for all the
remaining bit positions.

Sample Questions

1. 12.11.10.4
2. 180.16.10.4
3. 220.150.11.3

Videos: https://www.youtube.com/watch?v=ec2AA4TfUow
https://www.youtube.com/watch?v=ImJSldHR0WA
https://www.youtube.com/watch?v=PZpGF25oES4
https://www.youtube.com/watch?v=uE5gdwr1mE0

Reference : http://teachweb.milin.cc/datacommunicatie/tcp_osi_model/network_layer/ipv4.htm
https://www.geeksforgeeks.org/introduction-of-classful-ip-addressing/
Classful Addressing

These are addressing space that is divided into five classes namely Class A,Class B, Class C and Class
E. Note Class A,B and C has valid IP addresses in which the order of bits in the first octet determine
the classes of IP address . Also it should be known that Class D and Class E are used for experimental
needs and reserved for multicast.

IPv4 addresses divided into two parts :

Network ID (N)
Host ID (h)

Classful
IPv4
Private
addresses

Used with LAN or Network


Not recognized over internet
Assigned by LAN administrator

Unique only in LAN privately

Reference : http://teachweb.milin.cc/datacommunicatie/tcp_osi_model/network_layer/
ipv4.htm https://www.geeksforgeeks.org/introduction-of-classful-ip-addressing/
Private Addresses

Identify classes Underline network portions Underline host portions

11.9.0.1 _______ 148.17.9.1 198.125.87.1

151.10.15.0 ________ 192.10.1.4 172.16.0.255

194.14.2.0 ________ 126.8.154.0 223.250.200.222

149.18.9.1 ________ 220.200.23.1 17.45.225.45

193.43.1.1 ________ 10.3.0.7 126.201.54.231

125.9.156.0 ________ 172.16.2.4 191.41.35.112

217.45.30.0 ________ 180.16.1 100.25.1.1

Reference : http://teachweb.milin.cc/datacommunicatie/tcp_osi_model/network_layer/ipv4.htm
https://www.geeksforgeeks.org/introduction-of-classful-ip-addressing/

You might also like