10 ответов
+ 4
@fsociety: Delayed, sorry. Outside interference.
To calculate the hosts on a subnet, you raise 2**(32 - subnet_mask_bits) - 2.
A short, colorful visual (at step 5): https://www.chabotcollege.edu/faculty/netacad/prot/sem1/study_sheets/detIPadd.htm
I almost included a bit of CompSci (as a skippable detail) and just decided...let's skip it. I'll save it as possible lesson material, or asked-for follow up.
+ 4
@Ahmed chiboub: Not every example has fit to my preconceptions.
+ 3
Determining the Number of IP Subnets and Hosts.. can anybody make python code for that.. thanks kirk, i change my question.. for a better understanding.. for other
+ 2
Here's a netmask / subnet calculator I ran into recently...not Python but maybe adds some inspiration:
https://code.sololearn.com/WKVVmk6rIOJT/?ref=app
+ 1
i want to calculate number of machines in a network giving the network address and mask.
+ 1
you don't need the network address. only the mask.
easy:
https://code.sololearn.com/cxFVgoT5FzPk/?ref=app
+ 1
if i know an ip address and then sub net mask.. how to count the range network address.. for that ip address
0
didn't get what you mean.
do you want to calculate number of machines in a network giving the network address and mask, or you want to scan a network and get the number of connected machines.?
0
if you want the network address and the broadcast address , it's gonna take some time
0
is it written in Python? I don't think so