Process of dividing an IP network in to sub divisions is called subnetting. Subnetting divides an IP address in to two parts as the network (or routing prefix) and the rest field (which is used to identify a specific host). CIDR notation is used to write a routing prefix. This notation uses a slash (/) to separate the network starting address and the length of the network prefix (in bits). For example, in IPv4, 22.214.171.124/22 indicates that 22 bits are allocated for the network prefix and the remaining 10 bits are reserved for the host address. In addition, routing prefix can also be represented using the subnet mask. 255.255.252.0 is the subnet mask for 126.96.36.199/22. Separating the network portion and the subnet portion of an IP address is done by performing a bitwise AND operation between the IP address and the subnet mask. This would result in identifying the network prefix and the host identifier.
Supernetting is the process of combining several IP networks with a common network prefix. Supernetting was introduced as a solution to the problem of increasing size in routing tables. Supernetting also simplifies the routing process. For example, the subnetworks 188.8.131.52/24 and 184.108.40.206/24 can be combined in to the supernetwork denoted by 220.127.116.11/23. In the supernet, the first 23 bits are the network part of the address and the other 9 bits are used as the host identifier. So, one address will represent several small networks and this would reduce the number of entries that should be included in the routing table. Typically, supernetting is used for class C IP addresses (addresses beginning with 192 to 223 in decimal), and most of the routing protocols support supernetting. Examples of such protocols are Border Gateway Protocol (BGP) and Open Shortest Path First (OSPF). But, protocols such as Exterior Gateway Protocol (EGP) and the Routing Information Protocol (RIP) do not support supernetting.