diff --git a/ipcalc.py b/ipcalc.py
index <HASH>..<HASH> 100644
--- a/ipcalc.py
+++ b/ipcalc.py
@@ -351,6 +351,11 @@ class IP(object):
                         self.mask,
                         self.v)
 
+    def __hash__(self):
+        return hash(self.to_tuple())
+
+    hash = __hash__
+
     def __int__(self):
         return int(self.ip)
Make IP and Network hashable so they can be used as keys.