ipaddress.IPv4Network.broadcast_address

broadcast_address The broadcast address for the network. Packets sent to the broadcast address should be received by every host on the network.

ipaddress.IPv4Network.address_exclude()

address_exclude(network) Computes the network definitions resulting from removing the given network from this one. Returns an iterator of network objects. Raises ValueError if network is not completely contained in this network. >>> n1 = ip_network('192.0.2.0/28') >>> n2 = ip_network('192.0.2.1/32') >>> list(n1.address_exclude(n2)) [IPv4Network('192.0.2.8/29'), IPv4Network('192.0.2.4/30'), IPv4Network('192.0.2.2/31'), IPv4Network('192.0.2.0/32')]

ipaddress.IPv4Network

class ipaddress.IPv4Network(address, strict=True) Construct an IPv4 network definition. address can be one of the following: A string consisting of an IP address and an optional mask, separated by a slash (/). The IP address is the network address, and the mask can be either a single number, which means it’s a prefix, or a string representation of an IPv4 address. If it’s the latter, the mask is interpreted as a net mask if it starts with a non-zero field, or as a host mask if it starts wit

ipaddress.IPv4Interface.with_prefixlen

with_prefixlen A string representation of the interface with the mask in prefix notation. >>> interface = IPv4Interface('192.0.2.5/24') >>> interface.with_prefixlen '192.0.2.5/24'

ipaddress.IPv4Interface.with_netmask

with_netmask A string representation of the interface with the network as a net mask. >>> interface = IPv4Interface('192.0.2.5/24') >>> interface.with_netmask '192.0.2.5/255.255.255.0'

ipaddress.IPv4Interface.with_hostmask

with_hostmask A string representation of the interface with the network as a host mask. >>> interface = IPv4Interface('192.0.2.5/24') >>> interface.with_hostmask '192.0.2.5/0.0.0.255'

ipaddress.IPv4Interface.network

network The network (IPv4Network) this interface belongs to. >>> interface = IPv4Interface('192.0.2.5/24') >>> interface.network IPv4Network('192.0.2.0/24')

ipaddress.IPv4Interface.ip

ip The address (IPv4Address) without network information. >>> interface = IPv4Interface('192.0.2.5/24') >>> interface.ip IPv4Address('192.0.2.5')

ipaddress.IPv4Interface

class ipaddress.IPv4Interface(address) Construct an IPv4 interface. The meaning of address is as in the constructor of IPv4Network, except that arbitrary host addresses are always accepted. IPv4Interface is a subclass of IPv4Address, so it inherits all the attributes from that class. In addition, the following attributes are available: ip The address (IPv4Address) without network information. >>> interface = IPv4Interface('192.0.2.5/24') >>> interface.ip IPv4Address('192

ipaddress.IPv4Address.version

version The appropriate version number: 4 for IPv4, 6 for IPv6.