When I was configuring my Lede router, I happened to see 0.0.0.0/0 as an internal address for MiniUPnP ACL(Mini Universal Plug and Play Access Control List). I was confused and did not know what the slash zero at the end of the IP address mean.
Finally, I found it in reddit that it is a flexible notation called CIDR(Classless Inter-Domain Routing) which is intended to represent a sequential range of IP addresses. And as wikipedia claims, Classless Inter-Domain Routing is a method introduced in 1993 for allocating IP addresses and IP routing.
And the number x(just call it the unknown x) after /(slash) should be ranged in 0 and 32, where the x means the first x bits of the IPv4 address should be fixed while the (x+1)-th to 32nd can variate to form a range of IP addresses. When x=0, all 32 bits of the IPv4 address is uncertain, thus representing all the addresses, and a specific IP address like 1.2.3.4 should be represented as 1.2.3.4/32.
(IP addresses are [0-255].[0-255].[0-255].[0-255]. The /* shows how many bits you fix from the left hand side.)
Following are more examples:
- 1.2.3.0/24 – any IP address starting with 1.2.3
- 1.2.0.0/16 – any IP address starting with 1.2
- 1.0.0.0/8 – any IP address starting with 1
And the number x is not necessarily multiples of 8, which means you should actually consider about the binary form of the IPv4 address. 1.2.3.0/28 is 00000001. 00000010. 00000011.00000000B/28, thus, striping the first 28 bits and left with 4, we should get 1.2.3.[0-15].
Still working on it