Menu

#32 RIPE integration

open
5
2014-08-28
2011-12-24
Anonymous
No

It would be nice to have integration with RIPE to submit current IP allocations.

Discussion

  • Jernej

    Jernej - 2012-02-15

    and to use netname/inet6num from WHOIS as additional descripton

    • checking and importing netnames from WHOIS for current/new subdelegations
     
  • Alun James

    Alun James - 2013-01-29

    A quick proof of concept..

    I have added some custom fields in phpipam to subnet to match RIPE:
    inetnum
    netname
    admin_c
    status
    etc.

    1. User would enter subnet in phpIPAM as normal (e.g. 212.58.224.0/19)
    2. Click on "get ripe" or similar button (see attached image)
    3. Javascript or other to calc network and broadcast (e.g. 212.58.224.0 - 212.58.255.255)
    4. Get XML from ripe (based on data from step 3. : http://apps.db.ripe.net/whois/lookup/ripe/inetnum/212.58.224.0-212.58.255.255.html.xml
    5. Auto populate fields using XML values

    I would attempt to do this myself, however I am not a developer! ;)

     

    Last edit: Alun James 2013-01-29
  • Miha Petkovsek

    Miha Petkovsek - 2013-01-31

    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?

     
  • Alun James

    Alun James - 2013-01-31

    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
  • Alun James

    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...

     
  • 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

     
  • Miha Petkovsek

    Miha Petkovsek - 2013-02-02

    Hi, implemented in devel release 255, please test it!

    brm

     
  • Miha Petkovsek

    Miha Petkovsek - 2013-02-03

    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
  • Anonymous

    Anonymous - 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.

     
  • Miha Petkovsek

    Miha Petkovsek - 2013-02-03

    Yes, I have to check the IPv6 and how the queries are done against RIPE.

     
  • Alun James

    Alun James - 2013-02-04

    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.

     
  • 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.

     
  • 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?

     
  • Janis

    Janis - 2014-02-24

    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
  • Miha Petkovsek

    Miha Petkovsek - 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";

     
    • Janis

      Janis - 2014-02-27

      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
  • Miha Petkovsek

    Miha Petkovsek - 2014-02-27

    Hi, yes, I have modified the code so the message/error will be caught/shown.

     
  • Miha Petkovsek

    Miha Petkovsek - 2014-02-27

    screen

     
    • Janis

      Janis - 2014-02-28

      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.

       
  • Miha Petkovsek

    Miha Petkovsek - 2014-02-28

    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).

     
  • Janis

    Janis - 2014-03-14

    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

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.