how to send data to multiple destinations in Mininet? - multicast

I want to test my multicast routing algorithm implemented in the SDN controller. I'm generating my test network topology using Mininet emulator.
According to my knowledge, there's no feature in Mininet which allows me to send packets from one sender to multiple destination (multicast). I've already tried to find the answer to that question in network, but i cannot find any.
So, how can i do that?

You could use Group Table that's supported by OpenFlow v1.3. Then you can do multicast by having a group table with multiple buckets and each bucket outputs to a designed port.
Update: Ryu igmp controller written in Python: https://github.com/osrg/ryu/blob/master/ryu/app/simple_switch_igmp.py

Related

How can I access the link bandwidth, delay from a mininet topology?

I am using the Ryu Controller to send the packets from source to destination. I want to check the delay and bandwidth of the links created. How can I access these parameters?
You can:
Either configure this in the topology when you are setting it up
Use Ping/Iperf to figure out what the delay/bw is respectively
Check the configured interface's parameters using TC to get access to this.

Send data over network to multiple recipient parallely

Hellow, i'm working with network programing and it's been so hard to create a logic that allows to stream a video from a single server to multiple clients with no delay.
which means that i have to implement a parallel execution during the stream to all connected clients in order to display the images at the same time.
and why is that important for my project it's because i'm intending to have large number of clients (from 200 to approximately 700), now with 10 clients that delay is nothing but with 700 clients could significantly increase the delay to several minutes (not sure but possible).
for those who don't know what's the cause of the dely, it's from the for loop that i'm using which contain the send function for each frame, and that is a serial execution.
i tried threading and multiprocessing and even function schedule but every thing got messy, previously i was using socket & opencv, but for some reason it caused issues during the streaming, now i switched to Netgear & Vidgear but i'm still struggling.
Hope someone can help.
PS: multicast is just not right for the job, after i tried it i was receiving errors because of the length of the transmitted images, UDP protocol will NOT accept more then 65535 byte.
Per your comment, everything is in the same network, and we have multicast for exactly your problem. Rather than sending the same data over and over to multiple hosts, you can send a single stream of traffic to many receivers.
You set up the clients to subscribe to a multicast group, normally a group in the 239.0.0.0/8 Organization-Local scope. Your server then sends its traffic to the same multicast group to which the clients have subscribed. The single traffic stream will be received and processed by every client subscribed to the multicast group.
Because multicast sends to multiple clients, you must use a connectionless transport protocol, e.g. UDP. Connection-oriented transport protocols, e.g. TCP, create connections between two hosts, so they cannot be used with multicast, which is one-to-many.
By default, multicast only works in the same network. We do have multicast routing to send traffic to other networks, but it is very different than the usual unicast routing. Also, you cannot multicast on the public Internet because the ISPs do not have multicast routing. You can multicast to a different site across the Internet by using a tunnel that supports multicast, e.g. GRE. Both the source and destination routers need to be configured for multicast routing, as well as any routers in the path of the multicast packets (the Internet routers on see the unicast tunnel packets, not the multicast packets, so you can send the multicast across the Internet).
Hellow, i'm working with network programing and it's been so hard to create a logic that allows to stream a video from a single server to multiple clients with no delay.
Hey #zaki-lazhari I'm the creator of VidGear Video Processing Python Project. Actually, NetGear is not right API choice for multi-casting task, instead you should be using WebGear API. WebGear can acts as powerful Video Streaming Server that transfers live video-frames to any web browser on a network. So you can easily setup WebGear Server in few lines of code as follows:
# import required libraries
import uvicorn
from vidgear.gears.asyncio import WebGear
#various performance tweaks
options={"frame_size_reduction": 40, "frame_jpeg_quality": 80, "frame_jpeg_optimize": True, "frame_jpeg_progressive": False}
#initialize WebGear app
web=WebGear(source="foo.mp4", logging=True, **options)
#run this app on Uvicorn server at address http://0.0.0.0:8000/
uvicorn.run(web(), host='0.0.0.0', port=8000)
#close app safely
web.shutdown()
So every device (even a smartphone with any browser installed) on the same network can access real-time frames on there browser without any extra dependencies. More code samples can be found here: https://abhitronix.github.io/vidgear/gears/webgear/advanced/
Hope it helps. Good luck!

Is it possible to check list of multicasts groups when there're no joined users?

I can get a list of joined multicasts using netstat -g, but is it possible to get list of available (not joined) multicasts. Does Linux kernel keep track of incoming group specific IGMP/MLD queries?
Is it possible to check list of multicasts groups when there're no joined users?
In group is empty e.g. in your network no subscribers - no multicast traffic also.
but is it possible to get list of available (not joined) multicasts.
Same, no recipients no traffic
Does Linux kernel keep track of incoming group specific IGMP/MLD queries?
A specific kernel that has IGMP Snooping enabled or another IGMP feature.
Take a look at smcroute, mrouted for multicast traffic routing some of these services might have logging feature, so you will be able to track multicast traffic.

Adding a multicast route to the linux multicast routing table

I want to add an IPv4 multicast route say 225.0.0.9 to the multicast routing table of Linux. Is it possible to do so using any C program code? Any existing application this performs this task would also work.
I've found numerous posts that add a multicast route to the unicast routing table using command route add 225.0.0.9 dev eth0 but this is not what I really want.
Please provide any directions or clarifications for the same.
The hard way to manipulate route and mroute table is by using the rtnetlink API. This is not something I recommend if you only need this single function, since that API can be tricky if you are inexperienced with playing with pointers and structs wrapped into each-other.
The easier way is to just fork out a helper process and execute ip commands, since ip implements all of the features you need via command-line.

EsperIOSocketAdapter binding to specific network adapter

I'm new to Esper and am interested in using it to send event data via a network so consequently interested in the EsperIOSocketAdapter
It appears that SocketAdapter can only bind to a specific port which is fine if there is only one network adapter but is it possible to configure the SocketAdapter to bind to a specific network adapter too by specifying its IP address?
Please create a Esper JIRA if you need this feature.
You could also use the Esper API directly and use your own Java socket transport.

Resources