IP Address Conversions
All of the information, instructions, and recommendations on this Web site are offered on a strictly "as is" basis. Remember "Murphy's Law." Please take the proper precautions before attempting any of the tips or modifications listed here.
How to: Convert a Decimal Number to a Base256 dotteddecimal / dottedquad 
How to: Convert an IPv4 Address to a Decimal Number 
Computer Tips index 
CS 607: LAN Connectivity 
Step 

1 
Evaluate the number:

2 
Divide the decimal number by 256 
3 
Multiply the decimal portion of the result from step 2 by 256 
4 
Subtract the result of step 3 from the original decimal number to yield the Base256 octet 
5 
Examine the decimal portion of the result from step 2

Find the last address in an IPv4 subnet with a network address of 16.0.0.0 /17, with 32,768 addresses per subnet. (This network address is subnet zero.)
First, convert the number of addresses  1 to Base 256 (dotteddecimal). 32,768  1 = 32,767
Using zeroes for the remaining octets yields a Base256 value of: 0.0.127.255
Once the conversion is complete, add that Base 256 dotteddecimal value to the 1st address to determine the last address in the subnet.
First address in the 1st subnet: 

16 
. 
0 
. 
0 
. 
0 
Number of addresses (32,768 per subnet) 1 : 

0 
. 
0 
. 
127 
. 
255 
Last address in the 1st subnet: 

16 
. 
0 
. 
127 
. 
255 
256^{3}  256^{2}  256^{1}  256^{0} 
16,777,216  65,536  256  1 
w  x  y  z 
An IPv4 address is a 32bit number. It is generally written in the "dotteddecimal" notation: w.x.y.z. To convert an IP address to base 10, use the following:
w * 16,777,216 + x * 65,536 + y * 256 + z = Decimal IP Address
All items Copyright ©1996  2017 Chin. All Rights reserved  Reproduction without explicit permission is prohibited. See: Terms of use 