I changed my home network for a couple of Mikrotik devices a few months back: a hap ac2 and cap ac. WAN is VDSL2 synced at 80/20 Mbps. I’ve been impressed with it so far, and the cap gives good continuous coverage on the side of the house where walls impede the signal from the hap.
The last couple of days I’ve noticed an issue where a pc was downloading software updates over a long period, connected via wifi. The download speed was 3-10 Mbps… pretty slow due to the server. My concern is this ruined connectivity for all other devices, both wired and wireless. For example, video call from mobiles gave poor quality picture, the rpi could not even stream from internet radio or spotify without continuously stopping to buffer, youtube streams were pixelated, teamviewer reported it could not connect to my account and webpages were slow or unresponsive. Stopped the download and all returned to normal; restart = same problem.
For this download + 1 audio stream: CPU load reported as 1-2 %, free RAM ~ 69 MB. 5 wifi clients, 2 wired clients.
The question is, where have I gone wrong in the config?
hap:
Eth1 = WAN
Eth2 = cap ac
Eth3 = xbox
Eth4 = rpi
There are 3 VLANs defined to keep IOT and guest apart from the main network.
Both hap and cap are on 6.46.2
/caps-man channel
add band=2ghz-b/g/n control-channel-width=20mhz name=channel2g
add band=5ghz-a/n/ac extension-channel=XXXX name=channel5g
/interface bridge
add admin-mac=xxx auto-mac=no comment=defconf name=bridge vlan-filtering=yes
/interface ethernet
set [ find default-name=ether2 ] advertise=1000M-full
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1 keepalive-timeout=30 name=SSEbb use-peer-dns=yes user=xxxx
/interface wireless
# managed by CAPsMAN
# channel: 2447/20-eC/gn(17dBm), SSID: MxL, CAPsMAN forwarding
set [ find default-name=wlan1 ] band=2ghz-g/n channel-width=20/40mhz-Ce country="united kingdom" distance=indoors frequency=auto installation=indoor keepalive-frames=disabled mode=ap-bridge multicast-helper=disabled preamble-mode=short ssid=MOL wireless-protocol=802.11
# managed by CAPsMAN
# channel: 5260/20-Ceee/ac/DP(20dBm), SSID: MxL, local forwarding
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=20/40/80mhz-XXXX country="united kingdom" disabled=no distance=indoors frequency=auto installation=indoor mode=ap-bridge ssid=MxL wireless-protocol=802.11
# managed by CAPsMAN
# SSID: MxL Guest, CAPsMAN forwarding
add mac-address=76:4D:28:8B:99:30 master-interface=wlan2 mode=station name=wlan5
/interface vlan
add interface=bridge name=vlanGuest vlan-id=55
add interface=bridge name=vlanIOT vlan-id=33
add interface=bridge name=vlanMain vlan-id=88
/caps-man security
add authentication-types=wpa2-psk encryption=aes-ccm name=securityMain
add authentication-types=wpa2-psk encryption=aes-ccm name=securityIOT
add authentication-types=wpa2-psk encryption=aes-ccm name=securityGuest
/caps-man configuration
add channel=channel5g country="united kingdom" datapath.bridge=bridge datapath.client-to-client-forwarding=yes datapath.local-forwarding=yes name=CfgMain5g security=securityMain ssid=MxL
add country="united kingdom" datapath.bridge=bridge datapath.vlan-id=33 datapath.vlan-mode=use-tag name=CfgIOT security=securityIOT ssid="MxL IOT"
add channel=channel2g country="united kingdom" datapath.bridge=bridge datapath.client-to-client-forwarding=yes datapath.local-forwarding=no name=cfgMain2g security=securityMain ssid=MxL
add country="united kingdom" datapath.bridge=bridge datapath.vlan-id=55 datapath.vlan-mode=use-tag name=cfgGuest security=securityGuest ssid="MxL Guest"
/interface ethernet switch port
set 4 default-vlan-id=33 vlan-header=always-strip vlan-mode=secure
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa2-psk mode=dynamic-keys supplicant-identity=MikroTik
add authentication-types=wpa2-psk mode=dynamic-keys name="profile wlan3 IOT" supplicant-identity=MOL
/interface wireless
# managed by CAPsMAN
# SSID: MxL Guest, CAPsMAN forwarding
add area="" arp=enabled bridge-mode=enabled default-ap-tx-limit=0 default-authentication=yes default-client-tx-limit=0 default-forwarding=yes disable-running-check=no disabled=yes hide-ssid=no interworking-profile=disabled keepalive-frames=enabled l2mtu=1600 mac-address=xxxx \
master-interface=wlan1 max-station-count=2007 mode=station mtu=1500 multicast-buffering=enabled multicast-helper=default name=wlan3 security-profile=default ssid=MikroTik station-bridge-clone-mac=00:00:00:00:00:00 station-roaming=enabled update-stats-interval=disabled vlan-id=1 vlan-mode=no-tag \
wds-cost-range=50-150 wds-default-bridge=none wds-default-cost=100 wds-ignore-ssid=no wds-mode=disabled wmm-support=disabled wps-mode=push-button
# managed by CAPsMAN
# SSID: MxL IOT, CAPsMAN forwarding
add area="" arp=enabled bridge-mode=enabled default-ap-tx-limit=0 default-authentication=yes default-client-tx-limit=0 default-forwarding=yes disable-running-check=no disabled=yes hide-ssid=no interworking-profile=disabled keepalive-frames=enabled l2mtu=1600 mac-address=xxxx \
master-interface=wlan1 max-station-count=2007 mode=station mtu=1500 multicast-buffering=enabled multicast-helper=default name=wlan4 security-profile=default ssid=MikroTik station-bridge-clone-mac=00:00:00:00:00:00 station-roaming=enabled update-stats-interval=disabled vlan-id=1 vlan-mode=no-tag \
wds-cost-range=50-150 wds-default-bridge=none wds-default-cost=100 wds-ignore-ssid=no wds-mode=disabled wmm-support=disabled wps-mode=push-button
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip pool
add name=dhcp ranges=192.168.88.5-192.168.88.254
add name=poolVlanGuest ranges=192.168.55.10-192.168.55.200
add name=poolVlanIOT ranges=192.168.33.10-192.168.33.200
/ip dhcp-server
add add-arp=yes address-pool=dhcp disabled=no interface=bridge lease-time=1d name=dhcpMain
add address-pool=poolVlanGuest disabled=no interface=vlanGuest lease-time=1h name=dhcpVlanGuest
add add-arp=yes address-pool=poolVlanIOT disabled=no interface=vlanIOT lease-time=3d name=dhcpVlanIOT
/ppp profile
set *0 use-compression=no use-encryption=no
/caps-man manager
set enabled=yes
/caps-man provisioning
add action=create-dynamic-enabled hw-supported-modes=ac,an master-configuration=CfgMain5g slave-configurations=cfgGuest
add action=create-dynamic-enabled hw-supported-modes=gn master-configuration=cfgMain2g slave-configurations=cfgGuest,CfgIOT
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge comment=defconf interface=wlan1
add bridge=bridge comment=defconf interface=wlan2
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface bridge vlan
add bridge=bridge tagged=bridge vlan-ids=55,88,33
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=SSEbb list=WAN
/interface wireless cap
#
set bridge=bridge caps-man-addresses=127.0.0.1 enabled=yes interfaces=wlan1,wlan2 static-virtual=yes
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=192.168.88.0
add address=192.168.55.1/24 interface=vlanGuest network=192.168.55.0
add address=192.168.33.1/24 interface=vlanIOT network=192.168.33.0
/ip dhcp-client
add comment=defconf interface=ether1 script=":if (\$bound=1) do {\
\n\
\n# the name (within the domain) to update -- must already exist!\
\n:local host @\
\n\
\n# the domain name\
\n:local domain mylittlemi.com\
\n\
\n# key for namecheap updates\
\n:local password 784f045bcb3b4fe1a248b86735b62f6b\
\n\
\n# get wan IP (easy in the DHCP script)\
\n:local wanip \$\"lease-address\"\
\n\
\n:log info \"DHCP got WAN IP of \$wanip\"\
\n\
\n:local url \"https://dynamicdns.park-your-domain.com/update\?host=\$host&domain=\$domain&password=\$password&ip=\$wanip\"\
\n\
\n#:log info \"URL args: \$url\"\
\n\
\n# this should to the deed! (note: no verification is done here, check namecheap yourself at first!)\
\n/tool fetch url=\$url mode=https keep-result=no\
\n\
\n} else {\
\n#:log info \"DHCP was unbound\"\
\n}"
/ip dhcp-server lease
add address=192.168.88.241 client-id=1:44:d2:44:6e:bc:7 mac-address=44:D2:44:6E:BC:07 server=dhcpMain
add address=192.168.88.5 client-id=1:c4:ad:34:6d:43:4c mac-address=C4:AD:34:6D:43:4C server=dhcpMain
/ip dhcp-server network
add address=192.168.33.0/24 dns-server=1.1.1.1,4.4.4.4 domain=iot.xxx gateway=192.168.33.1 netmask=24
add address=192.168.55.0/24 dns-server=1.1.1.1,4.4.4.4 domain=guest.xxx gateway=192.168.55.1 netmask=24
add address=192.168.88.0/24 comment=dhcpMain dns-server=1.1.1.1,4.4.4.4,8.8.8.8 gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes servers=1.1.1.1,8.8.8.8
/ip dns static
add address=192.168.88.1 name=router.lan
/ip firewall address-list
add address=192.168.88.2-192.168.88.254 list=allowed_to_router
add address=0.0.0.0/8 comment=RFC6890 list=not_in_internet
add address=172.16.0.0/12 comment=RFC6890 list=not_in_internet
add address=192.168.0.0/16 comment=RFC6890 list=not_in_internet
add address=10.0.0.0/8 comment=RFC6890 list=not_in_internet
add address=169.254.0.0/16 comment=RFC6890 list=not_in_internet
add address=127.0.0.0/8 comment=RFC6890 list=not_in_internet
add address=224.0.0.0/4 comment=Multicast list=not_in_internet
add address=198.18.0.0/15 comment=RFC6890 list=not_in_internet
add address=192.0.0.0/24 comment=RFC6890 list=not_in_internet
add address=192.0.2.0/24 comment=RFC6890 list=not_in_internet
add address=198.51.100.0/24 comment=RFC6890 list=not_in_internet
add address=203.0.113.0/24 comment=RFC6890 list=not_in_internet
add address=100.64.0.0/10 comment=RFC6890 list=not_in_internet
add address=240.0.0.0/4 comment=RFC6890 list=not_in_internet
add address=192.88.99.0/24 comment="6to4 relay Anycast [RFC 3068]" list=not_in_internet
/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="Accept local traffic to CAPsMAN" dst-port=5246,5247 in-interface-list=LAN protocol=udp src-address=127.0.0.1
add action=accept chain=input comment=Spotify connection-state=established,related dst-port=4070 protocol=tcp
add action=drop chain=input comment="defconf: drop all not coming from LAN" in-interface-list=!LAN
add action=accept chain=input src-address-list=allowed_to_router
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=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related
add action=accept chain=forward comment="defconf: accept established,related, untracked" connection-state=established,related,untracked
add action=accept chain=input in-interface-list=LAN protocol=icmp
add action=drop chain=input comment="defconf: accept ICMP" in-interface-list=WAN protocol=icmp
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
add action=drop chain=forward comment="Drop incoming packets that are not NATted" connection-nat-state=!dstnat connection-state=new in-interface-list=WAN log=yes log-prefix=!NAT
add action=drop chain=forward in-interface=vlanIOT out-interface=vlanGuest
add action=drop chain=forward in-interface=vlanIOT out-interface=vlanMain
add action=drop chain=forward in-interface=vlanGuest out-interface=vlanMain
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN
/ip route rule
add action=lookup-only-in-table dst-address=192.168.88.0/24 interface=vlanMain table=main
/ip service
set telnet disabled=yes
set ftp disabled=yes
set ssh port=2222
set api disabled=yes
/ip ssh
set allow-none-crypto=yes forwarding-enabled=remote
/system clock
set time-zone-name=Europe/London
/system identity
set name=MxL
/system leds
add leds=user-led type=poe-fault
/system leds settings
set all-leds-off=after-1min
/system script
add dont-require-permissions=no name=dhcpMainDN owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=":if (\$bound=1) do {\
\n\
\n# the name (within the domain) to update -- must already exist!\
\n:local host @\
\n\
\n# the domain name\
\n:local domain xxx\
\n\
\n# key for namecheap updates\
\n:local password xxxx\
\n\
\n# get wan IP (easy in the DHCP script)\
\n:local wanip \$\"lease-address\"\
\n\
\n:log info \"DHCP got WAN IP of \$wanip\"\
\n\
\n:local url \"https://dynamicdns.park-your-domain.com/update\?host=\$host&domain=\$domain&password=\$password&ip=\$wanip\"\
\n\
\n#:log info \"URL args: \$url\"\
\n\
\n/tool fetch url=\$url mode=https keep-result=no\
\n\
\n} else {\
\n#:log info \"DHCP was unbound\"\
\n}"
/tool bandwidth-server
set enabled=no
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN