|Subnet Masking And Addressing
Ok, this explains subnet addressing which is useful if you run a scanner, a firewall, a router or anything else that is bound to IP subnet addressing. Note that this only describes IPv4 subnets. Reading binary values
Normally, you read binary numbers bytewise (8 bit wise). Start at the last bit, bit 0. If it is 1, add 2^0 to your number, else add 0. Then the next bit, bit 1, If it is 1, add 2^1 (2) to your number, If bit 3 is 1 add 2^2 (4) to your number, if bit 4 is 1 add 2^3 (8) to your number ... if bit 8 is 1 add 2^7 (128) to your number. You see, the base is always 2 because it can be either 0 or 1. Example 1: 10100100 = 2^7+0+2^5+0+0+0+2^2+0+0 = 164 Example 2: 11111111 = 2^7+2^6+2^5+2^4+2^3+2^2+2^1+2^0 = 255 Thats it! Now to subnet addressing.
When you state a host including a subnet (example: nmap), you do it like this: 184.108.40.206/24, where /24 is the subnet. Lets have a look at what this means: an IP address is a 32 bit addr...