CIDR: Classless Inter-Domain Routing

CIDR, or Classless Inter-Domain Routing, is a method for specifying IP addresses and their associated routing prefix. It replaces the older "classful" IP addressing system, which divided addresses into fixed classes (A, B, and C) based on their most significant bits.

Common Representation

In CIDR notation, an IP address is written as a standard IP address, followed by a slash (/) and a number that represents the number of bits in the routing prefix. For example, the IP address 1.1.1.1 with a 24-bit routing prefix would be written as 1.1.1.1/24.

The representation 1.1.1.1/24 means the following: - I am talking about the address 1.1.1.1 - It's a CIDR of 24 bits (255.255.255.0) so this adapter or this route is for 1.1.1.0/24 aka 1.1.1.0 - 1.1.1.255

With /0 refering to all addresses only 0.0.0.0/0 (any) is valid for the /0 suffix.

Classful IP Addressing (legacy)

The classful IP addressing system divided IP addresses into three classes: A, B, and C. Class A addresses had their most significant bit set to 0, class B addresses had their most significant two bits set to 10, and class C addresses had their most significant three bits set to 110. Each class had a different number of bits reserved for specifying the network address and the host address.

Classful IP addressing had several limitations, such as wasting a large number of addresses in small networks and not providing enough addresses in large networks. CIDR addresses these issues by allowing for a variable-length routing prefix.

Subnet Addresses and CIDR

Subnetting is the process of dividing a larger network into smaller subnetworks. CIDR notation can be used to represent the subnet masks of these subnetworks.

For example, consider the network 192.168.0.0/24. This network has 256 addresses (192.168.0.0 to 192.168.0.255) and a default mask of 255.255.255.0. To create a subnet with 64 addresses, we could use the CIDR notation 192.168.0.0/26 to represent the subnet mask 255.255.255.192.

When it comes to Windows networking configuration, the use of CIDR notation is mainly used to configure subnet masks. The subnet mask is used by the network protocol to determine which portion of an IP address represents the network address and which portion represents the host address. By using CIDR notation, you can specify the exact number of bits in the subnet mask, which can be useful when working with subnets of different sizes.

In conclusion, CIDR is a more efficient and flexible method for specifying IP addresses and their associated routing prefix than the older classful IP addressing system. It allows for a variable-length routing prefix and facilitates subnetting, allowing for more precise network configuration.

IPv6 CIDR Notation

IPv6, the successor to IPv4, also uses CIDR notation to specify IP addresses and their associated routing prefix. The format for IPv6 CIDR notation is similar to IPv4 CIDR notation, with an IPv6 address written as a standard IPv6 address, followed by a slash (/) and a number that represents the number of bits in the routing prefix.

For example, the IPv6 address 2001:0db8:85a3:0000:0000:8a2e:0370:7334 with a 64-bit routing prefix would be written as 2001:0db8:85a3:0000:0000:8a2e:0370:7334/64.

IPv6 addresses are 128-bits long, which provides a much larger address space than IPv4's 32-bits. This allows for a much larger number of unique addresses, and eliminates the need for address conservation techniques such as Network Address Translation (NAT).

Additionally, the larger address space of IPv6 allows for more efficient routing, as the routing prefixes are longer, making it easier for routers to identify the network and host portions of an address.

In summary, IPv6 CIDR notation is similar to IPv4 CIDR notation, but it uses a different format for IP addresses and a larger number of bits in the routing prefix, which allows for more efficient routing and a much larger number of unique addresses.