IP Ranges gem

I just published a gem to help manage ranges of IP numbers.

It allows you to take lots of arbitrary IP data like this;

  • 1.2.3.4
  • 1.2.1.254..1.3.4.4
  • 1.2.0.0/16

…and find out which ranges include or overlap with others. In this case, it provides output like this;

1.2.3.4 is contained by range 1.2.1.254..1.3.4.4
1.2.3.4 is contained by range 1.2.0.0/16
1.2.1.254..1.3.4.4 overlaps with 1.2.0.0/16

Here’s the source.

Advertisements

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: