VrayoSystems / vtrunkd

Open source SD WAN daemon for linux (network link bonding/trunking/aggregation and multichannel VPN daemon).
GNU General Public License v3.0
224 stars 77 forks source link

ping problems on real modems #195

Open grandrew opened 8 years ago

grandrew commented 8 years ago

investigate ping problems!!

try enabling/disabling channels, etc.

grandrew commented 8 years ago

ping while D/L:

64 bytes from 10.0.0.1: icmp_req=4 ttl=64 time=674 ms
64 bytes from 10.0.0.1: icmp_req=4 ttl=64 time=1313 ms (DUP!)
64 bytes from 10.0.0.1: icmp_req=5 ttl=64 time=394 ms
64 bytes from 10.0.0.1: icmp_req=6 ttl=64 time=387 ms
64 bytes from 10.0.0.1: icmp_req=7 ttl=64 time=478 ms
64 bytes from 10.0.0.1: icmp_req=8 ttl=64 time=311 ms
64 bytes from 10.0.0.1: icmp_req=9 ttl=64 time=377 ms
64 bytes from 10.0.0.1: icmp_req=10 ttl=64 time=317 ms
64 bytes from 10.0.0.1: icmp_req=11 ttl=64 time=323 ms
64 bytes from 10.0.0.1: icmp_req=12 ttl=64 time=262 ms
64 bytes from 10.0.0.1: icmp_req=13 ttl=64 time=383 ms
64 bytes from 10.0.0.1: icmp_req=14 ttl=64 time=574 ms
64 bytes from 10.0.0.1: icmp_req=15 ttl=64 time=543 ms
^C
--- 10.0.0.1 ping statistics ---
16 packets transmitted, 15 received, +2 duplicates, 6% packet loss, time 15021ms
rtt min/avg/max/mdev = 262.600/575.440/1489.349/355.643 ms, pipe 2
paketecuento commented 8 years ago

I build vtrunkd using odroid c2 board. this is my ping using 2 3g huawei dongles:

root@odroidc2:~# ping www.google.es
PING www.google.es (216.58.210.227) 56(84) bytes of data.
64 bytes from mrs04s10-in-f227.1e100.net (216.58.210.227): icmp_seq=1 ttl=55 time=79.4 ms
64 bytes from mrs04s10-in-f227.1e100.net (216.58.210.227): icmp_seq=2 ttl=54 time=188 ms
64 bytes from mrs04s10-in-f227.1e100.net (216.58.210.227): icmp_seq=3 ttl=55 time=67.9 ms
64 bytes from mrs04s10-in-f227.1e100.net (216.58.210.227): icmp_seq=4 ttl=54 time=168 ms
64 bytes from mrs04s10-in-f227.1e100.net (216.58.210.227): icmp_seq=5 ttl=55 time=67.9 ms
64 bytes from mrs04s10-in-f227.1e100.net (216.58.210.227): icmp_seq=6 ttl=54 time=181 ms
64 bytes from mrs04s10-in-f227.1e100.net (216.58.210.227): icmp_seq=7 ttl=54 time=178 ms
64 bytes from mrs04s10-in-f227.1e100.net (216.58.210.227): icmp_seq=8 ttl=55 time=67.5 ms
64 bytes from mrs04s10-in-f227.1e100.net (216.58.210.227): icmp_seq=9 ttl=54 time=331 ms
64 bytes from mrs04s10-in-f227.1e100.net (216.58.210.227): icmp_seq=10 ttl=55 time=69.4 ms
64 bytes from mrs04s10-in-f227.1e100.net (216.58.210.227): icmp_seq=11 ttl=54 time=448 ms
64 bytes from mrs04s10-in-f227.1e100.net (216.58.210.227): icmp_seq=12 ttl=55 time=70.8 ms
^C
--- www.google.es ping statistics ---
13 packets transmitted, 12 received, 7% packet loss, time 12121ms
rtt min/avg/max/mdev = 67.514/159.901/448.190/116.302 ms

Also I made some bandwith test with iperf, giving some strange results. For example, using 1 modem each time, I got 3 to 5 Mbits/s, but using both modems in vtrunkd, then I get poorer results:

[  4]  0.0-12.8 sec  1.25 MBytes   822 Kbits/sec
[  5] local 10.0.0.1 port 5001 connected with 10.0.0.2 port 40571
[  5]  0.0-14.0 sec   896 KBytes   525 Kbits/sec
grandrew commented 8 years ago

hi @paketecuento, the ping seems like it is for some reason not using the duplication mode as if the channel was congested. Can you make a tcpdump of the tun0 traffic?

As for the bandwidth, can you make a wget or ssh download test like (server http)->(odroid)->(laptop wget) for at least 30 seconds and record how the bandwidth behaves?

Also note that as two modems use twice the TCP buffer and vtrunkd uses 1k packet smoothing buffer by default so it requires tcp_wmem and tcp_rmem of at least 2M bytes cap on both sides, same applies to window size of iperf. Also you will need a 1000 packet txqueuelen at tun on sender side and maybe like 400 packets on receiver since you have quite large RTT margin (400ms vs. 67ms)