Table of Contents

Networking Basics | What is a Subnet, How to Subnet, and What is a VLAN

Introduction

In today’s interconnected world, computer networks play a crucial role in facilitating communication and data transfer. Understanding networking basics is essential for both IT professionals and everyday users. In this article, we will explore the concepts of subnets, subnetting, and VLANs, providing a comprehensive overview of their purpose and functionality.

Subnets: A Deeper Understanding

What is a Subnet?

A subnet is a logical subdivision of an IP network. It allows the network administrator to divide a large network into smaller, more manageable segments. Each subnet has its own unique IP address range, which helps in efficient utilization of available IP addresses.

Why Use Subnets?

There are several reasons why subnets are used in computer networks:

  1. Network Segmentation: Subnets enable the division of a large network into smaller subnetworks, improving network performance and reducing congestion.

  2. Improved Security: By separating devices into different subnets, network administrators can implement security measures, such as firewalls and access control lists, to control traffic flow and enhance network security.

  3. Efficient Resource Utilization: Subnetting allows for better allocation and utilization of IP addresses, which are a limited resource in the IPv4 addressing scheme.

How to Subnet?

Subnetting involves dividing a network into smaller subnets. To perform subnetting, the following steps can be followed:

  1. Determine the Network Requirements: Understand the number of required subnets and the number of hosts per subnet.

  2. Choose an IP Addressing Scheme: Decide on an appropriate IP addressing scheme, considering factors like the number of subnets and hosts required.

  3. Calculate Subnet Masks: Determine the subnet masks based on the number of required subnets and hosts per subnet.

  4. Assign IP Addresses: Allocate IP addresses to each subnet, ensuring they fall within the appropriate subnet range.

  5. Test and Verify: Validate the subnet configuration by testing network connectivity and verifying IP address assignments.

Subnetting Examples

Let’s consider a simple example to illustrate subnetting:

Suppose we have the IP address range 192.168.0.0/24, and we want to create four subnets with equal numbers of hosts. Here’s how we can subnet this network:

  1. Step 1: Determine Network Requirements: We need four subnets with equal numbers of hosts.

  2. Step 2: Choose an IP Addressing Scheme: We decide to use a /26 subnet mask, which allows for 64 hosts per subnet.

  3. Step 3: Calculate Subnet Masks: With a /26 subnet mask, we have a subnet mask of 255.255.255.192.

  4. Step 4: Assign IP Addresses: We assign the following IP addresses to the subnets:

    • Subnet 1: 192.168.0.0/26
    • Subnet 2: 192.168.0.64/26
    • Subnet 3: 192.168.0.128/26
    • Subnet 4: 192.168.0.192/26
  5. Step 5: Test and Verify: We validate the subnet configuration by checking network connectivity between devices within each subnet.

Useful Subnetting Tables

Subnet Calculation Reference Table

Subnet MaskCIDR NotationTotal IP AddressesUsable IP Addresses
/30255.255.255.25242
/29255.255.255.24886
/28255.255.255.2401614
/27255.255.255.2243230
/26255.255.255.1926462
/25255.255.255.128128126
/24255.255.255.0256254
/23255.255.254.0512510
/22255.255.252.01,0241,022
/21255.255.248.02,0482,046
/20255.255.240.04,0964,094
/19255.255.224.08,1928,190
/18255.255.192.016,38416,382
/17255.255.128.032,76832,766
/16255.255.0.065,53665,534
/15255.254.0.0131,072131,070
/14255.252.0.0262,144262,142
/13255.248.0.0524,288524,286
/12255.240.0.01,048,5761,048,574
/11255.224.0.02,097,1522,097,150
/10255.192.0.04,194,3044,194,302
/9255.128.0.08,388,6088,388,606
/8255.0.0.016,777,21616,777,214
/7254.0.0.033,554,43233,554,430
/6252.0.0.067,108,86467,108,862
/5248.0.0.0134,217,728134,217,726
/4240.0.0.0268,435,456268,435,454
/3224.0.0.0536,870,912536,870,910
/2192.0.0.01,073,741,8241,073,741,822
/1128.0.0.02,147,483,6482,147,483,646
/00.0.0.04,294,967,2964,294,967,294

Usable Subnets Table

CIDR NotationNumber of Usable Subnets
/01
/12
/24
/38
/416
/532
/664
/7128
/8256
/9512
/101024
/112048
/124096
/138192
/1416384
/1532768
/1665536
/17131072
/18262144
/19524288
/201048576
/212097152
/224194304
/238388608
/2416777216
/2533554432
/2667108864
/27134217728
/28268435456
/29536870912
/301073741824
/312147483648
/324294967296

Powers of Two Table

Power of TwoValue
2^324294967296
2^312147483648
2^301073741824
2^29536870912
2^28268435456
2^27134217728
2^2667108864
2^2533554432
2^2416777216
2^238388608
2^224194304
2^212097152
2^201048576
2^19524288
2^18262144
2^17131072
2^1665536
2^1532768
2^1416384
2^138192
2^124096
2^112048
2^101024
2^9512
2^8256
2^7128
2^664
2^532
2^416
2^38
2^24
2^12
2^01

VLANs: Virtual Local Area Networks

What is a VLAN?

A VLAN (Virtual Local Area Network) is a logical grouping of devices within a network, regardless of their physical location. VLANs provide enhanced network flexibility, security, and scalability by enabling the creation of separate broadcast domains.

Why Use VLANs?

VLANs offer numerous benefits in network management:

  1. Improved Security: VLANs can be used to isolate sensitive data and restrict unauthorized access. By separating devices into different VLANs, traffic can be contained within specific segments, preventing unauthorized users from accessing critical resources.

  2. Enhanced Performance: VLANs allow for the logical separation of network traffic, reducing congestion and improving overall network performance. Broadcast traffic is limited to the VLAN, minimizing unnecessary network noise.

  3. Simplified Network Management: VLANs provide a way to group devices based on function, department, or any other logical criteria, simplifying network administration and configuration.

VLAN Configuration

To configure a VLAN, the following steps are generally followed:

  1. Identify VLAN Requirements: Determine the purpose and scope of the VLAN deployment. Identify the devices and their placement within VLANs.

  2. Assign VLAN IDs: Assign unique VLAN IDs to each VLAN. VLAN IDs are usually numbers between 1 and 4094, with certain reserved IDs.

  3. Configure Switch Ports: Assign the switch ports to the appropriate VLANs. This can be done by configuring the switch port as an access port or a trunk port.

  4. Configure VLAN Interfaces: If inter-VLAN communication is required, configure VLAN interfaces, such as VLAN interfaces on a layer 3 switch or router.

  5. Test and Verify: Validate the VLAN configuration by testing network connectivity between devices within each VLAN.

Reserved VLAN Table

Claimed VLAN TagsDescription
VLAN 0Reserved VLAN ID and should not be used
VLAN 1Default VLAN for many network devices
VLAN 2Default VLAN for management traffic
VLAN 3-4Reserved VLAN IDs
VLAN 5Reserved for Token Ring VLAN ID
VLAN 6-1001Reserved VLAN IDs
VLAN 1002-1005Default VLANs used by Cisco for specific purposes
VLAN 1006-1024Reserved VLAN IDs
VLAN 1025-4094Reserved for extended range VLANs
VLAN 4095Reserved VLAN ID and should not be used

Conclusion

Understanding subnets and VLANs is crucial for designing and managing efficient computer networks. Subnets allow for network segmentation, improving performance and security. VLANs provide logical grouping of devices, enhancing network flexibility and management. By following the steps outlined in this article, network administrators can effectively subnet their networks and configure VLANs to meet specific requirements.

Remember, networking basics are the foundation for building robust and scalable networks that cater to the needs of modern-day communication and data transfer.

References