here comes yet another (i suspect) MTU issue.
I've tried to figure it out and finally got confused, so my tests lost a structure a became a random lock-picking.
Please help to put me back on tracks.
i have two sites: D and M with a wireguard tunnel between them. both sites have: hap ac2 with a NAS attached on LAN.
the NAS-NAS speed doesn't exceed 5.5Mbps [SMB transfers]
BTest between MTs over WG:
tcp
D -> M: 40 Mbps
M -> D: 160 Mbps
udp
D -> M: 51 Mbps
M -> D: 260 Mbps
my first success was few weeks ago when I lowered the WG MTU to ~1260 on both sites and disabled the fasttrack on D (there was no fasttrack on M) and i got some decent speeds.
But later without any obvious changes the speed dropped to current 5.5Mbps. Couldn't replicate the success anymore.
now the setup is:
WG MTU: 1350 [both sites]
fasttrack: both disabled
mangle: add action=change-mss chain=forward new-mss=1350 out-interface=wireguardD passthrough=yes protocol=tcp tcp-flags=syn tcp-mss=!0-1350
speed: 5.5 Mbps
Any ideas?
thank you!
Site D:
2024-08-10 18:47:45 by RouterOS 7.15.2
model = RBD52G-5HacD2HnD
/interface bridge
add admin-mac=aa:94:E4 auto-mac=no comment=defconf name=
"local bridge" port-cost-mode=short
/interface wireguard
add listen-port=13231 mtu=1350 name=wireguardD
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/routing bgp template
set default disabled=no output.network=bgp-networks
/interface bridge port
add bridge="local bridge" comment=defconf ingress-filtering=no interface=
ether2 internal-path-cost=10 path-cost=10
add bridge="local bridge" comment=defconf ingress-filtering=no interface=
ether3 internal-path-cost=10 path-cost=10
add bridge="local bridge" comment=defconf ingress-filtering=no interface=
ether4 internal-path-cost=10 path-cost=10
add bridge="local bridge" comment=defconf ingress-filtering=no interface=
ether5 internal-path-cost=10 path-cost=10
add bridge="local bridge" comment=defconf ingress-filtering=no interface=
wlan1-2GHz internal-path-cost=10 path-cost=10
add bridge="local bridge" comment=defconf ingress-filtering=no interface=
wlan2-5GHz internal-path-cost=10 path-cost=10
/ip firewall connection tracking
set udp-timeout=10s
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ip settings
set max-neighbor-entries=8192
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface list member
add comment=defconf interface="local bridge" list=LAN
add comment=defconf interface=ether1-WAN list=WAN
add interface=wireguardD list=LAN
/interface wireguard peers
add allowed-address=9.9.9.0/24,192.168.46.0/28,192.168.100.0/24
endpoint-address=Pub_M_IP endpoint-port=13231 interface=wireguardD
name=wireguardM public-key=
"lll"
add allowed-address=192.168.46.3/32 client-address=192.168.46.3/32 interface=
wireguardD name="" public-key=
"llll"
add allowed-address=192.168.46.4/32 client-address=192.168.46.4/32 interface=
wireguardD name="" public-key=
"llll"
/ip address
add address=9.9.0.1/24 comment=defconf interface="local bridge" network=
9.9.0.0
add address=192.168.2.2/24 interface=ether1-WAN network=192.168.2.0
add address=192.168.46.2/28 comment=wireguardD interface=wireguardD
network=192.168.46.0
/ip dhcp-server network
add address=9.9.0.0/24 comment=defconf gateway=9.9.0.1 netmask=24
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/ip firewall filter
add action=accept chain=input comment=
"defconf: accept established,related,untracked" connection-state=
established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=
invalid
add action=drop chain=forward comment="defconf: drop invalid"
connection-state=invalid
add action=fasttrack-connection chain=forward comment="defconf: fasttrack"
connection-state=established,related disabled=yes hw-offload=yes
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment=
"defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=accept chain=input comment="accept Wireguard" dst-port=13231
protocol=udp
add action=accept chain=input comment="Accept WAN from M" in-interface-list=
WAN src-address=Pub_M_IP
add action=accept chain=forward comment="wireguard - internetwork pass"
in-interface=wireguardD
add action=accept chain=forward out-interface=wireguardD
add action=accept chain=input in-interface=wireguardD
add action=drop chain=input comment="drop all coming from WAN"
in-interface-list=WAN
add action=accept chain=forward comment="defconf: accept in ipsec policy"
ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy"
ipsec-policy=out,ipsec
add action=accept chain=forward comment=
"defconf: accept established,related, untracked" connection-state=
established,related,untracked
add action=accept chain=forward in-interface-list=LAN
add action=drop chain=forward comment=
"defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat
connection-state=new in-interface-list=WAN
/ip firewall mangle
add action=change-mss chain=forward new-mss=1350 out-interface=
wireguardD passthrough=yes protocol=tcp tcp-flags=syn tcp-mss=!0-1350
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade"
ipsec-policy=out,none out-interface-list=WAN
add action=masquerade chain=srcnat disabled=yes src-address=192.168.46.0/28
add action=src-nat chain=srcnat disabled=yes out-interface=wireguardD
to-addresses=192.168.46.2
/ip route
add disabled=no distance=5 dst-address=0.0.0.0/0 gateway=192.168.2.1
routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add disabled=no distance=1 dst-address=9.9.9.0/24 gateway=192.168.46.1
routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add disabled=no distance=1 dst-address=192.168.100.1/32 gateway=192.168.46.1
routing-table=main scope=30 suppress-hw-offload=no target-scope=10
>
\
\
**Site M:**
> ```text
# 2024-08-11 04:09:33 by RouterOS 7.15.2
#
# model = RBD52G-5HacD2HnD
/interface bridge
add arp=proxy-arp name=bridge1_net port-cost-mode=short
/interface wireguard
add listen-port=13231 mtu=1350 name=wireguardM
/interface list
add name=wlanU_list
add name=LAN
add name=WAN
/interface bridge port
add bridge=bridge1_net ingress-filtering=no interface=wlan1-2.4 \
internal-path-cost=10 path-cost=10
add bridge=bridge1_net ingress-filtering=no interface="wlan2 - 5" \
internal-path-cost=10 path-cost=10
add bridge=bridge1_net ingress-filtering=no interface=ether3 \
internal-path-cost=10 path-cost=10
add bridge=bridge1_net ingress-filtering=no interface=ether4 \
internal-path-cost=10 path-cost=10
add bridge=bridge1_net ingress-filtering=no interface="ether2"
add bridge=bridge1_net ingress-filtering=no interface="wlan U" \
internal-path-cost=10 path-cost=10
add bridge=bridge1_net ingress-filtering=no interface=wlanU5 \
internal-path-cost=10 path-cost=10
/ip firewall connection tracking
set udp-timeout=10s
/ip neighbor discovery-settings
set discover-interface-list=!dynamic
/ip settings
set max-neighbor-entries=8192
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface wireguard peers
add allowed-address=9.9.0.0/24,192.168.46.0/28 endpoint-address=Pub_D_IP \
endpoint-port=13231 interface=wireguardM name=wireguardD public-key=\
"zz="
add allowed-address=192.168.46.6/32 client-address=192.168.46.6/32 interface=\
wireguardM name=" " public-key=\
"zz"
add allowed-address=192.168.46.5/32 client-address=192.168.46.5/32 interface=\
wireguardM name=" " public-key=\
"zz"
/ip address
add address=9.9.9.1/24 interface=bridge1_net network=9.9.9.0
add address=192.168.46.1/28 comment=wireguardM interface=wireguardM \
network=192.168.46.0
/ip dhcp-server network
add address=9.9.9.0/24 dns-server=8.8.8.8 gateway=9.9.9.1
/ip dns
set allow-remote-requests=yes servers=1.2.160.5
/ip firewall filter
add action=passthrough chain=forward
add action=fasttrack-connection chain=forward connection-state=\
established,related disabled=yes hw-offload=yes
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid log-prefix="all drop___"
add action=drop chain=forward comment="Deny access to NAS from wlanU" \
dst-address=9.9.9.9 in-interface-list=wlanU_list
add action=drop chain=input comment="Deny access to Mirotik from wlanU" \
in-interface-list=wlanU_list
add action=drop chain=forward comment="Deny access to DE from wlanU" \
dst-address=9.9.0.0/24 in-interface-list=wlanU_list
add action=accept chain=input comment=\
"defconf: accept established,related, untracked" connection-state=\
established,related,untracked connection-type=""
add action=accept chain=forward out-interface=wireguardM
add action=accept chain=forward in-interface=wireguardM
add action=accept chain=input comment="Accept input from Wireguard" \
in-interface=wireguardM
add action=accept chain=input comment="Allow Wireguard" dst-port=13231 \
in-interface-list=WAN protocol=udp
add action=accept chain=input comment="accept Input from D" \
in-interface-list=WAN src-address=Pub_D_IP
add action=drop chain=input comment="drop all from WAN" in-interface-list=WAN
/ip firewall mangle
add action=change-mss chain=forward connection-mark="" log-prefix=MSS_ \
new-mss=1350 out-interface=wireguardM passthrough=yes protocol=tcp \
tcp-flags=syn tcp-mss=!0-1350
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1_WAN
/ip route
add check-gateway=ping disabled=no distance=1 dst-address=9.9.0.0/24 gateway=\
192.168.46.2 routing-table=main scope=30 suppress-hw-offload=no \
target-scope=10
