Hello everyone. After a few days of battling mikrotik, i’ve finally decided to come here for help.
There’s a dead simple network topology, R1 being the DHCP and L2TP server, R2 being the “remote client” DHCP relay and L2TP client. Pictured on F1.

There are local area networks behind both routers.
Imagine link between R1 and R2(ether1 on both) is the internet.
The task is to provide site-to-site link (without BCP) in order to get LAN to LAN connectivity.
When using PPTP(GRE tunnel) - the dhcp relay works as expected.
When setting up an L2TP tunnel(or an IPSec tunnel, not much difference), the DHCP relay-retransmitted DHCP Discover packets are being discarded by the R1 with an ICMP Type 3 Code 3(Port Unreachable).
There is no firewall set up.
The situation is reproducible with or without any additional routers or switches between routers.
Remote telnet works, the routers can ping each other, and the packets are being compressed and encrypted into L2TP tunnel as seen in Wireshark or /tool sniffer.
There is no difference whether local-address and dhcp-server addresses are set to in-L2TP(172.16..) addresses or internal(10…) addresses.
R1 export:
# aug/29/2017 07:47:29 by RouterOS 6.39.2
# software id =
#
/interface l2tp-server
add name=R2 user=R2
/ip pool
add name=dhcp_pool0 ranges=10.1.1.2-10.1.1.254
add name=dhcp_pool1 ranges=10.2.1.2-10.2.1.254
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether2 name=dhcp2 relay=172.16.1.2
add address-pool=dhcp_pool0 disabled=no interface=ether2 name=dhcp1
/interface l2tp-server server
set enabled=yes
/ip address
add address=192.168.1.1/24 interface=ether1 network=192.168.1.0
add address=10.1.1.1/24 interface=ether2 network=10.1.1.0
/ip dhcp-server network
add address=10.1.1.0/24 dns-server=10.1.1.1 gateway=10.1.1.1
add address=10.2.1.0/24 dns-server=10.2.1.1 gateway=10.2.1.1
/ip route
add distance=1 gateway=ether1
/ppp secret
add local-address=172.16.1.1 name=R2 password=l2tpassword1 remote-address=172.16.1.2 routes=\
"10.2.1.0/24 172.16.1.2 1" service=l2tp
/system logging
add topics=dhcp
add topics=debug
R2 export:
# aug/29/2017 07:47:57 by RouterOS 6.39.2
# software id =
#
/interface l2tp-client
add connect-to=192.168.1.1 disabled=no name=l2tp-out1 password=l2tpassword1 user=R2
/ip address
add address=192.168.2.1/24 interface=ether1 network=192.168.2.0
add address=10.2.1.1/24 interface=ether2 network=10.2.1.0
/ip dhcp-relay
add dhcp-server=10.1.1.1 disabled=no interface=ether2 local-address=10.2.1.1 name=relay1
/ip route
add distance=1 gateway=ether1
add distance=1 dst-address=10.1.1.0/24 gateway=172.16.1.1
/system logging
add topics=debug
add topics=dhcp
The problem is reproducible over the real internet and with real pair of mikrotik hAPs.
What is wrong? Why does it work with PPTP? Where to look?
