Project

General

Profile

Actions

Enhancement #1200

open

Search for IP addresses included in a subnet

Added by Jonathan CLARKE almost 13 years ago. Updated about 2 years ago.

Status:
New
Priority:
N/A
Assignee:
-
Category:
Web - Nodes & inventories
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

Description

We must be able to clearly match nodes that have an IP in a given subnet, eg 192.168.0.0/24


Related issues 1 (0 open1 closed)

Has duplicate Rudder - User story #4417: Allow node search on IP rangeRejectedActions
Actions #1

Updated by Jonathan CLARKE almost 13 years ago

  • Target version changed from 9 to 10
Actions #2

Updated by Nicolas CHARLES over 12 years ago

First version : an IP with /8, /16, /24 or /32

Actions #3

Updated by François ARMAND over 12 years ago

  • Target version changed from 10 to 18

Set in 2.4, perhaps it will be needed soon.

Actions #4

Updated by François ARMAND over 12 years ago

  • Target version changed from 18 to 24
Actions #5

Updated by Jonathan CLARKE about 12 years ago

  • Category set to Web - Nodes & inventories
Actions #6

Updated by Jonathan CLARKE over 11 years ago

  • Target version changed from 24 to 18
Actions #7

Updated by Jonathan CLARKE over 11 years ago

  • Target version changed from 18 to Ideas (not version specific)
Actions #8

Updated by Florian Heigl about 9 years ago

Hi,

I just ran into this.
Currently you need to make heavy abuse of regex matches to implement subnet calculations.

It is feasible for dealing with small numbers of networks but i.e. when considering doing this for 1000 or 10000 subnets it gets really awkward and it's very hard to automatically generate.

Now, to make it worse:
We've just established it's possible to add them using regex. But honestly: It's pretty impossible to maintain and thus it should really be a builtin comparism.

Please keep in mind ipv6 on this one since it'll be even more needed. I don't think we want to assign a million+ ip range for any single dmz network...

Actions #9

Updated by Florian Heigl about 9 years ago

[duplicated with other comments]

Actions #10

Updated by Florian Heigl about 9 years ago

[duplicated]

Actions #11

Updated by Florian Heigl about 9 years ago

Regex trick

Example for Regex usage

Mapping a subnet to regex


Subnet: 192.168.10.0/25  
Regex: 192.168.10.([0-9]{3} | 1[01][0-9] | 12[0-6])

Make sure you don't forget the mask when naming your group, i.e.
NET-192_168_10_P25

(P for Prefix)

Actions #12

Updated by François ARMAND about 9 years ago

The correct regex is:

192\.168\.10\.([0-9]{1,2}|1[01][0-9]|12[0-6])

It will matches IPs 192.168.10.{0-126}

You can build any integer matching with the above decomposition trick ( [0-9] or [0-9][0-9] or 11[0-9] etc). It's "just" über fastidious.

You can check the regex with http://www.regexplanet.com/advanced/java/index.html for example.

Actions #13

Updated by Benoît PECCATTE about 7 years ago

Actions #14

Updated by François ARMAND about 2 years ago

  • Tracker changed from User story to Enhancement
Actions

Also available in: Atom PDF