IP Addressing and Subnetting
IP Addressing and Subnetting
IP Addressing
An IP address (Internet Protocol address) is a unique identifier for devices on a network. IP addresses are
used to route data between devices across networks, including the internet.
1. IPv4:
o A 32-bit address divided into four octets, represented in decimal form (e.g.,
192.168.1.1).
o Divided into classes (A, B, C, D, and E) based on the number of networks and hosts it can
accommodate.
2. IPv6:
Subnetting
Subnetting divides a larger network into smaller, more manageable sub-networks (subnets). This helps
improve performance, security, and IP address allocation.
Each subnet has its own subnet mask, which helps determine which portion of the IP address identifies
the network and which part identifies the host within the network.
Subnet Mask
• Subnet masks are often written in decimal (e.g., 255.255.255.0) and help divide the IP address
into the network portion and the host portion.
• CIDR Notation: Classless Inter-Domain Routing (CIDR) notation (e.g., /24) is commonly used to
specify the number of bits used for the network. /24 means the first 24 bits of the address are
reserved for the network.
• Subnet mask is 255.255.255.0 (or /24), which means 24 bits are for the network, and the
remaining 8 bits are for host addresses.
• Total hosts per subnet = 2^8 - 2 = 254 (subtracting 2 for network and broadcast addresses).
You can further subnet this into smaller subnets (e.g., /26, /27), each providing a smaller number of
hosts per network.
Subnetting Steps:
1. Determine the subnet mask based on how many subnets or hosts you need.
o Formula: 2^N, where N is the number of bits you borrow from the host portion for
subnetting.
• Example: Instead of being restricted to Class A, B, or C networks, you can use 192.168.1.0/22 to
create a custom subnet mask, allowing for more specific network and host configurations.
Certain IP address ranges are reserved for private networks, commonly used in home and enterprise
networks:
These addresses are not routable on the internet and require Network Address Translation (NAT) for
accessing external networks.