[PDB-tech] ix subnet validation
Hey all, In the oldschool mgmtPublicsIPs table, there was an address field containing the subnet/mask of the IX- e.g. (scriptro_ssl@cdb.intern.netdb)> select * from mgmtPublicsIPs where public_id=1; +-----+-----------+--------------+-------------------+ | id | public_id | type | address | +-----+-----------+--------------+-------------------+ | 168 | 1 | IPv6 Unicast | 2001:504:0:2::/64 | | 425 | 1 | IPv4 Unicast | 206.126.236.0/22 | +-----+-----------+--------------+-------------------+ This was kind of a pain-in-the-butt to get people to maintain, but was nice to have to validate peer subnet IP addresses were appropriate for the fabric. It doesn't look like that was ported over to the beta api/ix Am I missing it somewhere else, or was it decided to leave it out? Thanks in advance! -Callahan
On Wed, Aug 26, 2015 at 5:54 PM, Callahan Warlick <callahanwarlick@gmail.com> wrote:
In the oldschool mgmtPublicsIPs table, there was an address field containing the subnet/mask of the IX- e.g.
[snip]
Am I missing it somewhere else, or was it decided to leave it out?
Cal, It's in ixlan. e.g.: $ curl https://beta.peeringdb.com/api/ix/26 2> /dev/null | jq '.data[] | (.name), (.ixlan_set[] | .id)' "AMS-IX" 23 $ curl https://beta.peeringdb.com/api/ixlan/23 2> /dev/null | jq '.data[] | .prefix_set[] | .prefix' "2001:7f8:1::/64" "80.249.208.0/21" Regards, -- dsp
FYI, alternatively it's also possible to query ixlan with the ix_id. $ curl ' https://beta.peeringdb.com/api/ixlan?ix_id=26&depth=1&fields=prefix_set' { "meta": {}, "data": [ { "prefix_set": [ { "protocol": "IPv6", "prefix": "2001:7f8:1::/64" }, { "protocol": "IPv4", "prefix": "80.249.208.0/21" } ] } ] I've only recently learned about the 'depth' and the 'fields' arguments. It would be nice to see some (extra) examples in the documentation / API Specs. -Jeroen- On Mon, Sep 14, 2015 at 5:42 AM, Doug Porter <dsp@dsp.name> wrote:
On Wed, Aug 26, 2015 at 5:54 PM, Callahan Warlick <callahanwarlick@gmail.com> wrote:
In the oldschool mgmtPublicsIPs table, there was an address field containing the subnet/mask of the IX- e.g.
[snip]
Am I missing it somewhere else, or was it decided to leave it out?
Cal,
It's in ixlan. e.g.:
$ curl https://beta.peeringdb.com/api/ix/26 2> /dev/null | jq '.data[] | (.name), (.ixlan_set[] | .id)' "AMS-IX" 23 $ curl https://beta.peeringdb.com/api/ixlan/23 2> /dev/null | jq '.data[] | .prefix_set[] | .prefix' "2001:7f8:1::/64" "80.249.208.0/21"
Regards, -- dsp _______________________________________________ Pdb-tech mailing list Pdb-tech@lists.peeringdb.com http://lists.peeringdb.com/cgi-bin/mailman/listinfo/pdb-tech
* Jeroen Valcke <jvalcke@opendns.com> [150914 13:43 +0200]:
I've only recently learned about the 'depth' and the 'fields' arguments. It would be nice to see some (extra) examples in the documentation / API Specs. You're right, we need to get the docs caught up with the new features. Thanks for the reminder :)
participants (4)
-
Callahan Warlick -
Doug Porter -
Jeroen Valcke -
Matt Griswold