Community discussions

MikroTik App
 
DeltaCreek
just joined
Topic Author
Posts: 10
Joined: Sun Jun 19, 2022 11:35 pm

Trouble with Unifi switch on network

Mon Jun 20, 2022 11:08 am

Hello. I recently purchased and set up my first Miktrotik router (Hex S). My previous set up was as follows:
Cable modem/router -> Ubiquiti Unifi Flex Mini -> 2 Unifi access points
I switched it to:
Cable modem -> Miktrotik Hex S -> Unifi AP
                               -> Unifi Flex Mini -> Unifi AP
When the Unifi Flex Mini is on the network, the internet connection was spotty and browsing was slow. My wife and I frequently saw warnings on our iPhones that our Wifi wasn't able to connect to the internet. The Unifi app reported that the Flex Mini was offline every few hours. I then removed the Unifi Flex Mini from the network and everything appeared to operate normally.

Has anyone experienced issues when a Unifi switch is connected to a MIkrotik router? How can I debug what's happening?

Thanks.
 
DeltaCreek
just joined
Topic Author
Posts: 10
Joined: Sun Jun 19, 2022 11:35 pm

Re: Trouble with Unifi switch on network

Mon Jun 20, 2022 8:49 pm

My wife told me the internet has been terrible all day so maybe it wasn’t the switch after all.

I’m going to try to set up a script to monitor WAN connectivity.

From the outside, things appear fine:

Image
 
User avatar
Buckeye
Forum Veteran
Forum Veteran
Posts: 893
Joined: Tue Sep 11, 2018 2:03 am
Location: Ohio, USA

Re: Trouble with Unifi switch on network

Mon Jun 20, 2022 10:20 pm

My wife told me the internet has been terrible all day so maybe it wasn’t the switch after all.
My experience is that switches ether work or they don't, although I have seen some weird problems with some really old switches (that probably had a bad memory chip) that would create a lot of corrupted packets.

The fact that the same switch worked with the previous router suggests that the problem is probably more likely to be a configuration issue with the new hEX router.

What has changed?
  • ISP
  • Cable Modem/router
  • Anything else?
Is the Cable modem now in true bridge mode, or is it still the Cable Modem/Router (what type, and what ISP?). Is the modem/router in passthrough mode? I have seen many problems reported with passthrough on ATT (especially PACE modems).

What feature of the hEX encouraged you to replace the integrated router in the cable modem? Are you now using vlans?

What speed is your cable service?
 
DeltaCreek
just joined
Topic Author
Posts: 10
Joined: Sun Jun 19, 2022 11:35 pm

Re: Trouble with Unifi switch on network

Tue Jun 21, 2022 1:26 am

I'm on Virgin Media in the UK using the Hub 3.0. I'm not sure what kind of connection the device has to the Mikrotik router when it's in modem mode. I enabled the DHCP client on the Mikrotik router and everything appeared to go well from there.

I removed the Mikrotik router from the network and re-enabled the Virgin device in router mode. Everything seems a lot smoother. For example, I set up some basic internet monitoring on a Raspberry Pi and this is the result when Mikrotik was the router:
Jun 20 22:14:51 check[82639]: netcat succeeded
Jun 20 22:14:51 check[82641]: PING google.com (142.250.200.14) 56(84) bytes of data.
Jun 20 22:14:54 check[82641]: --- google.com ping statistics ---
Jun 20 22:14:54 check[82641]: 3 packets transmitted, 1 received, 66.6667% packet loss, time 2061ms
Jun 20 22:14:54 check[82641]: rtt min/avg/max/mdev = 29.474/29.474/29.474/0.000 ms
While netcat succeeded, ping reported packet loss every time (every 30 seconds). With the Virgin Router, there is no packet loss at all.
Jun 20 23:21:03 check[1564]: netcat succeeded
Jun 20 23:21:03 check[1566]: PING google.com (142.250.187.206) 56(84) bytes of data.
Jun 20 23:21:05 check[1566]: --- google.com ping statistics ---
Jun 20 23:21:05 check[1566]: 3 packets transmitted, 3 received, 0% packet loss, time 2003ms
Jun 20 23:21:05 check[1566]: rtt min/avg/max/mdev = 14.177/18.291/24.148/4.253 ms
I like what I saw with the Mikrotik router. I originally got it because my Unifi network application changed IP addresses and I had some difficulty communicating that with the Flex Mini switch. There is a recovery mode where the switch checks for firmware on a static route, however I was unable to use that subnet with the Virgin router. Hence the Mikrotik.

Do you think this is a configuration problem or something to do with the router's modem mode? How would you recommend I debug the issue?
 
DeltaCreek
just joined
Topic Author
Posts: 10
Joined: Sun Jun 19, 2022 11:35 pm

Re: Trouble with Unifi switch on network

Tue Jun 21, 2022 10:35 am

The network has been rock solid since reverting back to router mode and removing the Mikrotik device. I don't know how Ubiquiti calculates its WiFi score, but the stability is evident in the graphs from the two access points.

IMG_2375 (1).png
IMG_2376 (1).png

I hope I the router won't go to waste but I'm not sure yet how to diagnose what's going wrong.
You do not have the required permissions to view the files attached to this post.
 
erlinden
Forum Guru
Forum Guru
Posts: 1957
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: Trouble with Unifi switch on network

Tue Jun 21, 2022 10:49 am

Can you please share your hEX S config (/export file=anynameyoulike) don't forget to remove any personal information?
Do you have any static IP addresses configured?

What is the purpose of the MikroTik router (just curious)?
 
User avatar
Buckeye
Forum Veteran
Forum Veteran
Posts: 893
Joined: Tue Sep 11, 2018 2:03 am
Location: Ohio, USA

Re: Trouble with Unifi switch on network

Thu Jun 23, 2022 12:05 pm

I like what I saw with the Mikrotik router. I originally got it because my Unifi network application changed IP addresses and I had some difficulty communicating that with the Flex Mini switch. There is a recovery mode where the switch checks for firmware on a static route, however I was unable to use that subnet with the Virgin router. Hence the Mikrotik.

Do you think this is a configuration problem or something to do with the router's modem mode? How would you recommend I debug the issue?
I have Unifi Access points at home, but don't use any Unifi (or any Ubiquiti, e.g. edgemax) switches, I have a mutt network of MikroTik, TP-Link, and Netgear vlan-aware switches, plus multiple "dumb" switches (TP-Link, TrendNet, even a bottom of the barrel Tenda 5 port 1Gbps). My main home router is a Ubiquiti ER-X and I have a "lab" with several ER-X's and an RB760iGS. I use a Raspberry Pi running the UniFi controller software instead of a UniFi CloudKey for the UniFi Controller.

Since I don't have any UniFi switches, I can't give you any first hand experience there, but I would have thought all you would have needed to do would be editing the network, but in worst case, using reset button on the flex mini switch, and then readopting in the new network.

As far as what in causing problems, I don't have one, but the Super Hub 3 is on this list of modems to avoid (due to it being based on the arguably defective Puma 6 chipset). Just do a google search of "puma 6" to see what I mean.
 
DeltaCreek
just joined
Topic Author
Posts: 10
Joined: Sun Jun 19, 2022 11:35 pm

Re: Trouble with Unifi switch on network

Fri Jun 24, 2022 10:39 am

I got the router because I moved my Unifi network application so a new server and the switch could no longer communicate with it. I tried the available adoption methods but they weren't working. I wanted to try the recovery method for the switch and it requires a server running on 192.168.1.99. That subnet is reserved on the Virgin router so I got the Mikrotik. Plus, it's fun.

This is my configuration
# jun/20/2022 22:13:35 by RouterOS 6.49.6
# software id = 87J3-A1J9
#
# model = RB760iGS
# serial number = <redacted>
/interface bridge
add admin-mac=18:FD:74:07:D6:C6 auto-mac=no comment=defconf name=bridge
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip dhcp-server option
add code=43 name=unifi value=<redacted>
/ip pool
add name=dhcp ranges=192.168.1.10-192.168.1.254
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge name=defconf
/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=sfp1
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
/ip address
add address=192.168.1.1/24 comment=defconf interface=ether2 network=\
    192.168.1.0
/ip cloud
set ddns-update-interval=1m
/ip dhcp-client
add comment=defconf disabled=no interface=ether1 use-peer-dns=no
/ip dhcp-server lease
add address=192.168.1.10 client-id=1:e0:63:da:2a:36:f1 mac-address=\
    E0:63:DA:2A:36:F1 server=defconf
add address=192.168.1.20 client-id=1:e4:5f:1:c2:f2:13 mac-address=\
    E4:5F:01:C2:F2:13 server=defconf
add address=192.168.1.11 client-id=1:b4:fb:e4:2e:14:3e mac-address=\
    B4:FB:E4:2E:14:3E server=defconf
add address=192.168.1.12 mac-address=74:83:C2:FA:D5:3D server=defconf
/ip dhcp-server network
add address=192.168.1.0/24 comment=defconf dns-server=192.168.1.1 gateway=\
    192.168.1.1 netmask=24
/ip dns
set allow-remote-requests=yes servers=1.1.1.1,1.0.0.1
/ip dns static
add address=192.168.1.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=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=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=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
/ip ssh
set always-allow-password-login=yes
/system clock
set time-zone-name=Europe/London
/system leds
set 0 disabled=yes
/tool e-mail
set address=<redacted>
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN

Who is online

Users browsing this forum: Bing [Bot], derolf and 30 guests