jskfan
asked on
Host Address Range in IP Subnetting
Host Address Range in IP Subnetting
I have this IP address: 10.65.211.46 subnet mask 255.255.254.0
how can I calculate The host address range to come up with first host:10.65.210.1 and the last host: 10.65.211.254
Thank you
I have this IP address: 10.65.211.46 subnet mask 255.255.254.0
how can I calculate The host address range to come up with first host:10.65.210.1 and the last host: 10.65.211.254
Thank you
IP Address: 10.65.211.46
Network Address: 10.65.210.0
Usable Host IP Range: 10.65.210.1 - 10.65.211.254
Broadcast Address: 10.65.211.255
Total Number of Hosts: 512
Number of Usable Hosts: 510
Subnet Mask: 255.255.254.0
Wildcard Mask: 0.0.1.255
Binary Subnet Mask: 11111111.11111111.11111110 .00000000
IP Class: B
CIDR Notation: /23
IP Type: Private
Short: 10.65.211.46 /23
Binary ID: 00001010010000011101001100 101110
Integer ID: 172086062
Hex ID: 0xa41d32e
in-addr.arpa: 46.211.65.10.in-addr.arpa
IPv4 Mapped Address: ::ffff:0a41.d32e
6to4 Prefix: 2002:0a41.d32e::/48
Network Address: 10.65.210.0
Usable Host IP Range: 10.65.210.1 - 10.65.211.254
Broadcast Address: 10.65.211.255
Total Number of Hosts: 512
Number of Usable Hosts: 510
Subnet Mask: 255.255.254.0
Wildcard Mask: 0.0.1.255
Binary Subnet Mask: 11111111.11111111.11111110
IP Class: B
CIDR Notation: /23
IP Type: Private
Short: 10.65.211.46 /23
Binary ID: 00001010010000011101001100
Integer ID: 172086062
Hex ID: 0xa41d32e
in-addr.arpa: 46.211.65.10.in-addr.arpa
IPv4 Mapped Address: ::ffff:0a41.d32e
6to4 Prefix: 2002:0a41.d32e::/48
tool of the trade for this ipcalc.
$ ipcalc 10.65.211.46/255.255.254.0
Address: 10.65.211.46 00001010.01000001.1101001 1.00101110
Netmask: 255.255.254.0 = 23 11111111.11111111.1111111 0.00000000
Wildcard: 0.0.1.255 00000000.00000000.0000000 1.11111111
=>
Network: 10.65.210.0/23 00001010.01000001.1101001 0.00000000
HostMin: 10.65.210.1 00001010.01000001.1101001 0.00000001
HostMax: 10.65.211.254 00001010.01000001.1101001 1.11111110
Broadcast: 10.65.211.255 00001010.01000001.1101001 1.11111111
Hosts/Net: 510 Class A, Private Internet
All the above is good info however, since you are using a /23 mask (255.255.254.0), you are subnetting on every second net (e.g. 0-1, 2-3, 4-5, ...etc). Each range will begin on the even, end on the next odd of the third octet (.211 of 10.65.211.46). The third octect is odd, thus the top end of the range, so your range is? .210.0 - .211.255. First IP of any network is HA!, the network address (210.0) and unusable. The last IP (.211.255) is the broadcast and unusable. All other IP's are usable so first usable IP? That's right, 210.1. Last usable, 211.254.
You've already given the host address range. And as you may recall, the first and last addresses in the subnet's IP address range aren't hosts.
ASKER
I know first and last host are known.. you can just use Subnet calculator online and it will give you that... I am trying to understand how to find the first and last host without using a subnet calculator
any clear step by step will be very much appreciated
Thanks
any clear step by step will be very much appreciated
Thanks
In that case, see noci's answer.
010.065.210.000 00001010.01000001.11010010.00000000
255.255.254.000 11111111.11111111.11111110.00000000
Host number 00000000.00000000.00000000.00000000 = 0 (this is the network address and not assigned to a host)
010.065.210.001 00001010.01000001.11010010.00000001
255.255.254.000 11111111.11111111.11111110.00000000
Host number 00000000.00000000.00000000.00000001 = 1
010.065.211.047 00001010.01000001.11010011.00101111
255.255.254.000 11111111.11111111.11111110.00000000
Host number 00000000.00000000.00000001.00101111 = 303
010.065.211.079 00001010.01000001.11010011.01001111
255.255.254.000 11111111.11111111.11111110.00000000
Host number 00000000.00000000.00000001.01001111 = 335
010.065.211.250 00001010.01000001.11010011.11111010
255.255.254.000 11111111.11111111.11111110.00000000
Host number 00000000.00000000.00000001.00101111 = 506
010.065.211.255 00001010.01000001.11010011.11111111
255.255.254.000 11111111.11111111.11111110.00000000
Host number 00000000.00000000.00000001.11111111 = 511 (this is the broadcast address and not assigned to a host)
255.255.254.000 11111111.11111111.11111110.00000000
Host number 00000000.00000000.00000000.00000000 = 0 (this is the network address and not assigned to a host)
010.065.210.001 00001010.01000001.11010010.00000001
255.255.254.000 11111111.11111111.11111110.00000000
Host number 00000000.00000000.00000000.00000001 = 1
010.065.211.047 00001010.01000001.11010011.00101111
255.255.254.000 11111111.11111111.11111110.00000000
Host number 00000000.00000000.00000001.00101111 = 303
010.065.211.079 00001010.01000001.11010011.01001111
255.255.254.000 11111111.11111111.11111110.00000000
Host number 00000000.00000000.00000001.01001111 = 335
010.065.211.250 00001010.01000001.11010011.11111010
255.255.254.000 11111111.11111111.11111110.00000000
Host number 00000000.00000000.00000001.00101111 = 506
010.065.211.255 00001010.01000001.11010011.11111111
255.255.254.000 11111111.11111111.11111110.00000000
Host number 00000000.00000000.00000001.11111111 = 511 (this is the broadcast address and not assigned to a host)
ASKER
Probably I put the answer as a question...this is why I did not get the answer I am looking for.
Let's say the Question states :
We have an IP address: 10.65.211.46 subnet mask 255.255.254.0
What would be the the first host and last host in the range and give step by step how you get to the result.
Let's say the Question states :
We have an IP address: 10.65.211.46 subnet mask 255.255.254.0
What would be the the first host and last host in the range and give step by step how you get to the result.
If you look at my post immediately above yours, you can see how the computer does this calculation, from the first address, several middle values, to the last address. The first valid host number is 1, the last valid host number is 510. The respective IP addresses are 10.065.210.1 and 10.065.211.254.
As I've mentioned before, noci posted the exact answer you were looking for:
https://www.experts-exchan ge.com/que stions/291 28476/Host -Address-R ange-in-IP -Subnettin g.html#a42 749652
https://www.experts-exchan
ASKER
If I remember the trick : 10.65..211.46 255.255.254.0
you take 256-254 =2
then you go fro 0,2,4..............210,212 ,......... ........
so 10.65.211.46 , the third octet (211)will fit between 210 and 212
from that step forward, I forgot how the trick works to find the host range
you take 256-254 =2
then you go fro 0,2,4..............210,212
so 10.65.211.46 , the third octet (211)will fit between 210 and 212
from that step forward, I forgot how the trick works to find the host range
"If I remember the trick : 10.65..211.46 255.255.254.0
you take 256-254 =2
then you go fro 0,2,4..............210,212 ,......... ........
so 10.65.211.46 , the third octet (211)will fit between 210 and 212
from that step forward, I forgot how the trick works to find the host range"
• Knowing the subnet mask is 255.255.254.0 means you have 9 bits for host numbers (the zeros in the subnet mask).
• 2^9 = 512.
• Since you can't use the first and last host numbers, 512-2 = 510 available host numbers.
you take 256-254 =2
then you go fro 0,2,4..............210,212
so 10.65.211.46 , the third octet (211)will fit between 210 and 212
from that step forward, I forgot how the trick works to find the host range"
• Knowing the subnet mask is 255.255.254.0 means you have 9 bits for host numbers (the zeros in the subnet mask).
• 2^9 = 512.
• Since you can't use the first and last host numbers, 512-2 = 510 available host numbers.
To calculate the number of hosts in a subnet:
1) Subtract the number of bits in the subnet mask from 32. Since the subnet mask is 23 bits, 32 - 23 = 9.
2) 2 to the X power (figured out in last step) will tell you number of total number addresses in the subnet (including unusable ones): 2^9 = 512
3) Number of hosts = number of addresses - 2. 512 - 2 = 510
For host range (this borrows very heavily from noci's response I was describing answered what you've been asking)....
1) Figure out the network ID. (Use bitwise AND) This is the first address (note that it is NOT usable).
Address: 10.65.211.46 00001010.01000001.1101001 1.00101110
Netmask: 255.255.254.0 11111111.11111111.1111111 0.00000000
Network: 10.65.210.0 00001010.01000001.1101001 0.00000000
The first host address is the network ID + 1. So in this case, it will be 10.65.210.1
2) To figure out the last address (also not usable) in the network, take the network ID and change all of the bits outside of the subnet mask to 1s. (Remember the step 1 from calculating number of hosts)
Last address: 10.65.211.255 00001010.01000001.1101001 1.11111111
The last host address is the last address - 1. In this case, it will be 10.65.211.254
1) Subtract the number of bits in the subnet mask from 32. Since the subnet mask is 23 bits, 32 - 23 = 9.
2) 2 to the X power (figured out in last step) will tell you number of total number addresses in the subnet (including unusable ones): 2^9 = 512
3) Number of hosts = number of addresses - 2. 512 - 2 = 510
For host range (this borrows very heavily from noci's response I was describing answered what you've been asking)....
1) Figure out the network ID. (Use bitwise AND) This is the first address (note that it is NOT usable).
Address: 10.65.211.46 00001010.01000001.1101001 1.00101110
Netmask: 255.255.254.0 11111111.11111111.1111111 0.00000000
Network: 10.65.210.0 00001010.01000001.1101001 0.00000000
The first host address is the network ID + 1. So in this case, it will be 10.65.210.1
2) To figure out the last address (also not usable) in the network, take the network ID and change all of the bits outside of the subnet mask to 1s. (Remember the step 1 from calculating number of hosts)
Last address: 10.65.211.255 00001010.01000001.1101001 1.11111111
The last host address is the last address - 1. In this case, it will be 10.65.211.254
ASKER
the method I described above, we'll help you determine the IP of the first host and the last host in the range.
I forgot after you increment by 2 till you find where 211 sits, in our case between subnet 210 and 212
from there on... I cannot remember the rest in order to determine the IP of the first host and the last host in the range.
I forgot after you increment by 2 till you find where 211 sits, in our case between subnet 210 and 212
from there on... I cannot remember the rest in order to determine the IP of the first host and the last host in the range.
ASKER
I believe it is this way.
Since the calculation is based on the 3rd octet of the subnet 255.255.254.0
you do substract 254 from 256 , 256 -254=2
you increment by 2, 0,2,4,6,8,10.............. .......... .......... ....210,21 2,214..... .......... ..........
Since 211 sits between 210 and 212 and the number of hosts you can get from 2^9-2=510 then
the first host will be 10.65.210.1 and the last will be 10.65.211.254
Though still not sure how to explain 210 hosts........since on 210.1 to 210.254 will be 254 hosts and on 211.1 to 211.254 will be another 254 hosts , you would think it makes 508 Hosts...
Am I missing something there ?
Since the calculation is based on the 3rd octet of the subnet 255.255.254.0
you do substract 254 from 256 , 256 -254=2
you increment by 2, 0,2,4,6,8,10..............
Since 211 sits between 210 and 212 and the number of hosts you can get from 2^9-2=510 then
the first host will be 10.65.210.1 and the last will be 10.65.211.254
Though still not sure how to explain 210 hosts........since on 210.1 to 210.254 will be 254 hosts and on 211.1 to 211.254 will be another 254 hosts , you would think it makes 508 Hosts...
Am I missing something there ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you Guys
As there are 9 "host" bits, and 2^9 = 512, there are 512 possible host addresses. You can't use the first address (all zeros), and you can't use the last address (all ones), so that leaves you with 510 possible host IPs using that subnet mask.
I'm not sure this answers your question, but it may be a start.