intrig-unicamp / mininet-wifi

Emulator for Software-Defined Wireless Networks
https://mn-wifi.readthedocs.io/
Other
459 stars 245 forks source link

Can I set bw parameter for link in adhoc mode? #544

Closed raysuan closed 5 months ago

raysuan commented 5 months ago

Hello Ramon.

I want to know is it possible to set the bandwidth limitation for the link when in adhoc mode. net.addLink(sta4, cls=adhoc, intf='sta4-wlan0', bw = 10) net.addLink(sta5, cls=adhoc, intf='sta5-wlan0', bw = 10) I try to use this code set bandwidth, but the result from iperf test is still 35Mbits/sec

`Server listening on TCP port 5001 TCP window size: 85.3 KByte (default)

[ 1] local 10.0.0.2 port 5001 connected with 10.0.0.1 port 34802 [ ID] Interval Transfer Bandwidth [ 1] 0.0000-1.0000 sec 3.34 MBytes 28.0 Mbits/sec [ 1] 1.0000-2.0000 sec 4.24 MBytes 35.6 Mbits/sec [ 1] 2.0000-3.0000 sec 4.24 MBytes 35.5 Mbits/sec [ 1] 3.0000-4.0000 sec 4.24 MBytes 35.5 Mbits/sec [ 1] 4.0000-5.0000 sec 4.25 MBytes 35.7 Mbits/sec [ 1] 5.0000-6.0000 sec 4.24 MBytes 35.6 Mbits/sec [ 1] 6.0000-7.0000 sec 4.24 MBytes 35.6 Mbits/sec [ 1] 7.0000-8.0000 sec 4.20 MBytes 35.3 Mbits/sec [ 1] 8.0000-9.0000 sec 4.24 MBytes 35.6 Mbits/sec [ 1] 9.0000-10.0000 sec 4.30 MBytes 36.1 Mbits/sec [ 1] 0.0000-10.1114 sec 42.0 MBytes 34.8 Mbits/sec ` Looking forward to hearing from you.

ramonfontes commented 5 months ago

The adhoc link is managed by wmediumd. If you want to set the bandwidth you have to use tc + ifb, manually.