Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IP Subnet Notation

On a lab to regarding network topology using port scanners, I am instructed "to develop a network inventory and topology for the 123.218.44.0/24 subnet."

What does the notation 0/24 mean there? I had assumed it meant to consider the network range 123.218.44.0 to 123.218.44.24. When I use nmap against a range, using parameters in this format:

nmap -sS -O 123.218.44.0/24 

nmap reports that it scanned 256 hosts, presumably 123.218.44.0 to 123.218.44.255. There is only one host between 0 and 24, but there are 4 hosts between 101 and 255. I assume that I am meant to find all 5 of those hosts, but I don't understand the notation so I'm not sure. Can anyone clarify for me?

like image 425
JoshJordan Avatar asked Apr 01 '09 19:04

JoshJordan


People also ask

What is a subnet notation?

IPv4. Slash notation is a compact way to show or write an IPv4 subnet mask. When you use slash notation, you write the IP address, a forward slash (/), and the subnet mask number. To find the subnet mask number: Convert the decimal representation of the subnet mask to a binary representation.

How do you write an IP subnet?

For example, the IPv4 network 192.0. 2.0 with the subnet mask 255.255. 255.0 is written as 192.0. 2.0/24, and the IPv6 notation 2001:db8::/32 designates the address 2001:db8:: and its network prefix consisting of the most significant 32 bits.

What is a 255.255 255.0 subnet?

A class C network would have a subnet mask of 255.255. 255.0 which means that 24 bits are used for the network. In CIDR notation this is designated by a /24 following the IP address.

What is IP CIDR notation?

CIDR notation is a compact representation of an IP address and its associated network mask. The notation was invented by Phil Karn in the 1980s. CIDR notation specifies an IP address, a slash ('/') character, and a decimal number.


1 Answers

That's Classless Inter-Doman Routing notation. The /24 means that the routing prefix of the subnet is 24 bits long, which means there's ony 8 bits left for the subnet itself, i.e. 123.218.44.0 to 123.218.44.255

like image 183
Michael Borgwardt Avatar answered Sep 22 '22 21:09

Michael Borgwardt