COMPUTER NETWORKING FOR CCNA SUBNETTING PART 5

 SUBNETTING

What is subnetting:-

  • Breaking the Network into small parts 
  •  & Stop wastage of hosts

Subnetting in Computer Networks

The topic of subnetting in computer networks will be covered in this tutorial. The most important idea we will learn about today is subnetting, which is the first thing we must understand while studying computer networks. Subnetting, the most crucial concept, will aid in reducing or spreading the pressure brought on by the networks' high load. Let's quickly go over the idea of subnetting now.

Let's now look at what Subnetting is. However, before we delve into the Subnetting notion, let's have a look at how Computer Networks use the term.

The network layer includes subnetting. It is the responsibility of the network layer to partition the received message into distinct parts and processes. The network layer is sometimes referred to as the brain of computer networks.

The basic idea of the Concept 

When the IP (Internet Protocol) system was first introduced, there were fewer people online, making it easier to find a network and send data to it. Due to the increase in internet users, sending a data packet to the desired machine in a network is becoming increasingly difficult. Once a network is big enough to serve an organization, network performance becomes a big problem.

An organization can use IP subnets (smaller broadcast domains, etc.) to conceptually or physically segment bigger networks (firewalls, etc.). In other words, routers use subnets as a basis for their routing decisions. In this post, we'll learn more about these concepts.

Introduction to Subnetting


A computer networking method known as subnetting is used to segment a large IP network into smaller subnetworks known as subnets. The main goals of this are to increase network management effectiveness and optimize address distribution.

Subnetting's main objective is to increase the utility of IP addresses. A network without subnetting would only be able to use one broadcast domain, which might not be feasible or effective, especially in big networks. Organizations can allocate IP addresses more effectively and efficiently by segmenting a network into subnets.


Purpose of Subnetting in Computer Networks

Subnetting serves several important purposes in computer networks, contributing to improved efficiency, scalability, security, and management. Here are the key purposes of subnetting:

1.) Efficient IP Address Utilization: Subnetting allows for the efficient utilization of IP addresses. By dividing a network into smaller subnets, organizations can allocate IP addresses more precisely based on their actual needs. This prevents wastage of IP address space, especially in larger networks, where assigning a single IP address to each device would be impractical.

2.) Enhanced Network Performance: Subnetting improves network performance by reducing broadcast traffic and containing network communications within specific subnets. Broadcast messages, such as ARP (Address Resolution Protocol) requests, are limited to the devices within the same subnet, preventing unnecessary network-wide broadcasts. This helps in minimizing network congestion and improving overall performance.

3.) Improved Network Security: Subnetting enhances network security by creating logical boundaries between different departments, divisions, or security zones. Each subnet can be treated as a separate broadcast domain, allowing for the implementation of more granular security policies. Access control and traffic filtering can be applied at the subnet level, reducing the potential impact of security breaches.

4.) Scalability and Flexibility: Subnetting provides scalability and flexibility in network design. As networks grow or change, subnetting allows for the addition of new subnets and devices without requiring a complete reconfiguration of the entire network. It facilitates easy expansion and adaptation to changing network requirements, supporting the growth of organizations and their evolving network needs.

5.) Simplified Network Management: Subnetting simplifies network management by logically grouping devices based on their location, function, or department. Network administrators can apply specific configurations, policies, and monitoring at the subnet level, making network management more efficient. Troubleshooting and administration tasks are simplified as administrators can focus on specific subnets rather than the entire network.

6.) Routing Efficiency: Subnetting enables efficient routing within a network. By dividing a large network into smaller subnets, routers can make more targeted routing decisions based on the destination subnet. This reduces the size of routing tables and improves the efficiency of routing protocols.

In summary, subnetting plays a vital role in computer networks by optimizing IP address utilization, enhancing network performance and security, facilitating scalability and flexibility, simplifying network management, and improving routing efficiency. It is an essential technique for designing and managing modern networks effectively.

The Subnetting Process :-

The process of subnetting involves dividing a network into smaller subnetworks or subnets. Subnetting allows for efficient use of IP address space, network segmentation, and improved network management. Here's a step-by-step guide to the subnetting process:

1. Determine the Required Number of Subnets: Start by identifying the number of subnets you need for your network. This decision is based on factors such as network size, organizational requirements, and future scalability. Consider how many separate segments you need to create within your network.

2. Determine the Required Number of Hosts per Subnet: Next, determine the number of hosts (devices or systems) you need in each subnet. This will help you determine the subnet size or the number of assignable IP addresses required in each subnet. Keep in mind that each subnet requires a network address and a broadcast address, leaving the remaining addresses for host assignment.

3. Choose a Subnet Mask: Select an appropriate subnet mask that allows for the required number of subnets and hosts per subnet. The subnet mask defines the network portion and the host portion of the IP address. It is represented as a series of binary bits or dotted decimal notation (e.g., 255.255.255.0 for a subnet with 24 bits). The subnet mask is usually represented alongside the IP address, such as 192.168.0.0/24.

4. Calculate the Subnet Bits: Determine the number of subnet bits required based on the number of subnets you determined in step 1. To calculate the subnet bits, count the number of subnet bits needed to represent the required number of subnets. The formula is 2^N, where N is the number of subnet bits. Find the smallest value of N that satisfies your requirements.

5. Calculate the Host Bits: Determine the number of host bits required based on the number of hosts per subnet you determined in step 2. To calculate the host bits, count the number of host bits needed to represent the required number of hosts. The formula is 2^N - 2, where N is the number of host bits. Subtract 2 because the network address and broadcast address are reserved and cannot be assigned to hosts.

6. Determine the Subnet IDs: Start subnetting by assigning subnet IDs. Begin with the default network address and increment by the subnet increment value, which is calculated by the subnet bits. Each subnet ID represents the starting address of a subnet.

7. Assign IP Addresses: Within each subnet, assign IP addresses to the hosts. Start with the first assignable address (after the network address) and increment by 1 for each subsequent host. The last address in each subnet is reserved for the broadcast address.

8. Verify and Test: After subnetting, verify the correctness of your subnet design and test network connectivity within and between subnets. Ensure that routing tables and network configurations are properly updated to accommodate the new subnet structure.

Remember that subnetting requires careful planning and consideration of network requirements. It's important to allocate sufficient IP address space and choose appropriate subnet masks to accommodate future growth and ensure efficient network operation.

The benefits of subnetting

The following is a list of the benefits of subnetting:

1. It gives one network security from another network. For instance, in an organization, another department cannot access the developer department's code.

2. It's possible that one subnet requires a greater network priority than another. A sales department might be required to host webcasts or video conferences, for instance.

3. Maintenance is simple for small networks.

Disadvantages of Subnetting

The disadvantages of Subnetting are mentioned below:
  • In the case of a single network, only three steps are required to reach a Process i.e. Source Host to Destination Network, Destination Network to Destination Host, and then Destination Host to Process.
  • In the case of a Single Network only two IP addresses are wasted to represent Network Id and Broadcast address but in the case of Subnetting two IP addresses are wasted for each Subnet.
  • The cost of the overall Network also increases. Subnetting requires internal routers, Switches, Hubs, Bridges, etc. which are very costly.

An IP address is split into its network address and host address via subnetting.

The split address may then be further divided into units using the subnet mask approach, and those units can be assigned to different network devices.


Here, X refers to the Host ID. This is the only thing that gets changed in the Internet Protocol Address

Now, we are going to learn how these subnets provide different addresses to different devices and also the process of subnetting in computer networks. So, by this example, we would easily understand the working of the Subnet.

We are going to learn how Subnets are formed for Internet Protocol version 4 (IPv4) Addressing.

The IPv4 Addressing has five different classes. They are:

  • Class A Network
  • Class B Network
  • Class C Network
  • Class D Network
  • Class E Network

The total number of Internet Protocol Addresses (IP Address) gives the total number of Subnets that can be formed by using a network.

  • Class A has 24 Host ID Bits
  • Class B has 16 Host ID Bits
  • Class C has 8 Host ID Bits

The number of usable IP Addresses that can be created is

  • The total number of IP Addresses creatable = 2 The total number of Host ID Bits - 2.
  • Class A Network can have 224 - 2
  • Class B Network can have 216 - 2
  • Class C Network can have 28 - 2
  • Class D and Class E do not contribute to IP Address creation.
  • Class D is used for multicasting purposes
  • Class E is used for Address Range Calculator
They are saved for future purposes.


There are Two types of subnetting  –

FLSM – Fixed length subnetting mask

VLSM – variable length subnetting mask ( for ip v6 )

 FLSM:-

Fixed Length Subnetting Mask (FLSM) refers to a subnetting technique in computer networking where all subnets within a network have the same subnet mask. In FLSM, the subnet mask remains constant throughout the network and is not varied for different subnets.

To understand FLSM, let's consider an example. Suppose we have the IP address 192.168.0.0/24, which represents a network with a subnet mask of 255.255.255.0. In this case, the /24 denotes that the first 24 bits of the 32-bit IP address are fixed, representing the network portion, while the remaining 8 bits are available for host addresses.

With FLSM, if we divide this network into smaller subnets, each subnet will have the same subnet mask of 255.255.255.0. For instance, if we divide the network into four equal subnets, each subnet will have the following network ranges:

1. Subnet 1: 192.168.0.0/24 (First subnet with the same network address and subnet mask)

   - Usable IP range: 192.168.0.1 to 192.168.0.254

   - Broadcast address: 192.168.0.255

2. Subnet 2: 192.168.1.0/24 (Second subnet with the same network address and subnet mask)

   - Usable IP range: 192.168.1.1 to 192.168.1.254

   - Broadcast address: 192.168.1.255

3. Subnet 3: 192.168.2.0/24 (Third subnet with the same network address and subnet mask)

   - Usable IP range: 192.168.2.1 to 192.168.2.254

   - Broadcast address: 192.168.2.255

4. Subnet 4: 192.168.3.0/24 (Fourth subnet with the same network address and subnet mask)

   - Usable IP range: 192.168.3.1 to 192.168.3.254

   - Broadcast address: 192.168.3.255

As you can see, in FLSM, the subnet mask remains consistent across all subnets, making it easy to manage and configure routing tables. However, it may result in inefficient utilization of IP addresses when subnets have significantly different numbers of hosts.

It's worth noting that Fixed Length Subnetting Mask is different from Variable Length Subnetting Mask (VLSM), where subnets can have different subnet masks to accommodate varying numbers of hosts per subnet. VLSM allows for more efficient allocation of IP addresses but can be more complex to configure and manage.

VLSM:-

Subnets inside a network can have multiple subnet masks thanks to the computer networking subnetting technology known as Variable Length Subnet Mask (VLSM).Unlike Fixed Length Subnet Mask (FLSM), VLSM allows for more efficient utilization of IP addresses by allocating subnet masks according to the specific requirements of each subnet.

To understand VLSM, let's consider an example. Suppose we have the IP address 192.168.0.0/24, representing a network with a subnet mask of 255.255.255.0. With VLSM, we can divide this network into subnets of different sizes, each with its own subnet mask.

For instance, let's say we need four subnets with varying numbers of hosts:

1. Subnet 1: Requires 30 hosts

   - Subnet mask: /27 (255.255.255.224)

   - Usable IP range: 192.168.0.1 to 192.168.0.30

   - Broadcast address: 192.168.0.31

2. Subnet 2: Requires 12 hosts

   - Subnet mask: /28 (255.255.255.240)

   - Usable IP range: 192.168.0.33 to 192.168.0.46

   - Broadcast address: 192.168.0.47

3. Subnet 3: Requires 6 hosts

   - Subnet mask: /29 (255.255.255.248)

   - Usable IP range: 192.168.0.49 to 192.168.0.54

   - Broadcast address: 192.168.0.55

4. Subnet 4: Requires 50 hosts

   - Subnet mask: /26 (255.255.255.192)

   - Usable IP range: 192.168.0.65 to 192.168.0.126

   - Broadcast address: 192.168.0.127

In VLSM, we allocate subnet masks according to the number of hosts required in each subnet. This allows for efficient utilization of IP addresses by allocating smaller subnets for smaller requirements and larger subnets for larger requirements.

VLSM provides more flexibility and optimal use of IP addresses compared to FLSM. However, it can introduce complexity in managing and configuring routing tables, as each subnet may have a different subnet mask. Therefore, proper planning and documentation are crucial when implementing VLSM.

IPv4 - Subnetting

Each IP class has a unique default subnet mask that restricts that IP class to having a defined number of networks and fixed numbers of hosts per network. Being able to have fewer hosts per network or more networks per IP class is not possible with classful IP addressing.

The flexibility of employing bits from the IP address's host portion as a network within a network, or subnet, is made possible by CIDR, or classless inter-domain routing. It is possible to create smaller sub-networks via subnetting utilizing a single Class A IP address, which improves network administration capabilities.

Class A Subnets

Only the first octet of the Class A network identifier (i.e., 16777214 hosts per network) is used as the network identifier. Bits from the host component are taken and used to create additional subnets in Class A, and the subnet mask is adjusted as necessary.

For instance, if one MSB (Most Significant Bit) is added to the network address and one MSB is taken from the host bits of the second octet, two subnets (21=2) with a total of (223-2) 8388606 hosts are created.

In accordance with subnetting, the Subnet mask is modified. Here is a list of all potential Class A subnet combinations.


In the case of subnetting too, the very first and last IP address of every subnet is used for Subnet Number and Subnet Broadcast IP address respectively. Because these two IP addresses cannot be assigned to hosts, sub-netting cannot be implemented by using more than 30 bits as Network Bits, which provides less than two hosts per subnet.

Class B Subnets

With Classful Networking, the default configuration uses 14 bits for the network, resulting in (214) 16384 networks and (216-2) 65534 hosts. The same method used to subnet Class A addresses—borrowing bits from the host bits—can also be used to subnet Class B IP addresses. All potential combinations of Class B subnetting are shown here.

Class C Subnets

Due to the restriction on the number of hosts it can contain, Class C IP addresses are often only given to very tiny networks. The full range of subnetted Class B IP address combinations are listed below.

FLSM SUBNETTING  ( IP V4 ) :-

The formula of subnetting  :-

No of network = 2m

No of host = 2n

M = current subnet length – default subnet length

N = 32 – current subnet length

EX - 192.168.10.0 / 24 

In this ip 24 is  Subnet length/default subnet length   


We are utilizing generate the Broadcast Address and Usable Range of the New Subnets, one of many formulae and guidelines used to generate subnets.

The broadcast address and the usable range for the new subnets can be rapidly determined if the network address of the potential new subnets is established.

CLASS C SUBNETTING  :-

192.168.10.0/26

No of network = 2m

m = current subnet length  - default

m = 26-24 =  2

No of host = 2n

N =  32 – current subnet length = 32-26 =6

2n = 26 = 64

In 192.168.10.0 we have 2 networks and 64 host

SUBNETTING OF 4TH OCTATE  in class C :-

-         Network ID + no of host

-         First IP + 1

-         In BIP – 1 from NID next block size

-         Last IP -1 from BIP


EX - 200.200.200.0 / 28

n/w = 2m                                             host  = 2n

m = 28 – 24                                         n = 32-28

2m = 24                                                   =4

2m = 16                                                   2n = 2= 16



-         255 in the last octate – broadcast address

-         0 in last octate – network 

CLASS B SUBNETTING  :-

3rd-octave subnetting
  • IN CLASS B AND A WE HAVE A BIG NUMBER OF HOSTS SO WE HAVE TO USE BLOCK SIZE VALUE AS A HOST

BLOCK SIZE FORMULA:-

1 – ON BITS

0 – OFF BITS

BLOCK SIZE = 2 OFF BITS


  • 178.150.0.0/19
Number of network 2m = 23 = 8

19 – 16

3

Host = 2n = 213 = 8192

32 -19 = 13

  • Now u can see we have 8192 hosts now we have to use block size as host number
  • We have 0 in 3rd octate and subnet mask of this octate is 224 and binary of 224 is 11100000
  • If u dont know how to convert decimal to binary you can check

Part 4

  •  We need only off bits and we have 5 off bits 25 is 32.

Subnet mask- 255.255.254.0

Another example :-

178.150.0.0/22

N / W = 2M

M = 22-16

M = 6

2m = 64

 

N/H = 24

N = 32-22

N = 10

1024

Block size = 2 off bits 

= 22

= 4


255.255. 11111100. 00000000

255.255.252.0  - subnet mask 


4TH OCTAVE SUBNETTING :-

170.180.0.0/28

2m  = 28 -16 = 12 = 212 = 4096

2n = 32-28 = 4 = 16


A subnet mask of 170.180.0.0 is 255.255.255.240

And block size is 24

CLASS A SUBNETTING :-

10.0.0.0/14

2m  = 14 – 8 = 26 = 64

2n = 32- 14 = 2 16 = 65,536

Block size 22 = 4

subnet mask 255.255.0.0

EX . 10.0.0.0/20

2m = 20 -8 = 212 = 4096

2n = 32-20 = 212 = 4096

Block size = 24 = 16


No comments:

Post a Comment