DEV Community

Nadim Chowdhury
Nadim Chowdhury

Posted on

What is CIDR & Hosts?

CIDR stands for Classless Inter-Domain Routing. It is a method used to allocate IP addresses and route internet traffic more efficiently. Before CIDR, IP addresses were assigned based on classes (Class A, Class B, and Class C), which resulted in inefficient use of address space and routing tables. CIDR allows for more flexible allocation of IP addresses by using variable-length subnet masks (VLSM) and aggregating contiguous blocks of IP addresses into larger address blocks.

CIDR notation represents an IP address and its associated subnet mask using a forward slash followed by a number, which indicates the number of bits in the subnet mask. For example:

  • 192.168.1.0/24 represents the IP address 192.168.1.0 with a subnet mask of 255.255.255.0, indicating a subnet with 256 available addresses (from 192.168.1.0 to 192.168.1.255).
  • 10.0.0.0/8 represents the IP address 10.0.0.0 with a subnet mask of 255.0.0.0, indicating a subnet with over 16 million available addresses (from 10.0.0.0 to 10.255.255.255).

CIDR allows network administrators to efficiently allocate IP addresses and define subnets of various sizes according to their needs, resulting in better utilization of available address space and more efficient routing of internet traffic.

Hosts, in the context of networking, refer to devices (such as computers, servers, printers, and other networked devices) that are connected to a network and have unique IP addresses. Each host on a network is assigned an IP address that identifies it within the network. Hosts communicate with each other by sending and receiving data packets over the network using protocols such as TCP/IP. The number of hosts that can be accommodated on a network depends on the size of the subnet and the subnet mask used.

Disclaimer: This article was created with the help of AI.

Top comments (0)