Introduction to Pythons "ipaddress" module using jupyter notebook. need help with steps 1-14, 1-5
Gather information from the IPv4 Interface object Using the interface object just created (intf) ... Within this notebook, I'll like to continue with the IPV4Interface class. This class provides the ability to create the IPV4Address or IPV4Network object if required, as shown above Get different representations of the IPV4 interface intf, address and network 1. Print the version value 2. Print the interface with_netmask value 3. Print the interface with_prefixlen value 4. Print the interface network.with_netmask value 5. Print the interface with_hostmask value In [4]: M # INSERT CODE FOR STEPS 1 - 5 Get information about the IPv4 interface intf, address and network 6. Print the interface network.is_private value 7. Print the interface network.is_reserved value 8. Print the interface network.is_global value 9. Print the interface ip.is_multicast value Add a print() to generate a blank line 10. Print the interface network.broadcast_address value 11. Print the interface network.network_address value 12. Print the interface network.num_addresses value In [5]: M # INSERT CODE FOR STEPS 6 - 12 In [6]: M # CODE PROVIDED - RUN TO SEE LIST OF HOSTS list (IPV4Network( "10.1.1.0/29") .hosts () ) Out [6]: [IPV4Address ( '10.1.1.1' ), IPV4Address ( ' 10.1.1.2' ) , IPV4Address ( ' 10.1.1.3' ) , IPV4Address ( ' 10.1.1.4' ), IPV4Address ( ' 10.1.1.5') , IPV4Address ( '10.1.1.6') ] Write code that lists the host ipaddresses using iteration - the addresses listed should match the previous list 13. Use a for-loop to interface over IPv4Network("10.1.1.0/29").hosts() 14. Print each address value In [7]: # INSERT CODE FOR STEPS 14 - 15Check if an IPv4 address is part of a network Do some checking and comparisons using IP addresses (hosts & network) 1. Create an IPV4 ip_address named my_host using a string value "192. 168.1.23" 2. Create an IPV4 ip_network named my_netwk using a string value "192.168. 1.0/24" 3. Use the in operator to check to see if my_host is contained in my_netwk (Print the results of this test) 4. Create an IPV4 ip_network named your_netwk using a string value "192.168.2.0/24" 5. Use the in operator to check to see if my_host is contained in your_netwk (Print the results of this test) In [8]: M # INSERT CODE FOR STEPS 1 - 5