标签: python networking subnet
import ipaddress ipinterface = ipaddress.ip_interface('138.191.0.0/16') ipnetwork = ipinterface.network college = (list(ipaddress.ip_network(ipnetwork).subnets(prefixlen_diff = 4)))
我正在尝试创建11个相同的子网,但这会创建16个相等的子网,其中5个未使用。如何最大化地址数量?