Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

More Books

Students also viewed these Databases questions