decimal numbers are easiest to work with. [3]

First of all, blocks of IP addresses are issued in multiples of 2. If you have 4 bits to play with, you have 16 IP addresses (2*2*2*2=16). If you have 8 bits to play with, you have (2^8) 256 IP addresses. If someone says you have 13 IP addresses, you’re either sharing an Ethernet with other people or they’re wrong. A netmask is simply another way of specifying how many bits are fixed. In the computing world, an 8-bit number runs from 0 to 255. If you have 24 fixed bits, also known as a /24, and formerly known as a class C, your netmask is 24 ones followed by eight zeros: 11111111.11111111.11111111.00000000, or 255.255.255.0. If you’ve been around a few networks, that should look familiar. If you have a /25, however, you have 25 fixed bits. This comes to 11111111.11111111.11111111.10000000, or 255.255.255.128. It’s not uncommon to see a host’s IP address with its netmask attached, e.g. 192.168.3.4/26. This gives you everything you need to know to get the host on the network. (Finding the default gateway would be another issue, mind you!) Computing Netmasks in Decimal You probably don’t want to repeatedly convert from decimal to binary and back. Here’s a trick to calculate your netmask while staying in decimal land. First, learn how many actual IP addresses you have. This will be a multiple of 2. You’ll almost certainly be issued a network smaller than a /24. Subtract the number of IP addresses you have from 256. This is the last number of your netmask. For example, if you have a /26, or 64 IP addresses, the last part of your netmask is (256-64=)192. Your netmask would be 255.255.255.192. You still need to use a bit of logic to avoid binary conversions. Figuring out legitimate addresses on your network can be a bit of a pain. If your IP address is 192.168.1.100/26, you’ll need to know that a /26 is 26 fixed bits, or 64 IP addresses. Look at the last number of your IP address, 100. It certainly isn’t between 0 and 63, but it is between 64 and 127. The other hosts on your IP block have IP addresses ranging from 192.168.1.64 to 192.168.1.127. At this point, I should mention that netmasks are frequently shown in hex numbers. You might feel like throwing up your hands and giving up the whole thing. To simplify your life, I’m including a table of netmasks, IP information, and general goodness for /24 and smaller networks. Table 8-1: Netmasks and IP address conversions Prefix Binary Mask Decimal Mask Hex Mask Available IPs /24 00000000 0 0×00 256 /25 10000000 128 0×80 128 /26 11000000 192 0xc0 64 /27 11100000 224 0xe0 32 /28 11110000 240 0xf0 16 /29 11111000 248 0xf8 8 /30 11111100 252 0xfc 4 /31 11111110 254 0xfe 2 /32 11111111 255 0xff 1 Unusable IP Addresses Page 166

Hint: If you are looking for very good and affordable webspace to host and run your tomcat hosting application check Virtualwebstudio tomcat web hosting provider

Comments are closed.