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

Ip Address Concepts

The document provides an overview of IPv4, including its definition, structure, types, and classes of IP addresses. It explains subnetting, its purposes, and methods for calculating subnets, as well as the differences between public and private IPv4 addresses. Additionally, it introduces Classless Inter-Domain Routing (CIDR) and its benefits for efficient IP address allocation and routing.
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 views12 pages

Ip Address Concepts

The document provides an overview of IPv4, including its definition, structure, types, and classes of IP addresses. It explains subnetting, its purposes, and methods for calculating subnets, as well as the differences between public and private IPv4 addresses. Additionally, it introduces Classless Inter-Domain Routing (CIDR) and its benefits for efficient IP address allocation and routing.
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/ 12

DATA COMMUNICATION

AND
NETWORKING

Definition of IPv4 and IP Addresses

IPv4 (Internet Protocol version 4)

IPv4 is a core protocol of the Internet Protocol suite, used to identify devices on a network using
a 32-bit address scheme. It is the fourth version of the Internet Protocol and provides the
foundation for addressing and routing data packets across interconnected networks.

IP Address

An IP address (Internet Protocol address) is a unique numerical label assigned to each device
connected to a network that uses the Internet Protocol for communication. It serves two primary
purposes:

1. Identification: Identifies the host or network interface.


2. Location Addressing: Provides the location of the device in the network.

Structure of IPv4 Addresses

 IPv4 addresses are 32-bit binary numbers divided into four octets (8 bits each).
 Written in dotted decimal notation, e.g., 192.168.0.1.
 Each octet ranges from 0 to 255.

Types of IPv4 Addresses

1. Public IP Addresses: Used to identify devices on the global Internet.


2. Private IP Addresses: Used within private networks; not routable on the Internet (e.g.,
192.168.0.0 to 192.168.255.255).
3. Special IP Addresses:
o Loopback Address: 127.0.0.1 (used for testing within the host).
o Broadcast Address: Sends data to all devices in a network (e.g.,
255.255.255.255).
o APIPA: Automatic Private IP Addressing (e.g., 169.254.x.x).

Classes of IPv4 Addresses


IPv4 addresses are divided into five classes based on their first octet:

1. Class A: 0.0.0.0 to 127.255.255.255 (large networks).


2. Class B: 128.0.0.0 to 191.255.255.255 (medium-sized networks).
3. Class C: 192.0.0.0 to 223.255.255.255 (small networks).
4. Class D: 224.0.0.0 to 239.255.255.255 (multicasting).
5. Class E: 240.0.0.0 to 255.255.255.255 (reserved for experimental purposes)
1
IPv4 Address Classes

IPv4 addresses are divided into five classes (A, B, C, D, and E) based on the range of the first
octet. Each class is designed for specific purposes, allowing flexible allocation for different types
of networks.

Class A

 Range: 0.0.0.0 to 127.255.255.255


 Default Subnet Mask: 255.0.0.0 or /8
 Purpose: Used for very large networks.
 Number of Networks: 128(27 )
 Number of Hosts: 16,777,214 per network (224−2)
 Example: 10.0.0.1 (private IP).

Class B

 Range: 128.0.0.0 to 191.255.255.255


 Default Subnet Mask: 255.255.0.0 or /16
 Purpose: Used for medium-sized networks.
 Number of Networks: 16,384 (214)
 Number of Hosts: 65,534 per network (216- 2)
 Example: 172.16.0.1 (private IP).

Class C

 Range: 192.0.0.0 to 223.255.255.255


 Default Subnet Mask: 255.255.255.0 or /24
 Purpose: Used for small networks.
 Number of Networks: 2,097,152(221 )
 Number of Hosts: 254 per network (28- 2)
 Example: 192.168.1.1 (private IP).

2
Class D (Multicast Addressing)

 Range: 224.0.0.0 to 239.255.255.255


 Purpose: Reserved for multicasting, where data is sent to a group of devices rather than
a single device.

Multicasting Explained

Multicasting is a method of communication where one source sends a single packet to multiple
recipients simultaneously. This is commonly used for applications like streaming video,
conferencing, and routing updates.

Example of Multicast:

 Multicast Address: 239.255.0.1


 Use case: A video server broadcasting a live event to all devices in a multicast group.
Devices that want to receive the stream must join the multicast group.

Class E

 Range: 240.0.0.0 to 255.255.255.254


 Purpose: Reserved for experimental or future use. These addresses are not assigned for
use in public networks and are often used for research and development.

Example Use Case of Class E

 Testing Future Protocols: A research organization might use a Class E address (e.g.,
240.0.0.1) in a controlled lab environment to test new communication protocols.

Summary of IPv4 Classes

Class Address Range Subnet Mask Purpose


A 0.0.0.0 - 127.255.255.255 255.0.0.0 Large networks
B 128.0.0.0 - 191.255.255.255 255.255.0.0 Medium networks
C 192.0.0.0 - 223.255.255.255 255.255.255.0 Small networks
D 224.0.0.0 - 239.255.255.255 N/A Multicasting
Reserved for future
E 240.0.0.0 - 255.255.255.254 N/A
use

3
SUBNETTING

Subnetting is the process of dividing a larger network into smaller, more manageable
subnetworks (subnets). It helps optimize the use of IP addresses, enhance network performance,
and improve security and management.

Purpose of Subnetting

1. Efficient Use of IP Addresses: Prevents wastage of IP addresses.


2. Improved Network Performance: Reduces network traffic by localizing it within
subnets.
3. Enhanced Security: Isolates networks to limit unauthorized access.
4. Simplified Management: Divides networks based on organizational or geographical
needs.

Subnet Mask

A subnet mask determines which portion of an IP address represents the network and which
portion represents the host. It is written in the same format as an IP address, e.g.,
255.255.255.0.

CIDR Notation

Classless Inter-Domain Routing (CIDR) notation simplifies the representation of subnet masks:

 Format: IP_address/prefix_length, e.g., 192.168.1.0/24.


 The prefix length /24 indicates 24 bits are used for the network portion.

Subnetting Example

 IP Address: 192.168.1.0/24
 Subnet Mask: 255.255.255.0
 Number of Hosts: 232−24−2=256−2=254(subtract 2 for network and broadcast
addresses).

Example1

Let's go through the process step-by-step to calculate the network ID, first host, last host,
decimal subnet mask, usable hosts, and broadcast ID for the IP address 192.168.1.10/27

Step 1: Understand the Subnet Mask

The /27 indicates that 27 bits are used for the network portion, leaving 5 bits for the host portion.

4
- The subnet mask for /27 in decimal is 255.255.255.224.

- The subnet mask in binary would look like this:

11111111.11111111.11111111.11100000

- 255 = 11111111

- 224 = 11100000

Step 2: Determine the Subnet Size and Increment

- The number of available IP addresses in each subnet is 2^5 = 32 (since there are 5 host bits
remaining).

- The increment is 32 (each subnet will have 32 IP addresses).

*Step 3: Find the Subnet Range for 192.168.1.10/27*

Now, we need to find which subnet 192.168.1.10 belongs to:

- /27 subnet will have blocks of 32 addresses.

- The nearest multiple of 32 before 192.168.1.10 is 192.168.1.0.

So, the subnet range for 192.168.1.10/27 is from 192.168.1.0 to 192.168.1.31.

*Subnet Information for 192.168.1.10/27*

- Network Address (Network ID): 192.168.1.0

- Broadcast Address: 192.168.1.31

Step 4: Find the Network ID, First Host, Last Host, Usable Hosts, and Broadcast Address

Now, let’s break down the information for the subnet 192.168.1.0/27:

1. Network ID (Network Address): - The network ID is the first address in the subnet

- Network ID: 192.168.1.0

2. First Host: - The first host is the first usable IP address in the subnet, which is one more than
the network ID
5
- First Host: 192.168.1.1

3. Last Host: - The last host is the last usable IP address in the subnet, which is one less than
the broadcast address.

- Last Host: 192.168.1.30

4. Broadcast Address: - The broadcast address is the last address in the subnet, where all the
host bits are set to 1.

- Broadcast Address: 192.168.1.31

5. Usable Hosts: - The total number of IP addresses in the subnet is 32.

- Since the network address and the broadcast address are reserved, the number of usable hosts
is 32 - 2 = 30.

- Usable hosts range from 192.168.1.1 to 192.168.1.30

6. Decimal Subnet Mask: - The decimal subnet mask for /27 is 255.255.255.224.

*Summary of Information for 192.168.1.10/27*

- Network ID (Network Address): 192.168.1.0

- First Host: 192.168.1.1

- Last Host: 192.168.1.30

EXAMPLE 2.
Find The Network Id , First Host, Last Host, Decimal Subnet Mask, Usable Host And The
Broadcast Id.
1. 192.168.1.10/27
2. 192.168.1.67/24

1. 192.168.1.10/27

Solution

Find the network to which 192.168.1.10 belongs.


The network range is a multiple of the block size (32) in the last octet:
192.168.1.0 - 192.168.1.32,192.168.1.64,… 192.168.1.10 falls in the range 192.168.1.0 -
192.168.1.31.
Network ID: 192.168.1.0.

6
Key Concepts in Subnetting
Subnetting Calculation
To subnet a network:

1. Determine the number of required subnets or hosts.


2. Calculate the new subnet mask.
3. Divide the IP address range into subnets.

VLSM (Variable Length Subnet Masking)

Allows using different subnet masks within the same network, optimizing IP address allocation.

FLSM (Fixed Length Subnet Masking)

Uses the same subnet mask for all subnets, simpler but less efficient.

Subnetting Formula

1. Number of Subnets: 2n (where n is the number of bits borrowed).


2. Number of Hosts per Subnet: 2h−2 (where hhh is the number of host bits).

Subnetting Example with Calculation

Given: 192.168.1.0/24, divide into 4 subnets.

1. Borrow 2 bits (to create 22=4 subnets).


2. New Subnet Mask: /26 or 255.255.255.192.
3. Subnets:
o Subnet 1: 192.168.1.0 - 192.168.1.63
o Subnet 2: 192.168.1.64 - 192.168.1.127
o Subnet 3: 192.168.1.128 - 192.168.1.191
o Subnet 4: 192.168.1.192 - 192.168.1.255.

Identifying The Difference Between Ipv4 Public Address And Private Nerworks
Addresses

IPv4 Public Addresses

7
1. Definition:
Public IPv4 addresses are globally unique addresses that are assigned to devices that
communicate directly over the internet.
2. Accessibility:
These addresses are routable on the global internet, meaning they are accessible and can
send and receive data over the internet.
3. Allocation:
Public IP addresses are allocated by organizations like the Internet Assigned Numbers
Authority (IANA) or Regional Internet Registries (RIRs).
4. Address Ranges:
Public IP addresses fall outside the private address ranges defined by RFC 1918.

Examples:

o 8.8.8.8 (Google DNS)


o 172.217.0.0/16 (Google)
5. Usage:
Used for websites, servers, and devices that require direct access from the internet.
6. Cost:
Public IP addresses are limited resources and often come at a cost when obtained from
Internet Service Providers (ISPs).

IPv4 Private Addresses

1. Definition:
Private IPv4 addresses are used for internal communication within private networks and
are not routable over the internet.
2. Accessibility:
Devices with private IP addresses can only communicate within the same local network
unless connected to the internet via Network Address Translation (NAT).

8
3. Allocation:
Private IP addresses do not require allocation from IANA or RIRs; they are freely used
within private networks.
4. Address Ranges:
Defined by RFC 1918:
o Class A: 10.0.0.0 - 10.255.255.255
o Class B: 172.16.0.0 - 172.31.255.255
o Class C: 192.168.0.0 - 192.168.255.255
5. Usage:
Commonly used in home, corporate, or organizational networks. For example:
o 192.168.1.1 (default gateway in most home routers)
6. Cost:
Free to use since they are not globally routable.

Classless Inter-Domain Routing (CIDR)

Definition

Classless Inter-Domain Routing (CIDR) is a method used to allocate IP addresses and route IP
packets more efficiently. It was introduced in 1993 as a replacement for the older classful
addressing system. CIDR helps conserve IP address space and simplifies routing by allowing
more flexible subnetting and aggregation.

9
Key Features of CIDR

1. Flexible Subnetting:
o CIDR allows networks to be divided into variable-sized subnets, making efficient
use of IP address space.
o For example, a network can have /16, /24, or /30 subnets instead of fixed
classful ranges.
2. Address Aggregation:
o CIDR enables multiple IP addresses or networks to be grouped into a single
routing entry, reducing the size of routing tables (a technique known as route
summarization or supernetting).
3. Notation:
o CIDR uses a slash (/) notation to denote the subnet mask.
o Example: 192.168.1.0/24 means the first 24 bits represent the network portion,
and the remaining 8 bits represent the host portion.

How CIDR Works

1. Subnet Mask Representation:


o A subnet mask specifies the number of bits used for the network part of an IP
address.
o Example:
 /24 means 255.255 .255 .0 (24 network bits).
 /16 means 255.255 .0 .0 (16 network bits).
2. Range of Addresses:
o CIDR helps define the range of addresses in a network.
o For example:
 192.168.1.0/24 includes addresses from 192.168.1.0 to
192.168.1.255.
3. Calculation of Hosts:
o The formula for calculating the number of usable hosts in a subnet is:
h
2 −2 ,, where hhh is the number of host bits.
o Example:
 /24 has 28−2=254 usable hosts.

Benefits of CIDR

1. Efficient Use of IP Space:


o Avoids wasting IP addresses by allocating only the required amount for a specific
network.
2. Simplified Routing:

10
Reduces the size of routing tables by aggregating multiple routes into a single
o
route.
3. Scalability:
o Supports networks of various sizes without being constrained by predefined class
boundaries (A, B, C).
4. Internet Backbone Optimization:
o CIDR reduces the number of entries in the global routing table, improving
internet backbone efficiency.

Examples of CIDR

1. Subnetting Example:
o Original network: 192.168.0.0/16 (65,536 addresses).
o Subdivided into:
 192.168.0.0/24 (256 addresses).
 192.168.1.0/24 (256 addresses), and so on.
2. Supernetting Example:
o Combine multiple networks:
 192.168.0.0/24 and 192.168.1.0/24 can be summarized as
192.168.0.0/23.

CIDR vs. Classful Addressing

Feature CIDR Classful Addressing


Fixed sizes (Class A,
Flexibility Flexible network size
B, C)
Smaller (supports
Routing Table Size Larger (more entries)
aggregation)
Efficient IP Usage Maximizes IP allocation Wastes IP addresses
Notation Slash / (e.g., /24) No slash notation

Practical Applications

1. Internet Service Providers (ISPs):


o Allocate IP blocks to customers in variable sizes (e.g., /29 for small networks).
2. Enterprise Networks:
o Divide a large corporate network into smaller subnets to improve management
and security.
3. Routing Optimization:
o Aggregate routes to reduce router processing overhead.7

11
12

You might also like