I have added a number of custom fields to my subnets to replicate the RIPE DB info. It would be great if we could poll this info from the DB and even better update the RIPE DB directly from inside phpipam or a least output text in the correct format for quickly pasting into RIPE.
I would assume this is easy enough, given that RIPE inetnum queries will return XML/JSON.
Hi, well I managed to parse xml response from RIPE. I will do it like this:
- new button to query RIPE DB
- if there will be some response it will automatically populate description
- if there will be custom subnet field with same name (e.g. admin_c) it will auto-populate this also.
This would be excellent, we could then decide which of the RIPE fields we
require simply by adding the identically named custom fields.
Note: In your example you mentioned admin_c - In RIPE the fields is
"admin-c", however phpipam will not let me name a fields with a "-" so I
have used a "_" instead.
Regards,
Alun.
Last edit: Alun James 2013-01-31
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2013-02-02
Hi James,
description is ok, will combine multiple fields to one if they are present.
Bigger problem is admin-s > html standard does not allow some characters to be present in form name, - is amongst them. I will replace all - to _ in ripe result, then it should be fine.
brm
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Now to master export of RIPE data back into RIPEDB, by providing a RIPE maintainer password ;) Haha, I ask too much.
Thanks for your efforts thus far.
Regards,
Alun.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2013-11-04
I support the idea of Alun James. Export to RIPE database would be a very useful feature and it would differentiate phpipam from other free and open source IPAM tools because as far as I know, none of those support export to RIPE database.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2014-02-24
I'm getting "Loading..." when I try to get info from RIPE.
is there a software that is a must on the server?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry, was not logged in, is there something I can do about "Loading..." when trying to get info from RIPE?
is there a software needed on the linux server?
looked at logs:
but they seem to be for objects that are missing in RIPE db.
PHP Warning: simplexml_load_file(http://apps.db.ripe.net/whois/lookup/ripe/inetnum/mysubnetz.xml): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found\r\n in /var/www/web33/web/ipam/site/admin/manageSubnetEditRipeQuery.php on line 25, referer: http://ufopron/ipam/subnets/5/181/
PHP Warning: simplexml_load_file(): I/O warning : failed to load external entity "http://apps.db.ripe.net/whois/lookup/ripe/inetnum/mysubnetz.xml" in /var/www/web33/web/ipam/site/admin/manageSubnetEditRipeQuery.php on line 25, referer: http://ufopron/ipam/subnets/5/181/
PHP Fatal error: Call to a member function children() on a non-object in /var/www/web33/web/ipam/site/admin/manageSubnetEditRipeQuery.php on line 27, referer: http://ufopron/ipam/subnets/5/181/
subnet was a /24.
I"ll try to google
Last edit: Janis 2014-02-24
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, what are you putting to query? It seems like you are entering 'mysubnetz' ?
$url = "http://apps.db.ripe.net/whois/lookup/ripe/inetnum/$_REQUEST[subnet].xml";
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
nop, sry. I've replaced the IP range with 'mysubnetz', didn't want to show it, but if you insist, the logs subnet query look like this in error log
"http://apps.db.ripe.net/whois/lookup/ripe/inetnum/94.101.239.0/24.xml"
error in the logs is from ripe blocks that are not created in ripe db.
but when I try the refresh button (get information from RIPE) adding/editing the subnet (which are in RIPE and I'd like to get the information), it blinks a "Loading..." and no info is retrieved (or I don't know where to look for it).
we find your app really handy and would love to migrate away from spreadsheets. :D
the only thing in logs are these errors
Last edit: Janis 2014-02-27
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
maybe you could also explain how can we retrieve info from the inet-nums already in the ripe database? (I was not able to figure this out.)
The refresh button pops up a "loading ..." but I can't seem to find where the info is saved or what fields are populated with data from RIPE db.
Sorry for the trouble.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This was a bit unclear in 0.9, will be better in next version. Please take a look add attachment - you have to create custom IP fields with same name as hit returns (for example inetnum).
and to use netname/inet6num from WHOIS as additional descripton
I second this!
I have added a number of custom fields to my subnets to replicate the RIPE DB info. It would be great if we could poll this info from the DB and even better update the RIPE DB directly from inside phpipam or a least output text in the correct format for quickly pasting into RIPE.
I would assume this is easy enough, given that RIPE inetnum queries will return XML/JSON.
https://apps.db.ripe.net/whois/lookup/ripe/inetnum/46.61.155.0-46.61.155.255.html
http://apps.db.ripe.net/whois/lookup/ripe/inetnum/46.61.155.0-46.61.155.255.html.xml
http://apps.db.ripe.net/whois/lookup/ripe/inetnum/46.61.155.0-46.61.155.255.html.json
Cheers,
Al.
Last edit: Alun James 2013-01-17
A quick proof of concept..
I have added some custom fields in phpipam to subnet to match RIPE:
inetnum
netname
admin_c
status
etc.
I would attempt to do this myself, however I am not a developer! ;)
Last edit: Alun James 2013-01-29
Hi, well I managed to parse xml response from RIPE. I will do it like this:
- new button to query RIPE DB
- if there will be some response it will automatically populate description
- if there will be custom subnet field with same name (e.g. admin_c) it will auto-populate this also.
I believe this should be ok?
This would be excellent, we could then decide which of the RIPE fields we
require simply by adding the identically named custom fields.
Note: In your example you mentioned admin_c - In RIPE the fields is
"admin-c", however phpipam will not let me name a fields with a "-" so I
have used a "_" instead.
Regards,
Alun.
Last edit: Alun James 2013-01-31
One problem with the description fields: In RIPE it is possible to have multiple [DESCR] fields:
[DESCR] Line1...
[DESCR] Line2...
[DESCR] Line3...
Hi James,
description is ok, will combine multiple fields to one if they are present.
Bigger problem is admin-s > html standard does not allow some characters to be present in form name, - is amongst them. I will replace all - to _ in ripe result, then it should be fine.
brm
Hi, implemented in devel release 255, please test it!
brm
Some bugfixes for it in r256. Changed custom field size to 1024 characters and added newline separator fur multiple fields with same name.
Maybe it would make sense to name RIPE fields like this:
RIPE-inetnum
instead of
inetnum
This would give better control of which fields are to be updated?
This is the final look:
Last edit: Miha Petkovsek 2013-02-03
Wow that was quick! I have tested and it is working perfectly for me in ipv4 section. Thanks.
In ipv6 sections, the RIPE import button appears, but when clicked it just states "Loading..". Perhaps this is unsuitable for ipv6.
Cheers,
Alun.
Yes, I have to check the IPv6 and how the queries are done against RIPE.
done, rev 257.
http://apps.db.ripe.net/whois/lookup/ripe/inet6num/2102:840::/32.xml
Perfect!
Now to master export of RIPE data back into RIPEDB, by providing a RIPE maintainer password ;) Haha, I ask too much.
Thanks for your efforts thus far.
Regards,
Alun.
I support the idea of Alun James. Export to RIPE database would be a very useful feature and it would differentiate phpipam from other free and open source IPAM tools because as far as I know, none of those support export to RIPE database.
I'm getting "Loading..." when I try to get info from RIPE.
is there a software that is a must on the server?
Sorry, was not logged in, is there something I can do about "Loading..." when trying to get info from RIPE?
is there a software needed on the linux server?
looked at logs:
but they seem to be for objects that are missing in RIPE db.
subnet was a /24.
I"ll try to google
Last edit: Janis 2014-02-24
Hi, what are you putting to query? It seems like you are entering 'mysubnetz' ?
$url = "http://apps.db.ripe.net/whois/lookup/ripe/inetnum/$_REQUEST[subnet].xml";
nop, sry. I've replaced the IP range with 'mysubnetz', didn't want to show it, but if you insist, the logs subnet query look like this in error log
"http://apps.db.ripe.net/whois/lookup/ripe/inetnum/94.101.239.0/24.xml"
error in the logs is from ripe blocks that are not created in ripe db.
but when I try the refresh button (get information from RIPE) adding/editing the subnet (which are in RIPE and I'd like to get the information), it blinks a "Loading..." and no info is retrieved (or I don't know where to look for it).
we find your app really handy and would love to migrate away from spreadsheets. :D
the only thing in logs are these errors
Last edit: Janis 2014-02-27
Hi, yes, I have modified the code so the message/error will be caught/shown.
screen
Thank you, Miha.
That will help.
maybe you could also explain how can we retrieve info from the inet-nums already in the ripe database? (I was not able to figure this out.)
The refresh button pops up a "loading ..." but I can't seem to find where the info is saved or what fields are populated with data from RIPE db.
Sorry for the trouble.
This was a bit unclear in 0.9, will be better in next version. Please take a look add attachment - you have to create custom IP fields with same name as hit returns (for example inetnum).
great, thank you fort he reply.
I'll try it out.
Thanks again.
edit, I tried, but still missing the fields, I tried different field "types", fields don't get populated from RIPE data.
Last edit: Janis 2014-03-14