2

I am trying to block IP range of one company , I have looked ASN number of it and found the prefixes.They look like this - http://bgp.he.net/AS32934#_prefixes

31.13.68.0/24

What does that mean , does it mean D class IP is from 0 to 24

Like

31.13.68.1
31.13.68.2
31.13.68.3
.
.
.
31.13.68.24

Or it means something else , But i can see more prefixes like 31.13.68.89 here at https://www.robtex.com/route/31.13.68.0-24---facebook-inc.html

Vishnu
  • 123
  • 4
  • 1
    You should learn how IPv4 addressing works. [This answer](http://networkengineering.stackexchange.com/a/7117/8499) will explain it to you. – Ron Maupin Apr 20 '16 at 14:19
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 14 '17 at 01:49

2 Answers2

9

31.13.68.0/24 is a network in CIDR notation. It encompasses all IP addresses between 31.13.68.0 and 31.13.68.255.

You can get more explanation on CIDR easily by searching on the Internet, here is the quote from wikipedia:

CIDR notation

CIDR notation is a compact representation of an IP address and its associated routing prefix. The notation is constructed from an IP address, a slash ('/') character, and a decimal number. The number is the count of leading 1 bits in the routing mask, traditionally called the network mask. The IP address is expressed according to the standards of IPv4 or IPv6.

The address may denote a single, distinct interface address or the beginning address of an entire network. The maximum size of the network is given by the number of addresses that are possible with the remaining, least-significant bits below the prefix. The aggregation of these bits is often called the host identifier.

For example:

192.168.100.14/24 represents the IPv4 address 192.168.100.14 and its associated routing prefix 192.168.100.0, or equivalently, its subnet mask 255.255.255.0, which has 24 leading 1-bits.  

the IPv4 block 192.168.100.0/22 represents the 1024 IPv4 addresses from 192.168.100.0 to 192.168.103.255.  

the IPv6 block 2001:db8::/48 represents the block of IPv6 addresses from 2001:db8:0:0:0:0:0:0 to 2001:db8:0:ffff:ffff:ffff:ffff:ffff.

::1/128 represents the IPv6 loopback address. Its prefix size is 128, the size of the address itself.

Before the implementation of CIDR, IPv4 networks were represented by the starting address and the subnet mask, both written in dot-decimal notation. Thus, 192.168.100.0/24 was often written as 192.168.100.0/255.255.255.0.

The number of addresses of a subnet may be calculated as 2^(address size - prefix size), in which the address size is 128 for IPv6 and 32 for IPv4. For example, in IPv4, the prefix size /29 gives: 2^(32-29) = 2^3 = 8 addresses.

You refer to "D class IP" , but classfull addressing is totally deprecated, for 20 years...

JFL
  • 19,405
  • 1
  • 32
  • 64
4

No, /24 is CIDR notation and refers to a 24-bit mask - so that particular prefix means 31.13.68.0-255.

You can find more on CIDR notation via Google/Wikipedia.

Benjamin Dale
  • 9,296
  • 17
  • 46