Ip Address Concepts
Ip Address Concepts
AND
NETWORKING
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:
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.
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
Class B
Class C
2
Class D (Multicast Addressing)
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:
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.
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
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:
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
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.
11111111.11111111.11111111.11100000
- 255 = 11111111
- 224 = 11100000
- The number of available IP addresses in each subnet is 2^5 = 32 (since there are 5 host bits
remaining).
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
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.
4. Broadcast Address: - The broadcast address is the last address in the subnet, where all the
host bits are set to 1.
- Since the network address and the broadcast address are reserved, the number of usable hosts
is 32 - 2 = 30.
6. Decimal Subnet Mask: - The decimal subnet mask for /27 is 255.255.255.224.
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
6
Key Concepts in Subnetting
Subnetting Calculation
To subnet a network:
Allows using different subnet masks within the same network, optimizing IP address allocation.
Uses the same subnet mask for all subnets, simpler but less efficient.
Subnetting Formula
Identifying The Difference Between Ipv4 Public Address And Private Nerworks
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:
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.
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.
Benefits of CIDR
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.
Practical Applications
11
12