Modeling SDN network Topology as a Graph in Neo4j

I developed a Python script to model a SDN (Software Defined Network) topology as a graph in Neo4j. In addition, the Python script can retrieve traffic statistics from the SDN controller to be stored as node &/or relationship properties.

I want to take benefits from this modelling process; I tried to execute shortest path algorithms. Varying the network size has some difficulties. I tried to generate random graphs but it seems not a very good idea.

Do you have suggestions on how to benefit from the different capabilities of Neo4j such as the available GDS algorithms? Any suggestions will be a great help for me. Many thanks in advance.

Hi @samasamaan !

You should consider all the APOC path suite. You should be able to do almost everything with those and right modeling. Worst case scenario, you may need to extend it (the library), Some Java and it's done :slight_smile:


1 Like

The basic model is representing the physical and logical and runtime network models.
Also depends which layers of the ISO-OSI model you're representing.

  • physcial -> routers/machines/switches with addresses and ports -> that are linked up
  • topological -> what applications / services are running on those
  • runtime -> connections, sessions, aggregated packet information (start, end, count, size)

relationship information like

  • latency
  • total number of packets
  • data volume
  • timespans
  • utilization

will then help you to project to weights for shortest path routing or more advanced routing.

1 Like

Thanks for your help. The problem is how to evaluate the effectiveness of Neo4j in big networks (1000+ nodes) when executing shortest path algorithm(s), which I want to use as a case study to show the power of Neo4j as a graph database. I need to generate or import such a BIG topology. The Graph Generator doesn't produce a controllable graph. I tried it but it doesn't work well when executing shortest path algorithms.
What about importing a CSV or JSON network topology into Neo4j? do you know a source of such BIG topology to be imported into Neo4j? It should be comparable to SDN data plane where network devices (switches and hosts) reside.
Need help please.

Thanks for you reply. Is expanding paths is similar to shortest path algorithm? I need to take weight in consideration since I compute the cost metric based on the retrieved traffic statistics.
Are there any Cyphers that can be used in such subject (traffic analysis) ? such as ranking switches based on traffic load.