Community discussions

MikroTik App
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1424
Joined: Sun Sep 18, 2011 7:00 pm

Bonding using openvpn?

Wed May 22, 2019 1:57 pm

Hello ,
I'm trying to make my router work as bonding using my 2 modems
added the 2 ovpn client to the bonder
but I can see it's only working from 1 sim
this is the configuration I have on the router
# model = RouterBOARD M33G
# serial number = A2FD09FE0270
/interface ovpn-client
add cipher=aes256 connect-to=8.15.16.6 mac-address=00:00:08:3F:F5:8F name=\
    ovpn-out1 password=Test1 user=Test1
add cipher=aes256 connect-to=8.15.16.6 mac-address=00:00:08:3F:F5:8F name=\
    ovpn-out2 password=Test2 user=Test2
/interface bonding
add name=bonding1 slaves=ovpn-out1,ovpn-out2
/port
set 1 name=usb2
set 2 name=usb3
/interface ppp-client
add add-default-route=no allow=pap,chap apn=internet data-channel=3 \
    dial-on-demand=no disabled=no info-channel=2 name=SIM1  port=usb2 
add add-default-route=no allow=pap,chap apn=internet data-channel=3 \
    dial-on-demand=no disabled=no info-channel=2 name=SIM2 port=usb3
/ip address
add address=10.0.0.24/24 interface=ether1 network=10.0.0.0
add address=172.16.100.1/24 interface=bonding1 network=172.16.100.0
/ip route
add distance=1 dst-address=8.15.16.6/32 gateway=SIM1 routing-mark=SIM1
add distance=1 dst-address=8.15.16.6/32 gateway=SIM2 routing-mark=SIM2
add distance=10 dst-address=8.15.16.6/32 gateway=SIM1
add distance=20 dst-address=8.15.16.6/32 gateway=SIM2
/ip route rule
add action=lookup-only-in-table dst-address=8.15.16.6/32 interface=SIM1 \
    table=SIM1
add action=lookup-only-in-table dst-address=8.15.16.6/32 interface=SIM2 \
    table=SIM2

in the server side I have this setting :
/ip address
add address=172.16.100.100/24 interface=Bonding-2M2S network=172.16.100.0

/interface bonding
add name=Bonding-2M2S slaves=<ovpn-Test1>,<ovpn-Test2>

I have ping from the router to the server - but only from 1 sim

what am I miisng \ not doing right ?

Thanks ,
 
tdw
Forum Guru
Forum Guru
Posts: 1855
Joined: Sat May 05, 2018 11:55 am

Re: Bonding using openvpn?

Wed May 22, 2019 3:08 pm

Bonding is not load balancing, see https://wiki.mikrotik.com/wiki/Manual:I ... ding_modes for a description of how the traffic is distributed.

Depending on your use requirements using per-connection classifier with mangle & routing marks may be a better option.
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1424
Joined: Sun Sep 18, 2011 7:00 pm

Re: Bonding using openvpn?

Wed May 22, 2019 5:45 pm

I don't think so...
can you expalin how to do this ?

In the end I have the router with 2 modems&sims and I want to get faster connection the main server (which is in my office)
 
tdw
Forum Guru
Forum Guru
Posts: 1855
Joined: Sat May 05, 2018 11:55 am

Re: Bonding using openvpn?

Wed May 22, 2019 9:05 pm

The best method very much depends on the nature of the traffic between the two sites e.g. the number of distinct MAC addresses at each end, and the variety of TCP/UDP ports the traffic uses. If your case has the bulk of the traffic between one device at each end over a single TCP or UDP connection there isn't a good solution.

Also, I've spotted you have used the same MAC address for both OpenVPN clients - they should be unique.
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1424
Joined: Sun Sep 18, 2011 7:00 pm

Re: Bonding using openvpn?

Tue May 28, 2019 11:44 am

OK
I have change the MAC
but still I can't make the second sim work
when I make a speed-test I can see the the data is over sim1 only
what else can I do?

I have try to use load balancing using PCC method
I can see the 2 open-vpn client are working at the same time and have the transferring the same data - but all is goind out using SIM1 only

I use this setup and just added 2 openvpn client
https://www.scribd.com/doc/249058999/Mi ... pt-by-ZaiB
Last edited by David1234 on Tue May 28, 2019 12:27 pm, edited 1 time in total.
 
msatter
Forum Guru
Forum Guru
Posts: 2912
Joined: Tue Feb 18, 2014 12:56 am
Location: Netherlands / Nīderlande

Re: Bonding using openvpn?

Tue May 28, 2019 12:16 pm

Look in the wiki.mikrotik.com for PCC and there you have the choice on what information you can split up traffic.

The simplest one is uding destination address.
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1424
Joined: Sun Sep 18, 2011 7:00 pm

Re: Bonding using openvpn?

Tue May 28, 2019 1:34 pm

Let me exaplin from the start what I want to get :
I have 2 workers that use RBM33G with 2 SIMs
I need then to be at the same netwroks - because I want them to be able to "talk"
in order to to this - I have setup 2 open-vpn client on each RB to connect to my Office server and put them in bonding interface .

- so now I have 2 working open vpn clients on each RB and when they transfer data I can see that both openVpn clients are working
I want to make both SIMs to work also.
now SIM1 is using 10G and SIM2 use only 1M - I want to make load-balnacing\PCC\Bonding with the 2 SIMs so I will use both of them at the same time .

is my problem more clear now ?

Who is online

Users browsing this forum: anav, jamesperks, Lupin, MauriceW, MrDeepFreeze, PLJ020, thor29 and 88 guests