From 7cc16132ac457fa2ca3878cc52f540d4c73f4380 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 27 Jul 2016 08:54:31 +0200 Subject: [PATCH 1/4] Bugfix: actually expose bandwidth in JSON status --- src/control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/control.c b/src/control.c index f255be9..2aae109 100644 --- a/src/control.c +++ b/src/control.c @@ -425,7 +425,7 @@ void mlvpn_control_write_status(struct mlvpn_control *ctrl) t->recvpackets, t->sentbytes, t->recvbytes, - 0, + t->bandwidth, (uint32_t)t->srtt, mlvpn_loss_ratio(t), t->disconnects, From 181923ed9b829cb3a4d7d0b81ebfd79b2edfaef1 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 27 Jul 2016 08:57:46 +0200 Subject: [PATCH 2/4] example config: document bandwidth_upload --- doc/examples/mlvpn.conf.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/examples/mlvpn.conf.in b/doc/examples/mlvpn.conf.in index 9e86817..999e1d2 100644 --- a/doc/examples/mlvpn.conf.in +++ b/doc/examples/mlvpn.conf.in @@ -95,6 +95,8 @@ bindport = 5080 #bindfib = 0 #remotehost = "10.2.3.4" #remoteport = 5080 +## Bandwidth of this link, in bytes/s. If not specified, each link will only +## receive as much traffic as the slowest link can handle. #bandwidth_upload = 61440 #timeout = 25 From b6a424f6a69d71f0d3ae06a2f870686390de40d3 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 27 Jul 2016 08:59:37 +0200 Subject: [PATCH 3/4] mlvpn.conf.5: clarify/expand bandwidth_upload --- man/mlvpn.conf.5.ronn | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/man/mlvpn.conf.5.ronn b/man/mlvpn.conf.5.ronn index 701df91..200fe5f 100644 --- a/man/mlvpn.conf.5.ronn +++ b/man/mlvpn.conf.5.ronn @@ -122,7 +122,11 @@ The section name is mapped to the tunnel name. Example: "[adsl1]", "[adsl2]". Bandwidth is specified in Bytes (1 KiB is 1024 Bytes). This is used to setup the weighted round-robin balancing algorithm. - Set 0 if both links are similar. (client/server) + + If not specified, each link will only receive as much traffic as the + slowest link can handle. + + Set to 0 if both links have the same bandwidth. (client/server) - _timeout_ = 25 Override **[general]** timeout for this link. (client/server) From 195b13aef535798823ac0d9c9860e52c1954de85 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 27 Jul 2016 09:02:00 +0200 Subject: [PATCH 4/4] non equivalent links: mention bandwidth_upload --- doc/source/what_is_mlvpn.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/source/what_is_mlvpn.rst b/doc/source/what_is_mlvpn.rst index 6d3275c..f464332 100644 --- a/doc/source/what_is_mlvpn.rst +++ b/doc/source/what_is_mlvpn.rst @@ -33,6 +33,10 @@ Limitations Non equivalent links (3G/4G and *DSL or WIFI and *DSL) ====================================================== + +Note: make sure you set the bandwidth_upload on each link, otherwise each link +will only receive as much traffic as the slowest link can handle. + mlvpn can aggregate very different links if reordering is enabled. If you have a high latency 3G/4G link and a DSL connection, then