title: store ip ranges in Redis
body: <p>I have a lot of IP ranges of different providers. For example</p>
  
  <pre><code>P1: 192.168.1.10 - 192.168.1.50, 192.168.2.16 - 192.168.2.49,
  P2: 17.36.15.34 - 17.36.15.255,
  P3: ...
  </code></pre>
  
  <p>I convert this IP to int32:</p>
  
  <pre><code>P1: 3232235786 - 3232235826, 3232236048 - 3232236081, etc
  </code></pre>
  
  <p>My task: <strong>to find provider name by user IP address (for example 192.168.2.20 (3232236052))</strong></p>
  
  <p>In MySQL it's simple:</p>
  
  <pre><code>select name from ip_ranges where l_ip &lt;= user_ip and user_ip &lt;= r_ip
  </code></pre>
  
  <p>How to do the same with Redis?</p>