Classless Inter-domain Routing (CIDR), specified in RFC 2050, is an extension to VLSM and route summarisation.
With VLSM, you can summarise subnets back to the Class A, B, or C network boundary. For example, if you have a Class C network 192.168.1.0/24 and subnet it with a 26-bit mask, you have created four subnets. Using VLSM and summarisation, you can summarise these four subnets back to 192.168.1.0/24.
CIDR takes this one step further and allows you to summarise a block of contiguous class A, B, and C network numbers. This practice is commonly referred to as supernetting. Today’s classless protocols support supernetting. However, it is most commonly configured by ISPs on the Internet using BGP.
Discontiguous subnets are not supported by classful protocols but are supported by classless protocols. Classful protocols do not include the subnet mask when advertising network and subnet numbers. When implementing route summarisation, another thing you’ll need to consider is that routing decisions, by a router, must be made on the entire destination IP address in the IP packet header. The router always uses the longest matching prefix in the routing table.
CIDR allows you to summarise class networks together; VLSM allows you to summarise subnets only back to the class network boundary. Each segment has a single network number and mask. VLSM allows a class address, not a network segment, to have more than one subnet mask.