Sub Netting
Sub Netting
Introduction
Subnetting is the process of dividing a large network into smaller, more manageable sub
networks, or subnets.
Purposes and benefits of subnetting
• Efficient IP Address utilization: Ensure that addresses are allocated according to need of
different segments.
• Enhanced network performance
• Scalability
• Improved security
• Simplified network management
• Better organization and structure
• Facilitation of routing
• Enhanced fault isolation
• IP Addressing fundamentals
IPv4 addressing defines how devices communicate over the internet and local
networks.
It contains of a 32-bit binary number, represented in decimal format of four octets
separated by periods.
Subnet mask is a 32-bit number that divides an IPv4 address into its network and host
portions
Key functions of subnet mask:
• Networking identification: specifies which bits of an IP address are used for network
portion.
• Routing : helps routers understand how to forward packets to correct destination, by
identifying network address.
Subnet mask representation
Subnet masks can be represented in several formats:
I. Dotted-Decimal Notation
Subnet mask is written as four octets (like IP address), separated by periods. For
example, 255.255.255.0, first three octets (255.255.255) represents Network
portion, and the last octet (0) represents the host portion.
II. Binary representation
Each octet is represented by 8 bits (1s and 0s). For example; the number
255.255.255.0 is 11111111.11111111.11111111.0000000 in binary. Here, 1s indicate
Network portion and 0s indicate the host portion.
III.CIDR Notation (Classless Inter-Domain Routing)
It uses slash(/) followed by the number of bits in the Network portion. E.g. CIDR
notation for 255.255.255.0:/24. This means the first 24 bits of the subnet mask are
set to 1, indicating network portion, while remaining bits are 0, host portion.
Examples of subnet mask
CLASS A:
• In Dotted-decimal: 255.0.0.0
• In Binary: 11111111.00000000.00000000.00000000
• In CIDR: /8
CLASS B:
• In Dotted-decimal:255.255.0.0
• In Binary:11111111.11111111.00000000.00000000.
• In CIDR:/16
CLASS C:
• In Dotted-decimal :255.255.255.0
• Binary: 11111111.11111111.11111111.00000000
• In CIDR:/24
CUSTOM SUBNET
•
Subnet calculations
Number of subnets =, where n is the number of bits borrowed from the host portion for
subnet.
• Number of hosts=h is the number of bits remaining for the hosts after subnetting.
Example: If you have a 124-subnet mask (which leaves 8 bits for hosts), calculation would
be :
Number of hosts=
Subnet calculations
Calculating subnet ID and Broadcast Address:
• Identify the IP address and Subnet mask. E.g. IP address:192.168.1.10 ,subnet
mask: 255.255.255.0 (/24)
• Convert to binary. IP address:11000000.10101000.00000001.00001010
Subnet mask becomes: 11111111.11111111.11111111.00000000
• Calculate subnet ID
IP Address subnet:11000000.10101000.00000001.00001010
Subnet mask :11111111.11111111.11111111.00000000
Subnet ID :11000000.10101000.00000001.00000000
-Convert back to decimal, subnet ID: 192.168.1.0
Calculating Broadcast Address
To find Broadcast Address, set all host bits. In this case, since subnet mask
is /24, last octet is host portion.
Subnet ID:11000000.10101000.00000001.00000000
Broadcast:11000000.10101000.00000001.11111111
Convert binary results back to decimal
Broadcast: 192.168.1.255
Examples
1.How many usable hosts are available in a subnet with a subnet mask of
255.255.255.240?
Answer:
Subnet mask:/28
The number of host bits is (32-28)=4
Usable hosts:
Examples
2.If you have the IP address 192.168.10.0/24, what is the range of usable IP addresses?
Answer:
Given, subnet mask: 255.255.255.0 (/24). New address is : 192.168.10.0
The Broadcast address is 192.168.10.255
Usable IP address ranges from 192.168.10.1 to 192.168.10.254
5.If the network address is 192.168.1.0/30, how many usable hosts are there?
Answer:
• Subnet mask is 255.255.255.252. (/30)
• The number of hosts bits is (32-30)=2
• Usable hosts=()=2
Subnetting techniques
Fixed length subnet masking (FLSM): each subnet is assigned an identical
subnet mask, which means that all subnets have the same number of IP
addresses available. It is characterized by uniform subnet size and simple to
manage.
In this addressing All devices within the network must use the same subnet
mask, which can lead to inefficient use of IP address space.
Classful and Classless Addressing
Classless addressing, often implemented through Classless Inter-Domain
Routing (CIDR), allows for more flexible allocation of IP addresses
• It uses variable length subnet masks(VLSM), enabling the creation of subnets
of different sizes