What is subnet, Subnetting mask and resolving to find number of Hosts, N/w address & Broadcast address. Route table,IP gateway and Region explanation:
A subnet is a subdivision of a larger network. It allows you to divide a network into smaller logical networks, called subnets, for more efficient management and better resource allocation. Subnetting is commonly used to improve network performance, security, and organization.
When you create a subnet, you allocate a range of IP addresses from the parent network's address space. Each device connected to the subnet is assigned an IP address from that range. The subnet mask determines the size of the subnet and helps identify which portion of the IP address belongs to the network and which portion belongs to the host.
For example, consider the IP address 192.168.0.0/24. The "/24" indicates that the first 24 bits of the IP address are used for the network, leaving 8 bits for the host. In this case, the subnet mask would be 255.255.255.0, indicating that the first three octets (24 bits) are for the network, and the last octet (8 bits) is for the host.
Subnetting is explained below:
Consider IP address 192.168.2.64/26 and 26 here indicates the subnet mask of the IP.
which means twenty-six times 1 followed by filling up 0.
192.168.2.64/26 that implies subnets are a logical partition of an IP network into multiple, smaller network segments, here it is partitioned 26 times.
Subnet Mask: 11111111 11111111 11111111 11000000 (In binary)
See the above highlighted: 26 times 1 and the rest are 0
The IP address in Binary: 11000000 10101000 00000010 01000000
Question: How do we calculate IP address in Binary?
Consider 192 as an example here:
Divide 192 by 2. Use the integer quotient obtained in this step as the dividend for the next step. Repeat the process until the quotient becomes 0.
192₁₀ = 11000000₂ (In Binary)
Now how to calculate the number of hosts ?, Network Address ?, and Broadcast Address?
Subnet Mask: 11111111 11111111 11111111 11000000 (In binary)
The IP address in Binary: 11000000 10101000 00000010 01000000
Lets us create a demarcation line (Blue color) here as shown in the below example and enter 000000 as the lowest and 111111 as the highest.
N/w address is 11000000 10101000 00000010 01000000 which implies 192.168.2.64
The broadcast address is 11000000 10101000 00000010 01111111 which implies 192.168.2.127
Hosts range from: 192.168.2.65--->.126
A route table, also known as a routing table, is a database maintained by a network device (such as a router) that lists the available routes for forwarding network traffic. The route table contains information about network destinations and the next hop (or exit interface) to reach those destinations.
When a packet arrives at a network device, the device checks the destination IP address of the packet against its route table to determine where to send the packet next. The route table is consulted hierarchically, starting from the most specific (longest prefix match) to the least specific (default route).
Each entry in a route table typically includes the following information:
1. Destination network or subnet: The network address or subnet range to which the entry corresponds.
2. Subnet mask: The subnet mask associated with the destination network or subnet.
3. Next-hop or exit interface: The next-hop IP address or the interface through which the packet should be forwarded to reach the destination.
4. Metric or cost: An optional value used to determine the best route if multiple paths to the same destination exist. Lower metrics indicate a better path.
Route tables are essential for routers to make informed decisions on how to forward network traffic between different networks or subnets. They help ensure that data packets are correctly routed to their intended destinations.
An IP gateway, also known as a default gateway or router, is a network device that serves as an entry and exit point between different networks. It acts as the connection point between a local network (such as a LAN or subnet) and external networks (such as the Internet or other networks).
The IP gateway is typically configured with an IP address that belongs to the local network, and it also has an IP address that belongs to the external network. When a device on the local network wants to communicate with a device on a different network, it sends the data packet to the IP gateway.
The IP gateway examines the destination IP address of the packet and checks its routing table (or route table) to determine the appropriate path for forwarding the packet to reach the destination network. The gateway then forwards the packet to the next-hop IP address or the exit interface specified in the routing table.
In simpler terms, the IP gateway acts as a bridge or intermediary between the local network and other networks. It enables devices on the local network to communicate with devices on different networks by routing the traffic between them.
It's worth noting that in smaller networks, the IP gateway can be a standalone device such as a router. In larger networks, the gateway functionality may be integrated into more complex network devices such as switches, firewalls, or dedicated gateway appliances.
Region:
In networking, the term "region" typically refers to a geographical or administrative division within a network infrastructure. It is often used in the context of cloud computing or content delivery networks (CDNs) where data centers or network resources are distributed across different locations.
Here are two common use cases where the concept of region is relevant:
1. Cloud Computing: Cloud service providers, such as Amazon Web Services (AWS), Microsoft Azure, or Google Cloud Platform (GCP), often organize their infrastructure into regions. A region represents a physical location where data centers are located. Each region is typically isolated and has its own set of resources, such as servers, storage, and networking equipment. Customers can deploy their applications and services in a specific region, and these resources are managed and operated by the cloud provider within that region. Regions are strategically placed around the world to provide better geographical proximity, redundancy, and localized services for customers in different areas.
2. Content Delivery Networks (CDNs): CDNs are networks of servers distributed across multiple locations around the world. The servers, called edge servers or PoPs (Points of Presence), store cached copies of content, such as web pages, images, videos, or software updates. When a user requests content, the CDN directs the request to the nearest edge server in terms of network proximity. CDNs often divide their infrastructure into regions to ensure efficient content delivery and reduce latency. By serving content from servers closer to the end users, CDNs can deliver content faster and enhance the user experience.
In both cases, regions represent distinct locations or zones within a network where resources are deployed or distributed strategically. They are designed to improve performance, availability, and scalability by distributing network resources across multiple geographical areas.
Subscribe to my newsletter
Read articles from Sandeep Kumar directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Sandeep Kumar
Sandeep Kumar
IT experience in different technologies and also various domains(Healthcare,financial bank, Telecom,Resource management). Tech skills MSSQL Rdbms, AD,Windows/Linux/Vmware platform,Cloud platform AWS, CI/CD pipeline Jenkins, Bash shell scripting, GIT&GITHUB, Docker, YAML,Terraform, Powershell and Python certification details: MS SQL CERTIFICATION 70-462, MS AD 70-742, Aws solution architect certified SAA C03.