tim-fiola / network_traffic_modeler_py3 Goto Github PK
View Code? Open in Web Editor NEWpyNTM - This is the network traffic modeler written in python 3: pip3 install pyNTM
License: Apache License 2.0
pyNTM - This is the network traffic modeler written in python 3: pip3 install pyNTM
License: Apache License 2.0
Hello,
Great work on!!!
Would be great to add support for multiDigraph in the model. This is required to simulate parallel links between nodes.
Regards
Pypy interpreter provides performance that is about 62% faster than python3 interpreter. Implement unit testing in pypy to ensure it is compatible and that we can recommend using it
allow things like dashes (-)
I have been exploring PyNTM lately and I love it, it provides great insights into network routing and on top of that it has helped me to improve my Python skills since I am a Java backend engineer by trade.
I see that autoconfiguration of the LSPs reserved bandwidth is supported (currently the LSP definitions need to be provided by the user), so I wonder if the automatic creation of LSPs based on traffic demands (and the network topology, of course, and maybe also some user-defined constraints) is in the PyNTM roadmap (sometimes this feature is called automesh).
As an example, a user would submit the following query to PyNTM:
Commas are easier to track than white space
For large models (# LSPs is large, say 11000), this call below takes a long time to run:
lsp.traffic_on_lsp(model)
I think we can get around this by storing info when we converge the model. I need to look at the source code more, but perhaps adding a _traffic_on_lsp list attribute to the RSVP_LSP when converging the model to store the demands and proportions on the RSVP_LSP so it does not have to be recomputed again.
I'm not sure this is possible, but look into it.
>>> from graph_network import graph_network_interactive
>>> graph_network_interactive.make_interactive_network_graph(model1)
/Users/xxxx/.local/lib/python3.7/site-packages/mpld3/plugins.py:675: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
if isinstance(entry, collections.Iterable):
>>> Encountered exception.
main thread is not in main loop
This may be due to an mpld3 bug described in the link below:
https://github.com/mpld3/mpld3/issues/434
To overcome this bug, run the following command from the CLI to
get the mpld3 patch from github:
python3 -m pip install --user "git+https://github.com/javadba/mpld3@display_fix"
Hi, I run the demo and try to get the visualizations but got this error, seems to be the problem of mpld3 that something is deprecated, I run the suggested line python3 -m pip install --user "git+https://github.com/javadba/mpld3@display_fix"
but did not repair this.
have you encountered this problem and how you solved it? Thanks a lot : )
Look at this for visualization https://dash.plotly.com/cytoscape
Hello Tim,
there seems to miss something at line 503 in file flex_model.py:
Traceback (most recent call last):
File "test_traffic_eng_features.py", line 8, in
from pyNTM import PerformanceModel
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 668, in _load_unlocked
File "", line 638, in _load_backward_compatible
File "/home/martin/simu_v2/lib/python3.7/site-packages/pyNTM-2.0-py3.7.egg/pyNTM/init.py", line 14, in
File "", line 983, in _find_and_load
File "", line 963, in _find_and_load_unlocked
File "", line 906, in _find_spec
File "", line 1280, in find_spec
File "", line 1254, in _get_spec
File "", line 1235, in _legacy_get_spec
File "", line 441, in spec_from_loader
File "", line 594, in spec_from_file_location
File "/home/martin/simu_v2/lib/python3.7/site-packages/pyNTM-2.0-py3.7.egg/pyNTM/flex_model.py", line 503
max_split = max([split for split in traffic_splits_per_interface.values()])
^
IndentationError: expected an indented block
Kind Regards...
Martin
I know this request is a bit groan-inducing... but any interest in modeling L2/STP?
Hello,
Feature request
Add support for IGP shortcuts in the model demand. This will help with networks that have a mix of RSVP-LSP and LDP based traffic where only the core is RSVP and the rest is still LDP( IGP routed). In the current implementation if we have a topology A-B-C , where there is a LSP from A-B but the demand is A-C the model will not put traffic on the LSP but rather use the IGP shortest path between A-C.
Having a LSP flag ( shortcut ) will help in simulating this scenario , where maybe the model will look at the path between A-C , the LSP objects that start at A and have a tailend destination in the A-C path and use that LSP ( A-B) then switch to IGP shortest path once B is reached( ie: B-C will still be igp routed).
Hope this makes sense.
Regards,
Hi,
I am working with a network that some edges are uni-directional but some are bi-directional that also have a sum capacity, For example, if node A and node B is connected with an edge, flow from A to B and from B to A are all possible through this edge, this edge did not have a directional capacity but have a sum capacity, namely the sum of flow from A to B and flow from B to A can not exceed the capacity. could I find a solution to model this in pyNTM?
Thanks a lot!
I tried to find some tutorial about your pyNTM but i can't access training module 2 for now
Hello,
Feature request to add cost to LSP object. This will help with LSP between two host that have different metric( corner case i know).
It will also help with equal cost LSP later in the simulation if there is a need to load balance across LSP.
Regards,
2 weird issues:
Example of item 1:
>>> from pyNTM import FlexModel
>>> from pyNTM import WeatherMap
>>>
>>> model = FlexModel.load_model_file('model_test_topology_multidigraph.csv')
>>>
>>> print("updating simulation manually")
updating simulation manually
>>> model.update_simulation()
Routing the LSPs . . .
Routing 1 LSPs in parallel LSP group F-E; 1/3
Routing 1 LSPs in parallel LSP group A-F; 2/3
Routing 2 LSPs in parallel LSP group A-D; 3/3
LSPs routed (if present) in 0:00:00.001311; routing demands now . . .
Demands routed in 0:00:00.009475; validating model . . .
>>>
>>> vis = WeatherMap(model)
>>>
>>> vis.create_weathermap()
*** NOTE: The make_visualization_beta function is a beta feature. It may not have been as
extensively tested as the pyNTM code in general. The API calls for this may also
change more rapidly than the general pyNTM code base.
Visualization is available at http://127.0.0.1:8050/
Dash is running on http://127.0.0.1:8050/
* Serving Flask app "pyNTM.weathermap" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
/Users/tfi/Documents/python_crap/test_3.0/venv/bin/python3: can't find '__main__' module in '/Users/tfi/Documents/python_crap/test_3.0'
Example of item 2:
(venv) Timothys-Mini:test_3.0 timothyfiola$ python3 -i simple_test.py
updating simulation manually
Routing the LSPs . . .
Routing 1 LSPs in parallel LSP group F-E; 1/3
Routing 1 LSPs in parallel LSP group A-F; 2/3
Routing 2 LSPs in parallel LSP group A-D; 3/3
LSPs routed (if present) in 0:00:00.001266; routing demands now . . .
Demands routed in 0:00:00.009542; validating model . . .
making visualization
*** NOTE: The make_visualization_beta function is a beta feature. It may not have been as
extensively tested as the pyNTM code in general. The API calls for this may also
change more rapidly than the general pyNTM code base.
Visualization is available at http://127.0.0.1:8050/
Dash is running on http://127.0.0.1:8050/
* Serving Flask app "pyNTM.weathermap" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
updating simulation manually
Routing the LSPs . . .
Routing 1 LSPs in parallel LSP group A-F; 1/3
Routing 2 LSPs in parallel LSP group A-D; 2/3
Routing 1 LSPs in parallel LSP group F-E; 3/3
LSPs routed (if present) in 0:00:00.001274; routing demands now . . .
Demands routed in 0:00:00.009616; validating model . . .
making visualization
*** NOTE: The make_visualization_beta function is a beta feature. It may not have been as
extensively tested as the pyNTM code in general. The API calls for this may also
change more rapidly than the general pyNTM code base.
Visualization is available at http://127.0.0.1:8050/
install with recent numpy, causes following error message : AttributeError: module 'numpy' has no attribute 'int'.
np.int
was a deprecated alias for the builtin int
. To avoid this error in existing code, use int
by itself. Doing this will not modify any behavior and is safe. When replacing np.int
, you may wish to use e.g. np.int64
or np.int32
to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
code probably need some update.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.