What does the
"/16" means in here :
"192.168.0.0/16", for example.
A simple explanation:
/<number> is how a computer can quickly calculate what is part of its network and what is not. It represents the bit length of the subnet mask, as indicated above. The subnet mask is like masking when painting. You place a mask over what you DO NOT want to paint on. The subnet mask is a way to calculate the network portion of the address space and the host address space. The network address space is assigned to you, the host address space you define which device receives what address in the host space.
A computer performs binary math of ANDing the IP address and the network mask.
IP Address 10.10.15.10/16
Translate the IP address 4 octets into binary: 00001010.00001010.00001111.00001010
Step 2) Translate the Subnet mask 4 octets into binary, which is easy using CIDR: 11111111.11111111.00000000.00000000
Step 3) Perform the ANDing operation on the two addresses. This will give you the Network Address for the subnet.
ANDing rules are as follows:
- 1 AND 1 = 1
- 0 AND 1 = 0
- 0 AND 0 = 0
- 1 AND 0 = 0
00001010.00001010.00001111.00001010 AND 11111111.11111111.00000000.00000000 ——————————————————————————————————— 00001010.00001010.00000000.00000000
Step 4) Convert it back to decimal: 10.10.0.0
So now a computer knows that any address from 10.10.0.0 to 10.10.255.255 is part of its network and any other address is not.
It's like a binary network gang thing, you are in or you are not.
The slash and the number following it is just a shorthand way to write a subnet mask. It's called CIDR (Classless Inter-Domain Routing) notation. It's also commonly referred to as the prefix length.
The number after the slash represents the number of consecutive 1's in the subnet mask. For example,
192.168.10.0/24 is equal to the network
192.168.10.0 with a
255.255.255.0 subnet mask. If you convert
255.255.255.0 to binary, you end up with 24 consecutive
Another example could be
10.0.0.0/8. 8 consecutive
1's in the subnet mask gives you
For more information, see RFC 4632, Section 3.1.
The slash following the IP address is the abbreviation for the subnet mask.
The binary version of a subnet mask is going to be comprised of ones and zeros just as the binary verison of an IP address would be, however, the ones in a subnet mask are all consecutive. The amount of ones in the subnet mask is equal to the number of the abbreviation.
For example, the /16 subnet mask you asked about would have 16 ones in a row, the rest of the numbers being zeros. 11111111.11111111.00000000.00000000. When converted from the base 2 number system of binary into the base 10 number system of the decimal version of the IP address, it therefore equals 255.255.0.0.
A /9 subnet mask would be 11111111.10000000.00000000.00000000, or 255.128.0.0.
A /30 subnet mask would be 11111111.11111111.11111111.11111100, or 255.255.255.252 which is great for creating a network that only accounts for 2 routers or layer 3 switches because there are only 4 total IP addresses and only 2 of those are usable host IP addresses.
A lot can be done with subnetting, but subnetting is a whole new monster to tackle if you are just getting started.
192.168.0.0 is private IP address starting range address (192.168.0.0 up to 192.168.255.255 Small network). It means you have used sixteen bits for network address out of thirty two bits and bits are remaining for host addressing. for these remaining sixteen bits can be used for sub netting based on your network design and other sub netting steps illustrate in above posts.
one another simple explanation can be, how many address you can have in one range.
ex: you have an ip a.b.c.d/x. So a,b,c,d individually can have values 0-255 so which gives us 2^3(max length is 3) = 8. so one part of ip can have 8 bits.
So now if we write ip like 10.10.0.0/x so now x/8 = total number fixed blocks we have.
ex: if we have /16 so 16/8 = 2 this means we have 2 blocks free so now ip would be 10.10.0.0 so here first two blocks are fixed and we can have 0-255 in each last two blocks so 256*256 = 65536(address we can have) and in netmask would be 255.255.0.0
now lets say we had /18 which is not completely divisible by 8, so 18/8 = 2(fixed blocks) and 2 is left so now divide 256 twice which is 256/2 = 128, 128/2 = 64 so we got 64 now 256-64 = 192. so now our netmask would be 255.255.192.0 which means we can have 64*256 address.
further, if it was /24 this means 24/8 = 3 three blocks are fixed and one is variable. netmask is 255.255.255.0 and if we had /8 this means 8/8 = 1 one block is fixed. so 255.0.0.0
It represents the subnet (subnetwork) mask.
1) Re-write the IP address as computers read it.
192.168.0.0 converts to binary/base2/'bits' as 11000000.10101000.00000000.00000000
2) The number of bits (from left to right) that represent the subnet address is specified as 16 ('/16').
16 bits, or 11000000.10101000 (192.168) is the network address and 0.0, or 00000000.00000000, is the host address - in this case a broadcast address.
It's referred to a mask because you are telling the computer to ignore that number of bits when calculating the host address, or perhaps that the network wears those number of bits as it's identifier, or mask.