Now there is a section of Class B IP address 119.115.0.0--119.115.255.255, now I assign departments to use, but still left those addresses are not assigned out, through manual calculation is very complicated, because some address is very small, very messy, not well managed, So calculate it by MySQL. Also use MySQL's function Inet_aton (' 119.115.0.0 ') to derive an integer. In addition MySQL database field set four fields, starting IP, terminating IP, starting IP integer, terminating IP integer, How to calculate an IP address that is not assigned. Can MySQL be alone or mysql+php? Thank you very much please enlighten me.
119.115.0.0--119.115.255.255 Assign the following address
119.115.136.132,119.115.136.135
119.115.141.0,119.115.141.15
119.115.136.88,119.115.136.91
Reply content:
Now there is a section of Class B IP address 119.115.0.0--119.115.255.255, now I assign departments to use, but still left those addresses are not assigned out, through manual calculation is very complicated, because some address is very small, very messy, not well managed, So calculate it by MySQL. Also use MySQL's function Inet_aton (' 119.115.0.0 ') to derive an integer. In addition MySQL database field set four fields, starting IP, terminating IP, starting IP integer, terminating IP integer, How to calculate an IP address that is not assigned. Can MySQL be alone or mysql+php? Thank you very much please enlighten me.
119.115.0.0--119.115.255.255 Assign the following address
119.115.136.132,119.115.136.135
119.115.141.0,119.115.141.15
119.115.136.88,119.115.136.91
First, the network segment, you give a section of the IP range what is the use of?
The network segment is determined by the ip+ mask
119.115.0.0--119.115.255.255 Assign the following address
119.115.136.132,119.115.136.135//119.115.136.132-135
119.115.141.0,119.115.141.15//119.115.141.15.0-15
119.115.136.88,119.115.136.91//119.115.136.88-91, this is the public address, right?
The first address segment: 132-135 132 is the network number 135 is the broadcast number can not be used, you can only use 133 134 of these 2 IP with
Second address segment: Ditto you can only use 16-2 = 14 IP Third address segment: Ditto you can only have 2 address segments
Still have questions, ask me again, this is the knowledge that divides the subnet.
This kind of thing to write a small program is not done?
Sort by the first address and then list the gaps in the middle.