Lines Matching refs:network
19 to network engineers wanting an overview of how :mod:`ipaddress`
20 represents IP network addressing concepts.
85 :mod:`ipaddress` provides a way to create, inspect and manipulate network
86 definitions. IP network objects are constructed from strings that define the
87 range of host addresses that are part of that network. The simplest form
88 for that information is a "network address/network prefix" pair, where the
90 whether or not an address is part of the network and the network address
102 is that ``192.0.2.1/24`` does not describe a network. Such definitions are
103 referred to as interface objects since the ip-on-a-network notation is
104 commonly used to describe network interfaces of a computer on a given network
107 By default, attempting to create a network object with host bits set will
121 network is considered to contain only the single address identified by the
122 integer, so the network prefix includes the entire network address::
129 As with addresses, creation of a particular kind of network can be forced
138 network, neither the address nor the network classes are sufficient.
139 Notation like ``192.0.2.1/24`` is commonly used by network engineers and the
141 ``192.0.2.1`` on the network ``192.0.2.0/24``", Accordingly, :mod:`ipaddress`
143 network. The interface for creation is identical to that for defining network
144 objects, except that the address portion isn't constrained to being a network
172 Obtaining the network from an interface::
175 >>> host4.network
178 >>> host6.network
181 Finding out how many individual addresses are in a network::
190 Iterating through the "usable" addresses on a network::
205 Obtaining the netmask (i.e. set bits corresponding to the network prefix) or
253 It also means that network objects lend themselves to using the list
256 if address in network:
259 Containment testing is done efficiently based on the network prefix::
298 When creating address/network/interface objects using the version-agnostic
326 ValueError: '192.168.0.1/64' does not appear to be an IPv4 or IPv6 network
337 network = ipaddress.IPv4Network(address)