Code: Select all
┌─────────┐ ┌─────────────────────────────────────┐
│ ISP │ │ RB5009 │
│ ONT │ │ │
│ │ ├────────┬────────────────────────────┤
│ │ │ eth1 │ bridge │
│ │ │ vlan ├────────┬──────────┬────────┤
│ │ │ PPPoE │ eth2 │ eth3-7 │ eth8 │
└───┬─────┘ └──▲─────┴──┬─────┴──────────┴────────┘
│ │ │
└──────────┘ ┌──┴─────┐
│ Comp │
└────────┘
Code: Select all
/interface bridge
add admin-mac=78:9A:18:BD:4D:8C auto-mac=no comment=defconf dhcp-snooping=yes \
name=bridge port-cost-mode=short
/interface ethernet
set [ find default-name=ether1 ] comment=ONT l2mtu=1526 mtu=1512
set [ find default-name=ether2 ] comment=Comp rx-flow-control=auto \
tx-flow-control=auto
set [ find default-name=ether4 ] rx-flow-control=auto tx-flow-control=auto
set [ find default-name=ether7 ] comment="AP"
set [ find default-name=ether8 ] comment="AP"
set [ find default-name=sfp-sfpplus1 ] comment="sfp fiber" disabled=yes
/interface wireguard
add comment=Wireguard listen-port=13231 mtu=1420 name=wg0
/interface vlan
add comment="vlan6 for ISP" interface=ether1 loop-protect=off mtu=1508 \
name=vlan6 vlan-id=6
/interface pppoe-client
add add-default-route=yes allow=pap comment="ISP PPPoE" disabled=no \
interface=vlan6 max-mru=1500 max-mtu=1500 name=ISP-pppoe profile=\
ISP use-peer-dns=yes user=user@ISP
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
add comment="bridge only" name=BRIDGE
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/interface bridge port
add bridge=bridge comment=defconf interface=ether2 internal-path-cost=10 \
path-cost=10
add bridge=bridge comment=defconf interface=ether3 internal-path-cost=10 \
path-cost=10
add bridge=bridge comment=defconf interface=ether4 internal-path-cost=10 \
path-cost=10
add bridge=bridge comment=defconf interface=ether5 internal-path-cost=10 \
path-cost=10
add bridge=bridge comment=defconf interface=ether6 internal-path-cost=10 \
path-cost=10
add bridge=bridge comment=defconf interface=ether7 internal-path-cost=10 \
path-cost=10 trusted=yes
add bridge=bridge comment=defconf interface=ether8 internal-path-cost=10 \
path-cost=10 trusted=yes
add bridge=bridge comment=defconf interface=sfp-sfpplus1 internal-path-cost=10 \
path-cost=10
/interface detect-internet
set detect-interface-list=WAN internet-interface-list=WAN lan-interface-list=\
LAN wan-interface-list=WAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ISP-pppoe list=WAN
add comment="Add Wireguard to LAN, for IPv6 Firewall rules" interface=wg0 list=\
LAN
add comment="for Mikrotik neighbor discovery" interface=bridge list=BRIDGE
/interface wireguard peers
<wg peers>
-
Code: Select all
/ip firewall connection tracking
set udp-timeout=10s
/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=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 connections" dst-port=13231 protocol=udp
add action=accept chain=input comment="allow access to RouterOS's DNS server via WireGuard" dst-port=53 in-interface=wg0 protocol=udp
add action=accept chain=input comment="allow access to RouterOS mobile app via WireGuard" dst-port=8291 in-interface=wg0 protocol=tcp
add action=accept chain=input comment="allow access to RouterOS webinterface via WireGuard" dst-port=80 in-interface=wg0 protocol=tcp
add action=drop chain=input comment="defconf: drop all not coming from LAN" in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" disabled=yes ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" disabled=yes ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related hw-offload=yes
add action=accept chain=forward comment="defconf: accept established,related, untracked" connection-state=established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid
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 nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN
add action=masquerade chain=srcnat comment=https://help.mikrotik.com/docs/display/ROS/NAT#NAT-HairpinNAT dst-address=192.168.88.0/24 dst-port=22 out-interface-list=LAN protocol=tcp src-address=\
192.168.88.0/24
add action=dst-nat chain=dstnat comment="This rule changes the IP of all packets which are from the external network and directed to tcp:<external_ip>:22 to tcp:192.168.88.124:22" dst-port=22 \
in-interface-list=WAN protocol=tcp to-addresses=192.168.88.254 to-ports=22
add action=dst-nat chain=dstnat comment="This rule changes the IP of all packets which are from the internal network and directed to tcp:<external_ip>:22 to tcp:192.168.88.124:22" dst-address=\
<external_ip> dst-port=22 in-interface-list=LAN protocol=tcp to-addresses=192.168.88.254 to-ports=22
add action=dst-nat chain=dstnat comment="This rule changes the IP of all packets which are from the external network and directed to tcp:<external_ip>:2222 to tcp:192.168.88.253:22" dst-port=2222 \
in-interface-list=WAN protocol=tcp to-addresses=192.168.88.253 to-ports=22
add action=dst-nat chain=dstnat comment="This rule changes the IP of all packets which are from the internal network and directed to tcp:<external_ip>:2222 to tcp:192.168.88.253:22" dst-address=\
<external_ip> dst-port=2222 in-interface-list=LAN protocol=tcp to-addresses=192.168.88.253 to-ports=22
add action=dst-nat chain=dstnat comment="allow iperf3 to comp" dst-port=5201 in-interface-list=WAN protocol=tcp to-addresses=192.168.88.254 to-ports=5201
/ip firewall service-port
set ftp disabled=yes
set h323 disabled=yes
set pptp disabled=yes
Code: Select all
/queue type
add fq-codel-interval=30ms fq-codel-limit=100 kind=fq-codel name=fq_codel-tuning
add kind=fq-codel name=fq_codel-default
/queue interface
set ether1 queue=fq_codel-tuning
set ether2 queue=fq_codel-tuning
set ether3 queue=fq_codel-tuning
set ether4 queue=fq_codel-tuning
set ether5 queue=fq_codel-tuning
set ether6 queue=fq_codel-tuning
set ether7 queue=fq_codel-tuning
set ether8 queue=fq_codel-tuning
With this configuration I can get 900 Mbit down:
Code: Select all
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 105 MBytes 881 Mbits/sec
[ 5] 1.00-2.00 sec 107 MBytes 901 Mbits/sec
[ 5] 2.00-3.00 sec 108 MBytes 904 Mbits/sec
[ 5] 3.00-4.00 sec 111 MBytes 932 Mbits/sec
[ 5] 4.00-5.00 sec 106 MBytes 893 Mbits/sec
[ 5] 5.00-6.00 sec 110 MBytes 921 Mbits/sec
[ 5] 6.00-7.00 sec 104 MBytes 877 Mbits/sec
[ 5] 7.00-8.00 sec 106 MBytes 890 Mbits/sec
[ 5] 8.00-9.00 sec 108 MBytes 904 Mbits/sec
[ 5] 9.00-10.00 sec 104 MBytes 872 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.05 GBytes 900 Mbits/sec 64607 sender
[ 5] 0.00-10.00 sec 1.04 GBytes 897 Mbits/sec receiver
Code: Select all
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 105 MBytes 878 Mbits/sec 156 697 KBytes
[ 5] 1.00-2.00 sec 92.6 MBytes 777 Mbits/sec 0 793 KBytes
[ 5] 2.00-3.00 sec 101 MBytes 848 Mbits/sec 0 887 KBytes
[ 5] 3.00-4.00 sec 110 MBytes 919 Mbits/sec 0 977 KBytes
[ 5] 4.00-5.00 sec 94.2 MBytes 791 Mbits/sec 53 775 KBytes
[ 5] 5.00-6.00 sec 104 MBytes 873 Mbits/sec 0 867 KBytes
[ 5] 6.00-7.00 sec 105 MBytes 883 Mbits/sec 22 670 KBytes
[ 5] 7.00-8.00 sec 87.5 MBytes 734 Mbits/sec 0 764 KBytes
[ 5] 8.00-9.00 sec 97.0 MBytes 814 Mbits/sec 0 856 KBytes
[ 5] 9.00-10.00 sec 106 MBytes 887 Mbits/sec 0 947 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1002 MBytes 840 Mbits/sec 231 sender
[ 5] 0.00-10.00 sec 999 MBytes 838 Mbits/sec receiver
If I change my setup like this:
Code: Select all
┌─────────┐ ┌────────┐
│ ISP │ │ Comp │
│ ONT │ │ │
└───┬─────┘ └─┬──────┘
│ │
└──────────┘
So my question is, surely there must be a config in which I can get the same performance with a 200 dollar device?