Skip to content

Latest commit

 

History

History
96 lines (80 loc) · 3.76 KB

gallery.md

File metadata and controls

96 lines (80 loc) · 3.76 KB

IYP Gallery

Querying the IYP database requires to be familiar with:

Below are examples queries that you can copy/paste in Neo4j browser:

  1. Names for AS2497
  2. All nodes related to 8.8.8.0/24
  3. Country code of AS2497 in delegated files
  4. Countries of IXPs where AS2497 is present
  5. Top domain names hosted by AS2497
  6. ASes hosting top domain names in Japan
  7. Topology for AS2501's dependencies

Names for AS2497

Find 'Name' nodes directly connected to the node corresponding to AS2497.

MATCH (a:AS {asn:2497})--(n:Name) RETURN a,n

Names for AS2497

All nodes related to 8.8.8.0/24

Find nodes of any type that are connected to the node corresponding to prefix 8.8.8.0/24.

MATCH (gdns:Prefix {prefix:'8.8.8.0/24'})--(neighbor)
RETURN gdns, neighbor

All nodes related to 8.8.8.0/24

Country code of AS2497 in delegated files

Here we search for a country node directly connected to AS2497's node and that comes from NRO's delegated stats.

MATCH (iij:AS {asn:2497})-[{reference_name:'nro.delegated_stats'}]-(cc:Country)
RETURN iij, cc

Country code of AS2497 in delegated files

Countries of IXPs where AS2497 is present

Starting from the node corresponding to AS2497, find IXPs where AS2497 is member of, and then the country corresponding to each IXP.

MATCH (iij:AS {asn:2497})-[:MEMBER_OF]-(ix:IXP)--(cc:Country)
RETURN iij, ix, cc

Countries of IXPs where AS2497 is present

Top domain names hosted by AS2497

Select domain names in top 50k rankings that resolves to an IP originated by AS2497.

MATCH (:Ranking)-[r:RANK]-(dn:DomainName)--(ip:IP)--(pfx:Prefix)-[:ORIGINATE]-(iij:AS {asn:2497})
WHERE r.rank < 50000
RETURN dn, ip, pfx, iij

Top domain names hosted by AS2497

ASes hosting top domain names in Japan

From the top 10k domain names select domain names that ends with '.jp', the corresponding IP, prefix, and ASN.

MATCH (:Ranking)-[r:RANK]-(dn:DomainName)--(ip:IP)--(pfx:Prefix)-[:ORIGINATE]-(net:AS)
WHERE dn.name ENDS WITH '.jp' AND r.rank<10000
RETURN dn, ip, pfx, net

ASes hosting top domain names in Japan

Topology for top ASes in Iran

Select IHR's top 20 ASes in Iran and show how they are connected to each other using AS relationships.

MATCH (a:AS)-[ra:RANK]->(:Ranking {name: 'IHR country ranking: Total AS (IR)'})<-[rb:RANK]-(b:AS)-[p:PEERS_WITH]-(a)
WHERE ra.rank < 20 AND rb.rank < 20 AND p.rel = 0
RETURN a, p, b

Top ASes connecting Iran

Topology for AS2501's dependencies

Select AS dependencies for AS2501 and find the shortest PEERS_WITH relationship to these ASes.

MATCH (a:AS {asn:2501})-[h:DEPENDS_ON {af:4}]->(d:AS)
WITH a, COLLECT(DISTINCT d) AS dependencies
UNWIND dependencies as d
MATCH p = allShortestPaths((a)-[:PEERS_WITH*]-(d))
WHERE a.asn <> d.asn AND all(r IN relationships(p) WHERE r.af = 4) AND all(n IN nodes(p) WHERE n IN dependencies)
RETURN p

Dependencies for AS2501