title: How to get the IP prefix while we have subnet and IPv4 address using python-netaddr?
body: <p>I am using python-netaddr library to work on IP Addresses and subnets. I read the full documentaion of netaddrd given: <a href="http://code.google.com/p/netaddr/wiki/IPTutorial#Representing_IP_Subnets">Netaddr documentation</a>. But didn't found any solution to my problem. I have a IP Address and subnet i want to get prefix for that ip by using both of them. So that i can print all of the ip coming into the subnet.</p>
  
  <p>For example:</p>
  
  <pre><code>Ip Address: 192.0.2.0
  Subnet Network: 255.255.255.0
  
  It should return the prefix which is : 24
  </code></pre>