Welcome, Guest. Please login or register.

Author Topic: IP address management  (Read 11686 times)

michieltimmers

  • Newbie
  • *
  • Posts: 35
    • View Profile
IP address management
« on: October 19, 2011, 04:48:40 PM »
Hi,

I was wondering what you all are using for you IP management. How, for example, do you quickly search for a free IP range withing NeDi that you can use? As NeDi doesn't show you the subnetmask or CIDR from a particular network.

I was looking into IPplan ( http://iptrack.sourceforge.net/ ), but I would like to stick to one tool.


rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2509
    • View Profile
    • NeDi
Re: IP address management
« Reply #1 on: October 19, 2011, 08:22:11 PM »
If you put it like that, it shouldn't be too hard to create a report which shows each subnet and the occupied/free addresses. The information is all in the DB. However you can search for an IP like 10.10.10.0/24 with Nodes-List for now, which should at least show what's used in a subnet...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

michieltimmers

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: IP address management
« Reply #2 on: October 19, 2011, 11:59:45 PM »
yes, I now use to search based on a /24, and then I get a bit of a picture of how many ip addresses are used in that specific /24. However, then I need to check where in that /24 is for for example a free /28 that is not used.
Only to see what addresses are grouped in a particular subnet, for example a /28, within the list of the /24 would be enough for me. Then I can quickly see what is free.

To give you an example, if you would search on "10.10.10.0/24" and get somewhat like the following

IPsubnet
10.10.10.110.10.10.0/27
10.10.10.210.10.10.0/27
10.10.10.310.10.10.0/27
10.10.10.1510.10.10.0/27
10.10.10.2210.10.10.0/27
10.10.10.6510.10.10.64/28
10.10.10.6510.10.10.64/28
10.10.10.6510.10.10.64/28
10.10.10.8110.10.10.80/28
10.10.10.8610.10.10.80/28
10.10.10.8810.10.10.80/28

In the above I can more easily see that 10.10.10.32/27 is free for use.
Or what would be even nicer would be to show that a subnet and the following are not "attached". Like so:

IPsubnet
10.10.10.110.10.10.0/27
10.10.10.210.10.10.0/27
10.10.10.310.10.10.0/27
10.10.10.1510.10.10.0/27
10.10.10.2210.10.10.0/27
10.10.10.6510.10.10.64/28
10.10.10.6510.10.10.64/28
10.10.10.6510.10.10.64/28
10.10.10.8110.10.10.80/28
10.10.10.8610.10.10.80/28
10.10.10.8810.10.10.80/28

But that would only be possible if you would sort on the "subnet" column.

Thank you for your quick reply!!

michieltimmers

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: IP address management
« Reply #3 on: October 25, 2011, 09:45:22 AM »
would the subnet column be possible in the next 1.0.7 release?

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2509
    • View Profile
    • NeDi
Re: IP address management
« Reply #4 on: November 18, 2011, 06:26:13 PM »
If I find the time I'll look into an approach. Hopefully the community helps to evolve it...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2509
    • View Profile
    • NeDi
Re: IP address management
« Reply #5 on: January 12, 2012, 11:20:00 PM »
Not quite what you wanted, but maybe this could be an alternative? The beauty is, it could be combined with DNS to find stale entries or other IP mgmt tools...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

ntmark

  • Full Member
  • ***
  • Posts: 134
    • View Profile
    • tvnz.co.nz
Re: IP address management
« Reply #6 on: January 23, 2012, 11:39:16 PM »
That looks kinda cool.
What are the bluey coloured blocks?

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2509
    • View Profile
    • NeDi
Re: IP address management
« Reply #7 on: January 28, 2012, 07:12:52 PM »
Devices are blue, nodes are green. If an IP is found for both it comes up yellow...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

michieltimmers

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: IP address management
« Reply #8 on: February 23, 2012, 05:12:52 PM »
Sorry for the late reply. I think this will work for me.
Is this already in 1.07? or scheduled for 1.08?

michieltimmers

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: IP address management
« Reply #9 on: March 05, 2012, 11:01:25 PM »
can you comment on my question? otherwise i will just wait for 1.08 release.
thanks!

tristanbob

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: IP address management
« Reply #10 on: March 06, 2012, 06:36:44 PM »
I can confirm this is working in 1.0.7.

Reports -> Population Report

There is a TON of output, and the "Network Population" graph is the one that has the graphical output you want.

Cheers and good luck!

Tristan
Please visit "Other"->"Invoices" on your NeDi installation to make an annual contribution and support Nedi!

tristanbob

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: IP address management
« Reply #11 on: March 06, 2012, 08:02:46 PM »
BTW, Remo this is a really cool feature!  Makes it easy to see how full our networks are getting. 

We can do a similar view in Infoblox appliances, but only one network at a time.  This will list our 300 networks and let us scroll through them.

Tristan
Please visit "Other"->"Invoices" on your NeDi installation to make an annual contribution and support Nedi!

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2509
    • View Profile
    • NeDi
Re: IP address management
« Reply #12 on: March 06, 2012, 10:42:44 PM »
Yepp, I think it came out well.

It's also available in Reports-Interfaces under Network-Population. You can easily filter on the IP/Prefix as well...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

harry

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Re: IP address management
« Reply #13 on: March 06, 2012, 11:11:48 PM »
Cool..! I  havent seen that option, just checked. It is wonderfull.
Are there any more features?, which we are not aware off? ;)

richard.lajaunie

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: IP address management
« Reply #14 on: March 14, 2012, 03:11:17 PM »
Hello,
In my compagny we've decide to add a new report to list all network.
Here is the code:
Code: [Select]
<?php
/*
#============================================================================
# Program: Reports-Networks.php
# Programmer: Richard Lajaunie
#
*/

$printable 1;

include_once (
"inc/header.php");
include_once (
"inc/libdev.php");
include_once (
"inc/libdb-rl.php");

$_GET sanitize($_GET);
$sta = isset($_GET['sta']) ? $_GET['sta'] : "";
$stb = isset($_GET['stb']) ? $_GET['stb'] : "";
$ina = isset($_GET['ina']) ? $_GET['ina'] : "";
$inb = isset($_GET['inb']) ? $_GET['inb'] : "";
$opa = isset($_GET['opa']) ? $_GET['opa'] : "";
$opb = isset($_GET['opb']) ? $_GET['opb'] : "";
$cop = isset($_GET['cop']) ? $_GET['cop'] : "";
$ord = isset($_GET['ord']) ? $_GET['ord'] : "";
$col = isset($_GET['col']) ? $_GET['col'] : array('vrfname','network','mask','devices','population');

$cols = array( "vrfname"=>"Vrf",
"network"=>"Network",
"mask"=>$msklbl,
"devices"=>"Devices",
"population"=>$poplbl
);
?>

<h1><?=$netlbl?> <?=$lstlbl?></h1>
<form method="get" name="list" action="<?=$self?>.php">
<table class="content"><tr class="<?=$modgroup[$self]?>1">
<th width="80"><a href="<?=$self?>.php"><img src="img/32/<?=$selfi?>.png"></a></th>
<th valign="top"><?=$cndlbl?> A<p>
<SELECT size="1" name="ina">
<?
       echo "<option value=\"vrfname\"".( ($ina == 'vrfname')?"selected":"").">Vrf\n";
       echo "<option value=\"network\"".( ($ina == 'network')?"selected":"").">Network\n";
?>
</SELECT>
<SELECT size="1" name="opa">
<? selectbox("oper",$opa);?>
</SELECT>
<p>
<input type="text" name="sta" value="<?=$sta?>" size="20">
</th>
<th valign="top"><?=$dislbl?><p>
<SELECT MULTIPLE name="col[]" size=4>
<?
foreach ($cols as $k => $v){
       echo "<option value=\"$k\"".((in_array($k,$col))?"selected":"").">$v\n";
}
?>
</SELECT>
</th>
<th width="80"><input type="submit" value="<?=$sholbl?>"></th>
</tr></table></form><p>
<?
if ($ina){
?>
<table class="content"><tr class="<?=$modgroup[$self]?>2">
<?
foreach($col as $h){
ColHead($h);
}
echo "</tr>\n";

$link = @DbConnect($dbhost,$dbuser,$dbpass,$dbname);
$query = "SELECT group_concat(distinct vrfname) as vrfname,ifip&mask as network, mask as mask,group_concat(distinct concat(device,' (',ifname,')')) as devices FROM networks GROUP BY inet_ntoa(ifip&mask) ".($ord ? "ORDER BY $ord" : '');
$res = @DbQuery($query,$link);
if($res){
$row = 0;
while( ($m = @DbFetchArray($res)) ){
if ($row % 2){$bg = "txta"; $bi = "imga";}else{$bg = "txtb"; $bi = "imgb";}
$row++;
echo "<tr class=\"$bg\">";
if(in_array("vrfname",$col)){echo "<td>{$m['vrfname']}</td>\n";}
if(in_array("network",$col)){echo "<td>".long2ip($m['network'])."</td>";}
if(in_array("mask",$col)){echo "<td>".long2ip($m['mask'])."</td>";}
if(in_array("devices",$col)){echo "<td>{$m['devices']}</td>";}
if(in_array("population",$col)){echo "<td><a href=\"Reports-Interfaces.php?ina=devip&opa=regexp&sta=".long2ip($m['network'])."%2F".substr_count(decbin($m['mask']),'1')."&rep[]=pop&lim=10&do=Show\"><img src=\"img/16/nods.png\"></a></td>";}
echo "</tr>\n";
}
@DbFreeResult($res);
}else{
print @DbError($link);
}
?>
</table>
<table class="content">
<tr class="<?=$modgroup[$self]?>2"><td><?=$row?> <?=$vallbl?><br> (<?=$query?>)</td></tr>
</table>
<?
}
include_once ("inc/footer.php");
?>


 ;)