SlideShare a Scribd company logo
8. IP Address
What is an IP Address?
An IP (Internet Protocol) address is a unique identifier assigned to each device connected
to a network that uses the Internet Protocol for communication. This address helps to
identify both the host and the location of the host within the network, allowing data to be sent
and received accurately.
IP Address Structure
IP addresses are typically written in the format of four numbers separated by dots, known
as dotted decimal notation. For example: 1128.11.3.31. Each number in an IP address
represents 8 bits, so an IPv4 address (which is most commonly used) is a 32-bit address
divided into four octets.
IP Address Classes ( Classful Addressing)
IPv4 addresses are divided into five classes (A, B, C, D, and E), primarily based on the
network size they are suited for. Classes A, B, and C are commonly used for hosts, while
classes D and E are reserved for special purposes.
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 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.
​
Note:
●​ IP addresses are globally managed by Internet Assigned Numbers
Authority(IANA) and Regional Internet Registries(RIR).
●​ While finding the total number of host IP addresses, 2 IP addresses are not counted
and are therefore, decreased from the total count because the first IP address of any
network is the network number and whereas the last IP address is reserved for
broadcast IP.
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.
Supports: 16 million+ hosts per network
Example: Used by big organizations like Google, Microsoft
​
​
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.
Example: Used by universities and large companies
Supports: 65,000+ hosts per network
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
Example: Used for home networks and small businesses
IP addresses belonging to class C range from 192.0.0.0 – 223.255.255.255.
Supports: 254 hosts per network
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.
No Subnetting
●​ Example: Used in video streaming, IPTV, and online gaming
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.255. This class doesn’t have any
subnet mask. The higher-order bits of the first octet of class E are always set to 1111.
​
​
Range of Special IP Addresses
1.​ Link-Local Addresses: 169.254.0.0 – 169.254.255.255
○​ Assigned automatically when a device fails to obtain an IP from a DHCP
server.
○​ Used for local network communication (e.g., direct Ethernet connection).
2.​ Loopback Addresses: 127.0.0.0 – 127.255.255.255
○​ Used for internal testing within a device (self-communication).
○​ 127.0.0.1 is the most common loopback address.
3.​ Default Route (Unspecified Address): 0.0.0.0
○​ Represents "any network" or an unspecified address before assignment.
○​ Used in routing tables and DHCP configurations.
A subnet (subnetwork) is a logically divided portion of a larger network. Subnetting
helps improve network efficiency, security, and address allocation by breaking a large
network into smaller,
What is a Subnet Mask?
A subnet mask determines which part of an IP address is for the network and which
part is for hosts (devices).
It helps divide a large network into smaller subnets to improve efficiency and security.
Understanding Subnet Masks
An IPv4 address has 32 bits, divided into:
●​ Network portion (Identifies the network)
●​ Host portion (Identifies devices within the network)
A subnet mask is also 32 bits long and is used to separate these portions.
Rules for Network ID
The Network ID identifies a group of devices that share the same network. The rules for
assigning a Network ID are:
1.​ The Network ID cannot start with 127
○​ Reason:The 127.x.x.x range is reserved for loopback addresses, which are
used for internal testing on a device (e.g., 127.0.0.1).
2.​ All bits in the Network ID cannot be set to 1
○​ Reason: If all bits are 1 (255.255.255.255), it represents a broadcast
address, which is used to send data to all devices on the network.
3.​ All bits in the Network ID cannot be set to 0
○​ Reason: If all bits are 0 (0.0.0.0), it refers to the default route, which
means "any network" or "this network."
4.​ The Network ID must be the same for all hosts in a subnet
○​ Reason: Devices in the same network must have the same Network ID so
they can communicate directly without a router.
Rules for Host ID
The Host ID uniquely identifies a device within a network. The rules for assigning a Host ID
are:
1.​ The Host ID cannot be all 0s
○​ Reason: If all bits in the Host ID are 0 (192.168.1.0 in
255.255.255.0), it represents the network address, which identifies the
entire subnet.
2.​ The Host ID cannot be all 1s
○​ Reason: If all bits in the Host ID are 1 (192.168.1.255 in
255.255.255.0), it represents the broadcast address, which is used to
send data to all hosts in the network.
3.​ Each device must have a unique Host ID
○​ Reason: If two devices have the same Host ID, IP address conflicts will
occur, causing network communication issues.
Example: Class C Network (192.168.1.0/24)
●​ Network ID: 192.168.1.0
●​ Usable Host IDs: 192.168.1.1 to 192.168.1.254
●​ Broadcast Address: 192.168.1.255
127.x.x.x is reserved for loopback testing (not used for networking).
Class D is used for multicast transmissions (not assigned to devices).
Class E is reserved for research and experimental purposes.
1. Subnetting Overview
Subnetting divides a larger IP network into smaller, manageable segments (subnets).
This is useful for organizing network devices logically, improving security, and conserving IP
addresses.
Each subnet functions as an isolated network with its own range of IP addresses, and
this setup allows devices within a subnet to communicate directly while restricting external
access.
Why Subnetting?
●​ Efficient Use of IP Addresses: Subnetting helps to allocate the appropriate number
of IP addresses for each network segment, preventing waste.
●​ Improved Network Management: It allows administrators to organize devices
logically, such as by department or geographical location.
●​ Enhanced Security: Traffic within a subnet can be isolated from other subnets,
protecting internal communications.
●​ Reduced Broadcast Traffic: Smaller networks reduce the volume of broadcast
traffic, which can improve network performance.
2. Subnet Masks
A subnet mask is used to identify the network and host portions of an IP address. It
essentially "masks" the IP address to distinguish the parts used for network identification
from those used for hosts.
For example:
●​ Subnet Mask for Class A: 255.0.0.0
●​ Subnet Mask for Class B: 255.255.0.0
●​ Subnet Mask for Class C: 255.255.255.0
These default masks can be adjusted to create smaller subnets, allowing us to control the
number of subnets and the number of hosts per subnet.
3. CIDR Notation
3. CIDR Notation
CIDR simplifies subnetting by using a "prefix length" to define the network portion of an IP
address.
Examples:
●​ 192.168.1.0/24 → First 24 bits for the network, 254 usable hosts.
●​ 172.16.0.0/16 → First 16 bits for the network, more hosts available.
4. Subnetting Example
To divide 192.168.1.0/24 into four smaller subnets, we use a /26 mask
(255.255.255.192), creating subnets with 62 usable IPs each:
●​ 192.168.1.0/26 → 192.168.1.1 - 192.168.1.62
●​ 192.168.1.64/26 → 192.168.1.65 - 192.168.1.126
●​ 192.168.1.128/26 → 192.168.1.129 - 192.168.1.190
●​ 192.168.1.192/26 → 192.168.1.193 - 192.168.1.254
5. Key Points
●​ More network bits (/ higher) → Fewer hosts per subnet.
●​ Subnet formula:
○​ Subnets = 2^subnet_bits
○​ Hosts per subnet = 2^host_bits - 2
Using these formulas, you can create customized subnets based on the specific needs of your
network.

More Related Content

PPTX
lecture 33333222234555555555555555556.pptx
PPTX
lecture 6.pptx
PPTX
Ip address and subnet masking final
PPT
Ipv4 address
PDF
IP Address & Its Classes .pdf
PPTX
Week10 lec1
PPTX
chapter 4.pptx
DOCX
Subnet Design
lecture 33333222234555555555555555556.pptx
lecture 6.pptx
Ip address and subnet masking final
Ipv4 address
IP Address & Its Classes .pdf
Week10 lec1
chapter 4.pptx
Subnet Design

Similar to Basics of IP address ,IP-address classes, Subnet mask (20)

PDF
13788 3
PPTX
03 coms 525 tcpip - ip address
PPTX
IP_ADDRESSING_AND_SUBNETTING.pptx
PPTX
IP Addresses in subject computer networks
PPTX
computer network notes in network layer.
PPT
How IP address works
PPTX
UnderstandIPv4 Addressing and Subnetting
PPT
ip addressing & routing
PPTX
IPv4 Addressing Architecture
PPTX
1703_anusua_basuclassful addressing_IP_Addressing
PPTX
Understanding ip address
PPTX
ffuyu yguyguyg.pptx
PDF
IP & MAC Addressing
PPTX
Ch7 IP addressing.pptx
PPT
Addressing
PPT
TCP IP Addressing
PPT
Expl net fund_chapter_06_i_pv4_part_2
PPTX
IP ADDRESSING .pptx
PPTX
IP addressing and Subnetting PPT
PPT
Ip address and subnetting
13788 3
03 coms 525 tcpip - ip address
IP_ADDRESSING_AND_SUBNETTING.pptx
IP Addresses in subject computer networks
computer network notes in network layer.
How IP address works
UnderstandIPv4 Addressing and Subnetting
ip addressing & routing
IPv4 Addressing Architecture
1703_anusua_basuclassful addressing_IP_Addressing
Understanding ip address
ffuyu yguyguyg.pptx
IP & MAC Addressing
Ch7 IP addressing.pptx
Addressing
TCP IP Addressing
Expl net fund_chapter_06_i_pv4_part_2
IP ADDRESSING .pptx
IP addressing and Subnetting PPT
Ip address and subnetting
Ad

Recently uploaded (20)

PDF
Structs to JSON How Go Powers REST APIs.pdf
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
DOCX
573137875-Attendance-Management-System-original
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Welding lecture in detail for understanding
PPT
Mechanical Engineering MATERIALS Selection
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
Sustainable Sites - Green Building Construction
PPTX
additive manufacturing of ss316l using mig welding
PPTX
Geodesy 1.pptx...............................................
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Structs to JSON How Go Powers REST APIs.pdf
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
573137875-Attendance-Management-System-original
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Model Code of Practice - Construction Work - 21102022 .pdf
Internet of Things (IOT) - A guide to understanding
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Embodied AI: Ushering in the Next Era of Intelligent Systems
Strings in CPP - Strings in C++ are sequences of characters used to store and...
CYBER-CRIMES AND SECURITY A guide to understanding
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Welding lecture in detail for understanding
Mechanical Engineering MATERIALS Selection
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Sustainable Sites - Green Building Construction
additive manufacturing of ss316l using mig welding
Geodesy 1.pptx...............................................
Lecture Notes Electrical Wiring System Components
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Ad

Basics of IP address ,IP-address classes, Subnet mask

  • 1. 8. IP Address What is an IP Address? An IP (Internet Protocol) address is a unique identifier assigned to each device connected to a network that uses the Internet Protocol for communication. This address helps to identify both the host and the location of the host within the network, allowing data to be sent and received accurately. IP Address Structure IP addresses are typically written in the format of four numbers separated by dots, known as dotted decimal notation. For example: 1128.11.3.31. Each number in an IP address represents 8 bits, so an IPv4 address (which is most commonly used) is a 32-bit address divided into four octets. IP Address Classes ( Classful Addressing) IPv4 addresses are divided into five classes (A, B, C, D, and E), primarily based on the network size they are suited for. Classes A, B, and C are commonly used for hosts, while classes D and E are reserved for special purposes. 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 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.
  • 2. ​ Note: ●​ IP addresses are globally managed by Internet Assigned Numbers Authority(IANA) and Regional Internet Registries(RIR). ●​ While finding the total number of host IP addresses, 2 IP addresses are not counted and are therefore, decreased from the total count because the first IP address of any network is the network number and whereas the last IP address is reserved for broadcast IP. 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. Supports: 16 million+ hosts per network Example: Used by big organizations like Google, Microsoft
  • 3. ​ ​ 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. Example: Used by universities and large companies Supports: 65,000+ hosts per network
  • 4. 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 Example: Used for home networks and small businesses IP addresses belonging to class C range from 192.0.0.0 – 223.255.255.255. Supports: 254 hosts per network 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. No Subnetting
  • 5. ●​ Example: Used in video streaming, IPTV, and online gaming 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.255. This class doesn’t have any subnet mask. The higher-order bits of the first octet of class E are always set to 1111. ​ ​ Range of Special IP Addresses 1.​ Link-Local Addresses: 169.254.0.0 – 169.254.255.255 ○​ Assigned automatically when a device fails to obtain an IP from a DHCP server. ○​ Used for local network communication (e.g., direct Ethernet connection). 2.​ Loopback Addresses: 127.0.0.0 – 127.255.255.255 ○​ Used for internal testing within a device (self-communication). ○​ 127.0.0.1 is the most common loopback address. 3.​ Default Route (Unspecified Address): 0.0.0.0 ○​ Represents "any network" or an unspecified address before assignment. ○​ Used in routing tables and DHCP configurations.
  • 6. A subnet (subnetwork) is a logically divided portion of a larger network. Subnetting helps improve network efficiency, security, and address allocation by breaking a large network into smaller, What is a Subnet Mask? A subnet mask determines which part of an IP address is for the network and which part is for hosts (devices). It helps divide a large network into smaller subnets to improve efficiency and security. Understanding Subnet Masks An IPv4 address has 32 bits, divided into: ●​ Network portion (Identifies the network) ●​ Host portion (Identifies devices within the network) A subnet mask is also 32 bits long and is used to separate these portions.
  • 7. Rules for Network ID The Network ID identifies a group of devices that share the same network. The rules for assigning a Network ID are: 1.​ The Network ID cannot start with 127 ○​ Reason:The 127.x.x.x range is reserved for loopback addresses, which are used for internal testing on a device (e.g., 127.0.0.1). 2.​ All bits in the Network ID cannot be set to 1 ○​ Reason: If all bits are 1 (255.255.255.255), it represents a broadcast address, which is used to send data to all devices on the network. 3.​ All bits in the Network ID cannot be set to 0 ○​ Reason: If all bits are 0 (0.0.0.0), it refers to the default route, which means "any network" or "this network." 4.​ The Network ID must be the same for all hosts in a subnet ○​ Reason: Devices in the same network must have the same Network ID so they can communicate directly without a router.
  • 8. Rules for Host ID The Host ID uniquely identifies a device within a network. The rules for assigning a Host ID are: 1.​ The Host ID cannot be all 0s ○​ Reason: If all bits in the Host ID are 0 (192.168.1.0 in 255.255.255.0), it represents the network address, which identifies the entire subnet. 2.​ The Host ID cannot be all 1s ○​ Reason: If all bits in the Host ID are 1 (192.168.1.255 in 255.255.255.0), it represents the broadcast address, which is used to send data to all hosts in the network. 3.​ Each device must have a unique Host ID ○​ Reason: If two devices have the same Host ID, IP address conflicts will occur, causing network communication issues.
  • 9. Example: Class C Network (192.168.1.0/24) ●​ Network ID: 192.168.1.0 ●​ Usable Host IDs: 192.168.1.1 to 192.168.1.254 ●​ Broadcast Address: 192.168.1.255 127.x.x.x is reserved for loopback testing (not used for networking). Class D is used for multicast transmissions (not assigned to devices). Class E is reserved for research and experimental purposes.
  • 10. 1. Subnetting Overview Subnetting divides a larger IP network into smaller, manageable segments (subnets). This is useful for organizing network devices logically, improving security, and conserving IP addresses. Each subnet functions as an isolated network with its own range of IP addresses, and this setup allows devices within a subnet to communicate directly while restricting external access. Why Subnetting? ●​ Efficient Use of IP Addresses: Subnetting helps to allocate the appropriate number of IP addresses for each network segment, preventing waste. ●​ Improved Network Management: It allows administrators to organize devices logically, such as by department or geographical location. ●​ Enhanced Security: Traffic within a subnet can be isolated from other subnets, protecting internal communications. ●​ Reduced Broadcast Traffic: Smaller networks reduce the volume of broadcast traffic, which can improve network performance. 2. Subnet Masks A subnet mask is used to identify the network and host portions of an IP address. It essentially "masks" the IP address to distinguish the parts used for network identification from those used for hosts. For example: ●​ Subnet Mask for Class A: 255.0.0.0 ●​ Subnet Mask for Class B: 255.255.0.0 ●​ Subnet Mask for Class C: 255.255.255.0 These default masks can be adjusted to create smaller subnets, allowing us to control the number of subnets and the number of hosts per subnet.
  • 11. 3. CIDR Notation 3. CIDR Notation CIDR simplifies subnetting by using a "prefix length" to define the network portion of an IP address. Examples: ●​ 192.168.1.0/24 → First 24 bits for the network, 254 usable hosts. ●​ 172.16.0.0/16 → First 16 bits for the network, more hosts available. 4. Subnetting Example To divide 192.168.1.0/24 into four smaller subnets, we use a /26 mask (255.255.255.192), creating subnets with 62 usable IPs each: ●​ 192.168.1.0/26 → 192.168.1.1 - 192.168.1.62 ●​ 192.168.1.64/26 → 192.168.1.65 - 192.168.1.126 ●​ 192.168.1.128/26 → 192.168.1.129 - 192.168.1.190 ●​ 192.168.1.192/26 → 192.168.1.193 - 192.168.1.254 5. Key Points ●​ More network bits (/ higher) → Fewer hosts per subnet. ●​ Subnet formula: ○​ Subnets = 2^subnet_bits ○​ Hosts per subnet = 2^host_bits - 2 Using these formulas, you can create customized subnets based on the specific needs of your network.