This is the configuration im using.
Code: Select all
/interface bridge
add admin-mac=C4:AD:34:F2:8C:C6 auto-mac=no name=bridge vlan-filtering=yes
/interface ethernet
set [ find default-name=ether1 ] name=ether1-Modem
set [ find default-name=ether2 ] name=ether2-DVR
set [ find default-name=ether3 ] name=ether3-Admin
set [ find default-name=ether4 ] name=ether4-CPE
set [ find default-name=ether5 ] name=ether5-EAP
set [ find default-name=sfp1 ] name=sfp1-Switch
/interface vlan
add interface=bridge name=vlan1-Empleados vlan-id=110
add interface=bridge name=vlan2-Clientes vlan-id=120
add interface=bridge name=vlan3-Ventas vlan-id=130
add interface=bridge name=vlan4-Servicio vlan-id=140
add interface=bridge name=vlan5-GamingVentas vlan-id=200
add interface=bridge name=vlan6-GamingEmpleados vlan-id=220
add interface=bridge name=vlan7-GamingServicio vlan-id=210
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
add name=CPE_VLANS
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
add hotspot-address=10.5.50.1 html-directory=flash/hotspot login-by=http-chap \
name=Clientes rate-limit=5M/50M
/ip pool
add name=admin ranges=192.168.90.50-192.168.90.254
add name=clientes-pool ranges=10.5.50.2-10.5.50.254
add name=ventas-pool ranges=192.168.80.30-192.168.80.254
add name=empleados-pool ranges=192.168.81.10-192.168.81.254
add name=servicio-pool ranges=192.168.88.10-192.168.88.254
add name=vpn-pool ranges=192.168.82.2-192.168.82.254
/ip dhcp-server
add address-pool=admin disabled=no interface=bridge name=Admin
add address-pool=clientes-pool disabled=no interface=vlan2-Clientes lease-time=\
1h name=Clientes
add address-pool=empleados-pool disabled=no interface=vlan1-Empleados name=\
Empleados
add address-pool=ventas-pool disabled=no interface=vlan3-Ventas name=Ventas
add address-pool=servicio-pool disabled=no interface=vlan4-Servicio name=\
Servicio
/ip hotspot
add address-pool=clientes-pool disabled=no interface=vlan2-Clientes name=\
Clientes profile=Clientes
/ip hotspot user profile
set [ find default=yes ] address-pool=clientes-pool name=vip rate-limit=\
10M/100M shared-users=30 transparent-proxy=yes
add address-pool=clientes-pool idle-timeout=30m mac-cookie-timeout=6h name=\
clientes rate-limit=256k/2M shared-users=200 transparent-proxy=yes
/port
set 0 name=serial0
/ppp profile
add dns-server=8.8.8.8 local-address=192.168.82.1 name=VPN remote-address=\
vpn-pool use-encryption=no
/user group
set full policy="local,telnet,ssh,ftp,reboot,read,write,policy,test,winbox,passw\
ord,web,sniff,sensitive,api,romon,dude,tikapp"
/interface bridge port
add bridge=bridge interface=ether2-DVR
add bridge=bridge interface=ether3-Admin
add bridge=bridge interface=ether4-CPE
add bridge=bridge interface=ether5-EAP
add bridge=bridge interface=sfp1-Switch
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface bridge vlan
add bridge=bridge comment="VLANS DEPOSITO" tagged=\
bridge,ether4-CPE,ether5-EAP,sfp1-Switch vlan-ids=\
100,110,120,130,140
add bridge=bridge comment="VLANS GAMING" tagged=bridge,ether4-CPE,sfp1-Switch \
vlan-ids=200,220,210
/interface l2tp-server server
set allow-fast-path=yes authentication=mschap2 default-profile=VPN enabled=yes \
use-ipsec=required
/interface list member
add interface=bridge list=LAN
add interface=ether1-Modem list=WAN
add interface=vlan1-Empleados list=LAN
add interface=vlan2-Clientes list=LAN
add interface=vlan3-Ventas list=LAN
add interface=vlan4-Servicio list=LAN
add interface=vlan7-GamingServicio list=LAN
add interface=vlan5-GamingVentas list=LAN
add interface=vlan5-GamingVentas list=CPE_VLANS
add interface=vlan6-GamingEmpleados list=CPE_VLANS
add interface=vlan7-GamingServicio list=CPE_VLANS
add interface=vlan6-GamingEmpleados list=LAN
/ip address
add address=192.168.90.1/24 comment=Admin interface=bridge network=192.168.90.0
add address=192.168.88.1/24 comment=Servicio interface=vlan4-Servicio network=\
192.168.88.0
add address=192.168.80.1/24 comment=Ventas interface=vlan3-Ventas network=\
192.168.80.0
add address=192.168.81.1/24 comment=Empleados interface=vlan1-Empleados \
network=192.168.81.0
add address=10.5.50.1/24 comment=Clientes interface=vlan2-Clientes network=\
10.5.50.0
add address=192.168.83.1/24 comment="Control de Puerta" interface=\
vlan1-Empleados network=192.168.83.0
/ip dhcp-client
add add-default-route=no comment=CLARO disabled=no interface=ether1-Modem \
script=":local newgw [ip dhcp-client get [find interface=\"ether1-Modem\"] g\
ateway];\r\
\n:local routegw [/ip route get [find comment=\"FAILOVER WAN0\"] gateway ];\
\r\
\n:if (\$newgw != \$routegw) do={\r\
\n /ip route set [find comment=\"FAILOVER WAN1\"] gateway=\$newgw;\r\
\n}"
add add-default-route=no comment="BACKUP POR CPE" disabled=no interface=\
vlan7-GamingServicio script=":local newgw [ip dhcp-client get [find interfac\
e=\"vlan8-GamingServicio\"] gateway];\r\
\n:local routegw [/ip route get [find comment=\"FAILOVER WAN1\"] gateway ];\
\r\
\n:if (\$newgw != \$routegw) do={\r\
\n /ip route set [find comment=\"FAILOVER WAN1\"] gateway=\$newgw;\r\
\n}"
/ip dhcp-server lease
add address=192.168.90.2 client-id=1:b0:95:75:e6:f3:fa comment="Switch TP-LINK" \
mac-address=B0:95:75:E6:F3:FA server=Admin
add address=192.168.90.3 client-id=1:d8:47:32:3f:74:76 comment=EAP mac-address=\
D8:47:32:3F:74:76 server=Admin
add address=192.168.90.10 client-id=1:bc:32:5f:11:a7:ca comment=DVR \
mac-address=BC:32:5F:11:A7:CA server=Admin
add address=192.168.80.7 client-id=1:0:10:40:b8:ce:6e comment=IMP.LOGISTICA \
mac-address=00:10:40:B8:CE:6E server=Ventas
add address=192.168.90.4 client-id=1:b0:95:75:1:16:bc comment=CPE_DEPOSITO \
mac-address=B0:95:75:01:16:BC server=Admin
add address=192.168.90.5 client-id=1:3c:84:6a:7f:35:ae comment=CPE_Gaming \
mac-address=3C:84:6A:7F:35:AE server=Admin
add address=192.168.90.11 client-id=1:bc:ba:c2:8e:80:9a comment=Fichador \
mac-address=BC:BA:C2:8E:80:9A server=Admin
add address=192.168.83.2 comment="ESP8266 - Control de Puerta" mac-address=\
5C:CF:7F:F7:E2:D8 server=Empleados
add address=192.168.90.9 comment=RB750GR3-GAMING mac-address=B8:69:F4:DB:9A:66 \
server=Admin
add address=192.168.90.6 client-id=1:68:ff:7b:f6:f2:6f comment=EAP115-GAMING \
mac-address=68:FF:7B:F6:F2:6F server=Admin
add address=192.168.90.8 comment="SWITCH 3COM GAMING" mac-address=\
00:18:6E:CA:10:89 server=Admin
add address=192.168.90.7 client-id=1:b0:be:76:40:c3:aa comment=EAP225-GAMING \
mac-address=B0:BE:76:40:C3:AA server=Admin
/ip dhcp-server network
add address=10.5.50.0/24 comment=Clientes gateway=10.5.50.1
add address=192.168.80.0/24 boot-file-name=grldr comment=Ventas gateway=\
192.168.80.1 next-server=192.168.88.2
add address=192.168.81.0/24 comment=Empleados gateway=192.168.81.1
add address=192.168.83.0/24 comment="Control de Puerta" gateway=192.168.83.1 \
netmask=24
add address=192.168.84.0/24 comment="Empleados Gaming" gateway=192.168.84.1 \
netmask=24
add address=192.168.87.0/27 comment="Ventas Gaming" gateway=192.168.87.1 \
netmask=24
add address=192.168.88.0/24 boot-file-name=grldr comment=Servicio gateway=\
192.168.88.1 next-server=192.168.88.2
add address=192.168.89.0/24 comment="Servicio Gaming" gateway=192.168.89.1 \
netmask=24
add address=192.168.90.0/24 boot-file-name=grldr comment=Admin gateway=\
192.168.90.1 next-server=192.168.88.2
/ip dns
set allow-remote-requests=yes servers=8.8.8.8
/ip dns static
add address=192.168.90.1 comment=defconf name=router.lan
/ip firewall filter
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related
add action=accept chain=input comment=VPN dst-port=500,1701,4500 \
in-interface-list=WAN protocol=udp
add action=accept chain=input in-interface-list=WAN protocol=ipsec-esp
add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" \
disabled=yes
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=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" \
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=drop chain=forward comment="defconf: drop invalid" connection-state=\
invalid in-interface-list=!CPE_VLANS out-interface-list=!CPE_VLANS
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=passthrough chain=unused-hs-chain comment="place hotspot rules here" \
disabled=yes
add action=dst-nat chain=dstnat comment=VOIP dst-port=11125 in-interface-list=\
WAN protocol=udp to-addresses=192.168.80.2
add action=dst-nat chain=dstnat dst-port=11125 in-interface-list=WAN protocol=\
tcp to-addresses=192.168.80.2
add action=dst-nat chain=dstnat dst-port=5095 in-interface-list=WAN protocol=\
udp to-addresses=192.168.80.2
add action=dst-nat chain=dstnat dst-port=5095 in-interface-list=WAN protocol=\
tcp to-addresses=192.168.80.2
add action=dst-nat chain=dstnat dst-port=5101 in-interface-list=WAN protocol=\
tcp to-addresses=192.168.80.2
add action=dst-nat chain=dstnat dst-port=9000-10999 in-interface-list=WAN \
protocol=udp to-addresses=192.168.80.2
add action=dst-nat chain=dstnat dst-port=11130 protocol=udp to-addresses=\
192.168.80.4
add action=dst-nat chain=dstnat dst-port=12000-20000 in-interface-list=WAN \
protocol=udp to-addresses=192.168.80.4
add action=dst-nat chain=dstnat comment="CODIGO QR" dst-port=587 \
in-interface-list=WAN protocol=tcp to-addresses=192.168.80.2 to-ports=3306
add action=dst-nat chain=dstnat comment=MYSQL dst-port=6549 in-interface-list=\
WAN protocol=tcp to-addresses=192.168.80.2 to-ports=3306
add action=dst-nat chain=dstnat comment=Puerta dst-port=777 protocol=tcp \
to-addresses=192.168.83.2 to-ports=80
add action=masquerade chain=srcnat comment=WAN ipsec-policy=out,none \
out-interface-list=WAN
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
src-address=10.5.50.0/24
/ip firewall service-port
set ftp disabled=yes
set tftp disabled=yes
set irc disabled=yes
set h323 disabled=yes
set sip disabled=yes
set pptp disabled=yes
set udplite disabled=yes
set dccp disabled=yes
set sctp disabled=yes
/ip hotspot user
add name=vip
add name=gaming-city profile=clientes
/ip route
add check-gateway=ping distance=1 gateway=8.8.4.4
add distance=2 gateway=64.233.186.127
add comment="FAILOVER WAN0" distance=1 dst-address=8.8.4.4/32 gateway=\
181.239.136.1 scope=10
add comment="FAILOVER WAN1" distance=1 dst-address=64.233.186.127/32 gateway=\
192.168.89.1 scope=10
add distance=1 dst-address=192.168.84.0/24 gateway=vlan6-GamingEmpleados
add distance=1 dst-address=192.168.87.0/24 gateway=vlan5-GamingVentas
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set winbox address=\
32,192.168.90.0/24
set api-ssl disabled=yes
/ppp secret
add name=ezevpn profile=VPN remote-address=192.168.82.4 service=l2tp
add name=caballitovpn profile=VPN remote-address=192.168.82.3 service=l2tp
add name=catanvpn profile=VPN remote-address=192.168.82.6 service=l2tp
add name=salvadorvpn profile=VPN remote-address=192.168.82.2 service=l2tp
add name=mdpvpn profile=VPN remote-address=192.168.82.5 service=l2tp
add name=pablovpn profile=VPN remote-address=192.168.82.8 service=l2tp
add name=catan2vpn profile=VPN remote-address=192.168.82.7 service=l2tp
add name=moronvpn profile=VPN remote-address=192.168.82.9 service=l2tp
add name=abastovpn profile=VPN remote-address=192.168.82.10 service=l2tp
/system clock
set time-zone-name=America/Argentina/Buenos_Aires
/system scheduler
add interval=1d name=Reinicio on-event="/system reboot" policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
start-date=dec/01/2020 start-time=06:00:00
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
Inside the same VLAN im getting over 900mbps speeds, so thats fine, but using diferent vlans i get super slow speeds.
Example, going from 192.168.88.0 (vlan 140) to 192.168.80.0 (vlan 130) 150mbps to 200mbps max, and the router cpu usage is around 30%, enabling and disabling fastrack has no effect. What does have an effect is removing vlans id from the bridge vlans, but again i was able to get max 280mbps.
All other vlans to other vlans seems to have a similar effect, the only diference is going from the 192.168.90.0 (VLAN ID 1, untagged on bridge) to any other vlan, there i get maybe 300mbps.
Now, i used a similar setup in the past on a RB750GR3 and it did not had this issue, the only diference, as i was using non administrable switchs back then, every port on the RB750GR3 had a diferent vlan but as untagged traffic, here every port in the bridge is tagged and goes to diferent devices, an EAP (that has tagged wifis), a CPE, and a smart switch on the sfp port.