Question: Creating Subnets -- Python Scripts You are a manager of a network that has 56 remote site and you have one Class B license. What

Creating Subnets -- Python Scripts

You are a manager of a network that has 56 remote site and you have one Class B license. What subnet mask would you use with having the max amount of hosts at each site 1000?

I need help solving this problem here above, I am writing a python script; however, I'm not sure if I am even on the right track.

I appreciate the help, thank you.

print('9. You are a manager of a network that has 56 remote site and you have'

+ 'one Class B license. What subnet mask would you use with having the' +

'max amount of hosts at each site 1000?')

#class B has /?. We have ? addresses

ipInterface = ipaddress.ip_interface('?')

ipNetork = ipInterface.network

print(ipNetwork)

bitsBorrowed = 2

ipSubnetLen = ipNetwork.prefixlen + bitsBorrowed

print('The subnet mask length is {}'.format(ipSubnetLen))

print('The 56 subnets needed are less than the {} subnets created'.format(len(list(ipaddress.ip_network(ipNetwork).subnets(prefixlen_diff = (bitsBorrowed))))))

ipSubnet = str('10.10.10.10/') + str(ipSubnetLen)

print(ipSubnet)

ipSubnetAddress = ipaddress.ip_network(ipSubnet, strict = False)

print(ipSubnetAddress)

print('The 56 remote site needed of less than the {} host in each subnet'.format(len(list(ipaddress.ip_network(ipSubnetAddress).hosts()))))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!