Mikrotik L2TP Server: Difference between revisions

Back up to the L2TP Handover page
From AAISP Support Site
mNo edit summary
(→‎Add a PPP secret: fix redlink)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__<indicator name="L2TP">[[File:Menu-L2TP-Relay.svg|link=:Category:L2TP Handover|30px|Back up to the L2TP Handover page]]</indicator>
L2TP handover can be done with Mikrotik routers.
L2TP handover can be done with Mikrotik routers.


Line 11: Line 12:


==Enable L2TP server on a router board==
==Enable L2TP server on a router board==
<syntaxhighlight>
<syntaxhighlight lang=bash>
/interface l2tp-server server
/interface l2tp-server server
set authentication=pap,chap default-profile=default enabled=yes max-mru=1460 max-mtu=1460 mrru=disabled
set authentication=pap,chap default-profile=default enabled=yes max-mru=1460 max-mtu=1460 mrru=disabled
Line 17: Line 18:


==Set up an L2TP server==
==Set up an L2TP server==
<syntaxhighlight lang=bash>
<pre>

/interface l2tp-server
/interface l2tp-server
add comment="L2TP Server" disabled=no name="RevDATA SIM" user=<this is the number you will see in L2TP debugging, you can also get it from the log on clueless related to your data sim>
add comment="L2TP Server" disabled=no name="DATA SIM" user=<this is the number you will see in L2TP debugging, you can also get it from the log on Control Pages related to your data sim>
</syntaxhighlight>
</pre>


==Add a PPP secret==
==Add a PPP secret==
<syntaxhighlight lang=bash>
<pre>

/ppp secret
/ppp secret
add caller-id="" disabled=no limit-bytes-in=0 limit-bytes-out=0 local-address=<IP address on the rb ie 10.10.10.10>\
add caller-id="" disabled=no limit-bytes-in=0 limit-bytes-out=0 local-address=<IP address on the rb ie 10.10.10.10>\
name=<this is the number you will see in L2TP debugging> \
name=<this is the number you will see in L2TP debugging> \
password=password profile=default remote-address=<your choice of IP here ie 10.10.10.11> routes="" service=l2tp
password=password profile=default remote-address=<your choice of IP here ie 10.10.10.11> routes="" service=l2tp
</syntaxhighlight>
</pre>



The "name" is a number in the format of 4477xxxxxxxx.
The "name" is a number in the format of 4477xxxxxxxx.


You will need to watch the L2TP PPP debug for this, or get it from [[clueless]].
You will need to watch the L2TP PPP debug for this, or get it from [[:Category:Control Pages|clueless]].





Latest revision as of 01:28, 9 October 2022

L2TP handover can be done with Mikrotik routers.

If you have multiple SIMs, one thing to bear in mind is to use the same hostname on the Control Pages. This will then put the SIMs in different sessions in the same tunnel. Otherwise we see things like:

l2tp,debug tunnel 21 entering state: dead

In the log, indicating that the tunnel for the first SIM has been dropped.

Configuration

The following was taken from: https://www.aa-asterisk.org.uk/Data_sim_L2TP_server_for_ROS

Enable L2TP server on a router board

/interface l2tp-server server
set authentication=pap,chap default-profile=default enabled=yes max-mru=1460 max-mtu=1460 mrru=disabled

Set up an L2TP server

/interface l2tp-server
add comment="L2TP Server" disabled=no name="DATA SIM" user=<this is the number you will see in L2TP debugging, you can also get it from the log on Control Pages related to your data sim>

Add a PPP secret

/ppp secret
add caller-id="" disabled=no limit-bytes-in=0 limit-bytes-out=0 local-address=<IP address on the rb ie 10.10.10.10>\
name=<this is the number you will see in L2TP debugging> \
    password=password profile=default remote-address=<your choice of IP here ie 10.10.10.11> routes="" service=l2tp


The "name" is a number in the format of 4477xxxxxxxx.

You will need to watch the L2TP PPP debug for this, or get it from clueless.