Open nachtmaar opened 8 years ago
It's not clear what your server and client are, but in any case, you should know that there is a newer version of wmediumd here: https://github.com/bcopeland/wmediumd that might be worth a try.
Its the raw socket appliaction.
Thanks, I will give it a try :)
Right, I forgot that was a thing :) I removed that application from my fork, but there are some examples in the tests/ directory in my version that might help you get started with normal wireless utilities.
I followed your "example session".
The join commands failed for me:
sudo iw dev wlan1 mesh join meshabc
I get the performance measurements with iperf done, but your fork also does not apply link loss with the appended config.
Any ideas?
I think you forgot to attach the config?
For the mesh parts, you will need to have mesh support compiled into your kernel -- I'm guessing that is the problem. You can use an AP and STA or two IBSS stations though.
Here is the config file:
#
# wmediumd sample config file
#
ifaces :
{
count = 2;
ids = [ "42:00:00:00:00:00", "42:00:00:00:01:00" ];
};
#
# probability matrices are defined in a rowcentric way
# probability matrices are ordered from slower to fastest, check wmediumd documentation for more info
#
prob :
{
rates = 12;
matrix_list = (
[ -1.0, 1.0, 1.0, -1.0 ],
[ -1.0, 1.0, 1.0, -1.0 ],
[ -1.0, 1.0, 1.0, -1.0 ],
[ -1.0, 1.0, 1.0, -1.0 ],
[ -1.0, 1.0, 1.0, -1.0 ],
[ -1.0, 1.0, 1.0, -1.0 ],
[ -1.0, 1.0, 1.0, -1.0 ],
[ -1.0, 1.0, 1.0, -1.0 ],
[ -1.0, 1.0, 1.0, -1.0 ],
[ -1.0, 1.0, 1.0, -1.0 ],
[ -1.0, 1.0, 1.0, -1.0 ],
[ -1.0, 1.0, 1.0, -1.0 ] );
};
Hope you can help me.
Ah, OK, I see. In my fork I have removed the explicit probability matrix and instead set the per-rate probabilities based on a single signal level value.
By default, if unspecified, the "link" between two stations has a signal level of 30 dB and therefore no loss.
You can specify the signal level on a (symmetric) link as in the example below, which has 4 nodes. The first and last node have no connectivity (signal = 0) while the link between the first and second node has a 10 dB level (some loss), and so on.
ifaces :
{
ids = [
"02:00:00:00:00:00",
"02:00:00:00:01:00",
"02:00:00:00:02:00",
"02:00:00:00:03:00"
];
links = (
(0, 1, 10),
(0, 2, 20),
(0, 3, 0),
(1, 2, 30),
(1, 3, 10),
(2, 3, 20)
);
};
Still no luck.
I used this modified config for 2 radios:
ifaces :
{
ids = [
"42:00:00:00:00:00",
"42:00:00:00:01:00"
];
links = (
(0, 1, 0)
);
};
sudo ./wmediumd/wmediumd -c loss_copeland.cfg
Input configuration file: loss_copeland.cfg
#_if = 2
Added station 0: 42:00:00:00:00:00
Added station 1: 42:00:00:00:01:00
REGISTER SENT!
The ipferf runs show still 100 Mbits/sec.
I also tried a IBSS setup, same problem.
If you do TCP iperf without bandwidth limiting, what kind of numbers do you get? Sounds like register failed somehow and you are using mac80211_hwsim's internal forwarding.
Server listening on UDP port 5001
Binding to local address 10.10.10.2
Receiving 1470 byte datagrams
UDP buffer size: 208 KByte (default)
------------------------------------------------------------
[ 3] local 10.10.10.2 port 5001 connected with 10.10.10.2 port 57775
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 3] 0.0-10.0 sec 120 MBytes 100 Mbits/sec 0.012 ms 0/85351 (0%)
[ 3] 10.0-20.0 sec 120 MBytes 100 Mbits/sec 0.012 ms 0/85445 (0%)
I mean iperf without -u on server, and without -u and -b 100M on the client. Anyway, I'm pretty sure that's what's happening. Does 'dmesg' show any errors?
The dmesg output:
[ 5551.527477] ieee80211 phy0: mac80211_hwsim_configure_filter
[ 5657.591051] mac80211_hwsim: wmediumd released netlink socket, switching to perfect channel medium
[ 5658.332397] mac80211_hwsim: received a REGISTER, switching to wmediumd mode with pid -1241509246
Iperf unlimited has a bandwith of ~ 20.9 Gbits/sec
Are you sure the two devices are in separate network namespaces? That seems high even if using mac80211's in-kernel forwarding. You should only see one of the devices from 'iw' in each namespace.
At least, I set them with the sudo iw phy phy1 set netns $pid
command. How can I check that with the iw command?
Is the config working for you?
Note that "$pid" needs to be the actual pid of the bash process in the new network namespace. When you run iw dev
with no arguments in the outer namespace, you should only see one of the devices; in the inner namespace (other window) you will see the other device.
An alternative is to try running cd tests; ./n-linear-mesh.sh
which, provided you have tmux available, will do all the steps for you.
OK. You are right, no device was in a different namespace.
I have the namespace working now and get these messages from wmediumd (current setup is IBSS mode):
[11593.028917] Station 42:00:00:00:00:00 BK 0 BE 0 VI 0 VO 0
[11593.028917] Station 42:00:00:00:01:00 BK 0 BE 0 VI 0 VO 1
cloned msg dest 42:00:00:00:00:00 (radio: 42:00:00:00:00:00) len 73
...
But iperf is not working anymore, because it has no route:
connect failed: No route to host
Moreover, the script is not working for me:
sudo ./n-linear-mesh.sh
./n-linear-mesh.sh: line 11: func: No such file or directory
duplicate session: wmediumd
./n-linear-mesh.sh: line 39: addr2phy: command not found
ls: cannot access '/sys/class/ieee80211//device/net': No such file or directory
Waiting for netns 0 -- /tmp/netns.pid.0
Waiting for to move to netns...
Waiting for to move to netns...
Oops. Yes, indeed, func is missing from repo. Will add.
Regarding lack of route, you'll need to both have delivery working (so signal > 0) and IPs assigned to both nodes so that ARP can determine the network addresses of each end.
Done, please repull.
Wmedium does not work for me.
Steps to reproduce:
In different terminals:
I hope you can help me.
I use the vanilla
ubuntu2 3.16.0-73-generic
kernel. Also tested with Ubuntu 16.04 LTS kernel (4.x)./wmediumd -c cfg-examples/allloses_2.cfg: