p4app
p4app copied to clipboard
Set link bandwidth in multiswitch.p4app
Hello, I am pretty new in p4app and mininet environment. I was wondering if there any way to define the bandwidth of each link, alongside the delay in p4app.json file? I tried the following:
"links": [["h1", "s1"], ["s1", "s2", 20, 10], ["s2", "h2"]],
instead of
"links": [["h1", "s1"], ["s1", "s2", 20], ["s2", "h2"]],
in the p4app.json file of the multiswitch.p4app. But looks like it's not working.
Thanks in advance.
I think you should modify the docker/scripts/apptopo.py and rebuild the docker image to enable the configuration about bandwidth. You can see the code in the file:
self.addLink(host_name, sw, delay=delay, addr1=host_mac, addr2=self._host_links[host_name][sw]['sw_mac'])
You can refer to the Python-API of mininet to configure the link bandwidth. The original docker image only supports the configuration of link delay.
Hi Chen, Thanks a lot. I tried the customtopo.p4app, and I can set the bw from there ( info['bw'] = 50)
. But it looks like they have a limit on that [0-1000]. And the unit is in Mbps. Now a days 1000 Mbps link bandwidth doesn't seem very practical. If you know any way to increase this value, that would be really helpful to me.
I am not very familiar with mininet. But from the document, http://mininet.org/overview/, it seems that the bandwidth is limited by the CPU power. I know that ns3 can provide more power for the network simulation, and you can ask the problem from the mail-list of mininet developers.