Ip Addressing and Subneting
Ip Addressing and Subneting
GROUP MEMBERS:
I) TANZILA YASEEN GHANCHI (CSC-21F-125)
II) ANUSHA HUSSAIN (CSC-21F-021)
III) HARIS KHALID (CSC-21F-038)
IV) HUNZILA BIN NASEEM (CSC-21F-042)
SEMESTER:
6th –”A”
COURSE:
COMPUTER NETWORKS
COURSE INSTRUCTOR:
DR.MALOOK RIND
OBJECTIVES
IP Addressing
(I) Introduction.
(II) Types of IP Addressing.
Classes of IP Addressing.
Network Addressing.
Broadcast Types.
Subnetings.
Subneting IP Classes.
Subnet Masking.
Subneting Formula.
IPV4 VS IPV6.
IP ADDRESSING
INTRODUCTION:
“An Internet Protocol (IP) address is the unique identifying number assigned to every device
connected to the internet.”
Types of ip addressing:
There are 2 types of IP addressing:
1- Hardware Addressing.
2- Local Addressing.
1- Hardware addressing:
Hardware addressing refers to the unique identifier assigned to a device or network interface controller
(NIC) at the hardware level, used to identify and address devices at the data link layer (Layer 2) of the
OSI model.
EXAMPLES:
include:-
MAC (Media Access Control) addresses-
Ethernet addresses-
IP ADDRESSING
1- local addressing:
Local addressing, on the other hand, refers to the addressing scheme used within a local area
network (LAN) or a specific network segment.
EXAMPLES:
This can include:-
IP addresses (IPv4 or IPv6) assigned to devices within a LAN.
Network host names or device names.
Local subnet addresses
SUMMARY:
In summary, hardware addressing is used to identify devices at the hardware level, while local
addressing is used to identify and address devices within a specific network or LAN.
ADDRESSING
CLASSFUL addressing;
The 32-bit IP address is divided into five sub-classes. These are given below:
Class A
Class B
Class C
Class D
Class E
Each of these classes has a valid range of IP addresses. Classes D and E are reserved for multicast and
experimental purposes respectively. The order of bits in the first octet determines the classes of the IP
address. The IPv4 address is divided into two parts:
Network ID
Host ID
The class of IP address is used to determine the bits used for network ID and host ID and the number of total
networks and hosts possible in that particular class. Each ISP or network administrator assigns an IP address to
each device that is connected to its network.
CLASSES OF IP ADDRESSING CONT…
CLASS “a”;
• IP addresses belonging to class A are assigned to the networks that contain a large number of hosts.
• The network ID is 8 bits long.
• The host ID is 24 bits long.
• The higher-order bit of the first octet in class A is always set to 0. The remaining 7 bits in the first octet are
used to determine network ID. The 24 bits of host ID are used to determine the host in any network. The
default subnet mask for Class A is 255.x.x.x. Therefore, class A has a total of:
• 2^24 – 2 = 16,777,214 host ID
• IP addresses belonging to class A ranges from 0.0.0.0 – 127.255.255.255.
CLASSES OF IP ADDRESSING CONT…
CLASS “b”;
• IP address belonging to class B is assigned to networks that range from medium-sized to large-sized networks.
• The network ID is 16 bits long.
• The host ID is 16 bits long.
• The higher-order bits of the first octet of IP addresses of class B are always set to 10. The remaining 14 bits are
used to determine the network ID. The 16 bits of host ID are used to determine the host in any network. The
default subnet mask for class B is 255.255.x.x. Class B has a total of:
• 2^14 = 16384 network address
• 2^16 – 2 = 65534 host address
• IP addresses belonging to class B ranges from 128.0.0.0 – 191.255.255.255.
CLASSES OF IP ADDRESSING CONT…
CLASS “c”;
• IP addresses belonging to class C are assigned to small-sized networks.
• The network ID is 24 bits long.
• The host ID is 8 bits long.
• The higher-order bits of the first octet of IP addresses of class C is always set to 110. The remaining 21 bits are
used to determine the network ID. The 8 bits of host ID are used to determine the host in any network. The
default subnet mask for class C is 255.255.255.x. Class C has a total of:
• 2^21 = 2097152 network address
• 2^8 – 2 = 254 host address
• IP addresses belonging to class C range from 192.0.0.0 – 223.255.255.255.
CLASSES OF IP ADDRESSING CONT…
CLASS “d”;
• IP address belonging to class D is reserved for multi-casting. The higher-order bits of the first octet of IP
addresses belonging to class D is always set to 1110. The remaining bits are for the address that interested
hosts recognize.
• Class D does not possess any subnet mask. IP addresses belonging to class D range from 224.0.0.0 –
239.255.255.255.
CLASSES OF IP ADDRESSING CONT…
CLASS “e”;
• IP addresses belonging to class E are reserved for experimental and research purposes. IP addresses of class
E range from 240.0.0.0 – 255.255.255.254. This class doesn’t have any subnet mask. The higher-order bits of
the first octet of class E are always set to 1111.
NETWORK ADDRESSING
DEFINTION:
a networking address is a unique identifier assigned to a device on a network, allowing it to communicate and
exchange data with other devices. Think of it like a mailing address for your device!
Types of network addressing:
There are two main types:
1. IP Address (Logical):
e.g., 192.168.1.1
2. MAC Address (Physical):
e.g., 00:11:22:33:44:55 These addresses help devices find and talk to each other on a network!
BROADCAST
DEFINTION:
A broadcast is a network transmission sent to all devices on a specific network or address range,
simultaneously.
Think of it like a radio broadcast, where a single signal is sent out to many receivers at once!
In networking, this means a single packet of data is sent to multiple devices, without specifying
individual addresses.
Types of broadcast:
1. Flooded Broadcast.
2. Directed Broadcast.
BROADCAST TYPES
1- flooded broadcast:
Flooded Broadcast is a technique used to send data to all devices on a network, regardless of
whether they need it or not. It involves broadcasting data to every possible destination, often used in
routing protocols to update network information.
This can occur when:
1. A device sends a broadcast packet without specifying a specific subnet or destination.
2. A network device or router forwards a broadcast packet to every connected device, regardless of whether they are
part of the intended audience.
Flooded broadcasts can lead to:
- Network congestion
- Increased latency
- Reduced network performance
- Security risks (e.g., broadcasting sensitive data)
BROADCAST TYPES
2- directed broadcast:
Directed Broadcast is a technique used to send data to a specific group of devices on a network,
identified by a specific IP address or range of IP addresses.
Directed broadcast is commonly used in various applications such as:
- Video streaming
- Online gaming
- Content delivery networks (CDNs)
- IP telephony
SUBNETTING
Explanation:
"Dividing a larger network (IP address range) into smaller sub-networks (subnets) to improve organization,
security, and network performance.“
It involves dividing an IP address into two parts:
1. Network ID (identify the subnet)
2. Host ID (identify devices within the subnet)
Subnetting helps:
- Reduce network congestion.
- Improve network management.
- Enhance security.
- Increase the number of available IP addresses.
SUBDIVIDING IP CLASSES
Explanation:
Subdividing IP classes refers to the process of breaking down the traditional IP address classes (A, B, C, D, E)
into smaller subnets. This is done by borrowing bits from the host part of the IP address to create additional
network IDs.
Here's a brief overview of the traditional IP address classes:
- Class A: 0.0.0.0 - 127.255.255.255 (16,777,216 addresses)
- Class B: 128.0.0.0 - 191.255.255.255 (1,048,576 addresses)
- Class C: 192.0.0.0 - 223.255.255.255 (65,536 addresses)
- Class D: 224.0.0.0 - 239.255.255.255 (multicast addresses)
- Class E: 240.0.0.0 - 254.255.255.255 (reserved addresses)
SUBNET MASKING
Explanation:
Subnet masking is a technique used to divide an IP address into two parts:
1. Network ID (identify the subnet)
2. Host ID (identify devices within the subnet)
A subnet mask is a 32-bit number that is used to:
- Determine the number of bits borrowed from the host part to create additional network IDs
- Identify the subnet and host parts of an IP address
The subnet mask is typically represented in dotted decimal notation (e.g., 255.255.255.0) and is applied to the IP
address using a bitwise AND operation.
FOR EXAMPLE,
if the IP address is 192.168.1.100 and the subnet mask is 255.255.255.0, the subnet ID would be 192.168.1.0 and
the host ID would be 100.
SUBNET MASKING CONT..
Subnet masks are used to:
- Create subnets and improve network organization
- Reduce network congestion and improve performance
- Enhance security by limiting access to specific subnets
- Increase the number of available IP addresses
Common subnet masks include:
- 255.0.0.0 (Class A)
- 255.255
SUBNET FORMULA
Explanation:
The subnetting formula is used to calculate the number of subnets and hosts per subnet.
Here are the formulas:
1. Number of subnets:
2^n = Number of subnets
where n is the number of bits borrowed from the host part to create additional network IDs.
2. Number of hosts per subnet:
2^h - 2 = Number of hosts per subnet.
where h is the number of bits left in the host part after borrowing bits for subnetting.
SUBNET FORMULA CONT…
FOR EXAMPLE:
if you have a Class C IP address (255.255.255.0) and you want to subnet it using 3 bits (2^3 = 8
subnets), the calculation would be:
1. Number of subnets: 2^3 = 8 subnets
2. Number of hosts per subnet: 2^5 - 2 = 32 - 2 = 30 hosts per subnet
Note: The "-2" in the host calculation is to account for the subnet address and the broadcast
address, which are not usable as host addresses.
These formulas are essential for network administrators to design and implement efficient
subnetting schemes.
IPV4 VS IPV6
IPv4 (Internet Protocol Version 4) and IPv6 (Internet Protocol Version 6) are two different versions of the Internet Protocol,
which is the fundamental communication protocol used to connect devices on the internet
ipv4:
- Released in 1981
- Uses 32-bit addresses (e.g., 192.168.1.1)
- Address space: 4.3 billion unique addresses
- Uses subnet masks to divide networks
- Supports broadcast and multicast addressing
- Still widely used today, but facing address exhaustion
ipv6:
- Released in 1998
- Uses 128-bit addresses (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334)
- Address space: virtually unlimited (3.4 x 10^38 unique addresses)
- Uses prefix lengths to divide networks
- Supports improved security and mobility features
- Gradually being adopted as the new standard
IPV4 VS IPV6 CONT….
KEY DIFFERENCES:
- Address length and format
- Address space and scalability
- Network division and routing
- Security and mobility featuresIPv6 is designed to provide a more sustainable and future
- proof internet infrastructure, but the transition from
IPv4 is ongoing and gradual. Many networks and devices still use IPv4, while others have
adopted IPv6 or use both versions in parallel.