Computer Network Tutorial

Introduction of Computer Network Types of Computer Network Network Topology Computer Networking Architecture Transmission Modes (Data Flow) Basic Networking Devices Integrate Services Digital Network (ISDN)


OSI Model TCP/IP Model

Physical Layer

Digital Transmission Analog Transmission Transmission Media Switching

Data Link Layer

Error detection and Error correction Data Link Control Multiple Access Aloha

Network Layer

Network Layer - Logical Address Address Mapping Unicast Routing Protocol

Transport Layer

Process to Process Delivery User Datagram Protocol Transmission Control Protocol Stream Control Transmission Protocol Session Layer and Presentation Layer

Application Layer

Domain Name System Application Protocol E-mail Cryptography


Classes of Routing Protocols Classification of Routing Algorithms Controlled Access Protocols in Computer Networks Differences between IPv4 and IPv6 Fixed and Flooding Routing Algorithms Advantages and Disadvantages of Fibre Optics Cable APIPA Difference between Active and Passive FTP Fiber Optics and its Types Method of Joining and Fusion of Fiber Optic Cable Define Framing in Computer Network Disadvantages of Computer Network Mesh Topology Diagram in Computer Network Ring Topology in Computer Network Star Topology in Computer Networks 4G Mobile Communication Technology Advantages and Disadvantages of LAN Advantages and Disadvantages of MAN Advantages and Disadvantages of WAN Application Layer in OSI Model Cyclic Redundancy Check Example Data link layer in OSI model Difference between Transport and Network Layer Hamming Code Example Network Layer in OSI Model Session Layer in OSI Model Transport Layer in OSI Model Two Port Network in Computer Networks Uses of Computer Networks What is Computer Network What is Framing in a Computer Network Advantages and Disadvantages of Bus Topology Difference between Star Topology and Bus Topology Subnetting in Computer Network Subnetting Questions and Answers What is Bus Topology What is Network Topology and Types in Computer Networks Access Control in Networking Basic Characteristics of Computer Network Benefits of SOCKS5 Proxy in Computer Networks Computer Network viva Questions Difference between BOOTP and RARP Difference Between Network Topologies and Network Protocols Difference between NFC and RFID Difference Between Point-to-Point Link and star Topology Network Differences Between MSS and MTU Differences Between Trunk Port and Access Port Different Modes of Communication in Computer Networks MIME Protocol in Computer Networks Modes of Communication in Computer Networks Network Attack in Computer Network Port Address in Networking Simplest Protocol in Computer Network Sliding Window Protocol in Computer Network Stop And Wait Protocol in Computer Networks TCP 3-Way Handshake Process in Computer Networks What is a Proxy Server What is APPN What is ICMP Protocol What is Point-to-Point Protocol What is Port Address in Networking What is the HDLC Protocol What is VRRP Protocol Difference Between Analog and Digital Signals Difference Between Hub and Repeater Difference between Repeater and Switch Difference Between Transparent Bridge and Source Routing Bridge Source Routing Bridge in Computer Networks Transparent Bridge in Computer Networks Transport Protocol in Computer Networks Types of CSMA in Computer Networks What is Wired and Wireless Networking Network Security in Computer Network Disadvantages of Extranet Difference Between TELNET and FTP Define Protocol in Computer Networks Guided Transmission Media in Computer Network What is a Gateway in a Computer Network IGMP in Computer Networks LAN Protocols in Computer Networks MAN Meaning in Computer Modulation Techniques in Computer Networks Switching in DCN TCP/IP Applications What is IGMP? What is Modem in Networking What is Non-Persistent CSMA Difference between Cell Splitting and Cell Sectoring Forouzen Computer Network

Subnetting in Computer Network

In computer networking, subnetting divides a network into two or smaller networks, called subnets. This is done for various reasons, such as to improve network security, reduce network congestion, or organize a large network into smaller, more manageable parts.

When a network is subnetted, the IP address space is divided into a series of subnets, each with its unique network address and subnet mask. The subnet mask is a 32-bit binary value that is used to divide the IP address into two parts: the network address and the host address.

Why is Subnetting necessary?

Subnetting is necessary in computer networks for several reasons:

  1. Network organization: Subnetting allows for the logical grouping of devices within a network, making it easier to manage and troubleshoot issues.
  2. Security: Subnetting can be used to segment a network, creating separate subnets for different security zones. This can help to limit the spread of malware or other security threats.
  3. Performance: Subnetting can help to reduce congestion on a network by allowing for the creation of smaller subnets with fewer devices. This can improve the overall performance of the network.
  4. IP address conservation: subnetting allows for the efficient use of IP addresses by dividing a large network into smaller subnets, each with its own range of addresses. This can help to conserve IP addresses and prevent IP address depletion.
  5. Remote access: Sub netting enables the creation of remote access subnets that allow remote users to access the internal resources of the network securely.

How does Subnetting Work?

Subnetting works by dividing the host portion of an IP address into a subnet mask. The subnet mask is used to determine the range of addresses in a subnet, and is typically represented in dotted decimal notation, such as

When subnetting a network, the IP address is divided into two parts: the network address and the host address. The network address identifies the network that a device is on, and the host address identifies a specific device on that network.

The subnet mask is used to determine the number of bits that are used for the network address and the number of bits that are used for the host address. For example, a subnet mask of would use 24 bits for the network address and 8 bits for the host address, allowing for a maximum of 256 possible devices on that subnet.

To determine the range of addresses in a subnet, the network address is combined with the subnet mask. For example, if the network address is and the subnet mask is, the range of addresses in that subnet would be from to

Once a subnet is created, it can be further divided into smaller subnets, known as sub-subnets or child subnets. This process can be repeated as many times as needed to create a hierarchical network structure, with each subnet representing a different level of the hierarchy.

Moreover, subnetting also allows for the creation of VLANs (Virtual LANs) which enable a switch to segment a LAN into smaller broadcast domains. This allows for the creation of multiple logical networks on a single physical network, which can be useful for isolating different types of traffic or for creating separate networks for different groups of users.

Example of Subnetting

An example of sub netting would be a company that has been assigned the IP address range of by their ISP. This range includes all IP addresses from to The company has a total of 250 employees and wants to create separate subnets for different departments such as Sales, Marketing and IT.

The network administrator decides to use a subnet mask of, which allows for the creation of two subnets, each with a range of 128 IP addresses.

  • The first subnet, Sales department, is assigned the network address of, which includes all IP addresses from to
  • The second subnet, Marketing department, is assigned the network address of, which includes all IP addresses from to

The IT department can use the remaining IP addresses from the original IP range (

By subnetting the network in this way, the company can improve network organization, security, and performance by isolating different groups of devices and controlling their access to network resources. This makes it easier for the administrator to manage and troubleshoot the network and also allows for better usage of IP addresses.


There are several advantages of subnetting in a computer network, including:

  1. Security: Subnetting allows for better security by dividing a network into smaller subnets, making it more difficult for unauthorized users to access sensitive information.
  2. Network Management: Subnetting allows for more efficient use of IP addresses and makes it easier to manage and troubleshoot network issues.
  3. Performance: Subnetting can improve network performance by reducing network congestion and broadcast traffic.
  4. Scalability: Subnetting allows for the easy expansion of a network as the organization grows.
  5. Network Segmentation: Subnetting allows for the segmentation of a network into different logical or physical segments, each with its own security and performance requirements.
  6. IP Address Conservation: Subnetting allows for the more efficient use of IP addresses, as it makes it possible to create multiple subnets from a single IP address range.


While subnetting does have many advantages, there are also some potential disadvantages to consider, such as:

  1. Complexity: Subnetting can be complex and difficult to set up and manage, especially for large and dynamic networks.
  2. Extra cost: Subnetting may require additional hardware and software, which can add to the overall cost of the network.
  3. Maintenance: It requires regular maintenance and monitoring to ensure that it is functioning properly and that the subnets are configured correctly.
  4. Limited IP address space: Subnetting can make it more difficult to obtain new IP addresses, as they are divided into smaller subnets.
  5. Limited scalability: Subnetting can become less effective as the network grows and expands, as it can create limitations in terms of the number of subnets and the number of hosts per subnet.
  6. Inefficiency: Subnetting can lead to an inefficient use of IP addresses, if it is not done properly.