CCR2004-1G-2XS-PCIe and FreeBSD

Hi,

I have a really easy question: Has anyone be able to get the CCR2004-1G-2XS-PCIe running on FreeBSD? If so, how?

I’ll give a bit of background here: I’ve had various problems with the card and recent ROS versions. I’m always using the default config of the ROS version I’m testing and do a full config reset after every update (to be sure I’ve not messed up the config). Running FreeBSD 13.1 the card is detected and 4 alc[0-3] interfaces are created.
On 7.2.3 setting one of the interfaces UP, didn’t have any effect and made the ifconfig command hang indefinitely.
On 7.3.1 setting the interface UP does not hang anymore, I see the interface get into state RUNNING on the ROS side but i only see traffic originating from the host being forwarded to the SFP+ interface, i don’t see any returning traffic (neither on ROS, nor FreeBSD)
On 7.4 I don’t see a difference to 7.3.1.

It makes no difference if I configure the pass through feature or not; no traffic flowing towards the host. Also the interface speed is wrongly displayed on FreeBSD (1G instead of 10G).
Generally I’d agree on this is a problem with me being stupid and unable to configure the card properly, BUT when i boot a recent Linux (5.15.0) instead of the FreeBSD while keeping the ROS config untouched, things start to work without any problem.

I’ve been into discussion with Mikrotik Support about this, but they stooped replying about a month ago (SUP-82886).

As I’m seeing this a the moment, there is a problem with the alc(4) drivers, more precisely with this addition from last year.

So if YOU have this running, please lend me a hand and point me to why I’m stupid.
If some Mikrotik staff is reading, it would be nice to at least acknowledge there is a problem (or at least someone is reading the ticket :slight_smile: so I can stop running in circles.

Thanks!

Really, no one? Not even the cheeky cat or the jester donkey?
Show some love for the world’s best server OS (;

Not having CCR2004-1G-2XS-PCIe nor runing FreeBSD, I can’t help…

So it seams I’m the only one trying this setup?
Why would Mikrotik advertise something that’s clearly not working?

I still have hope, but I’m running out of patience sigh

Some instructions inside
https://i.mt.lv/cdn/product_files/CCR2004-1G-2XS-PCIe_220351.pdf

Hi!

I have got mine delivered last week and I´m planning to put it into my Opnsense box, probably this week. This has FreeBSD 13.1, I will report about my progress, when I get so far.
So no you are not alone. :slight_smile:

If it won´t work with BSD, I will use it with Proxmox and virtualize the Opnsense running on it.

I did not find much info on BSD support, but there is a howto for Proxmox in German:
https://blog.mikrotik-store.eu/2022/05/10/mikrotik-ccr2004-1g-2xs-pcie-inbetriebnahme-25gbit-s-netzwerkarte-fuer-proxmox-system/

Regards
W

Where do you see any instructions regarding FreeBSD in there?

Nowhere, but Proxmox will be my solution to still run BSD if it can´t run on bare metal. Did you read my post?

I did not find much info on BSD support, but > there is a howto for Proxmox > in German:

W

unfortunately the BSD kernel is often forgotten / lagged behind the linux kernel so it wouldn’t surprise me if its close but not working.

Perhaps email support directly to try get more specific help. I used to use FreeBSD everywhere and got over the management overhead of generally older binaries or different in just enough way to be annoying compared to 90% of other servers out there, and with dockers etc BSD jail’s aren’t as attractive anymore. That’s just my opinion of course.

Largely agree, however if you want to have an open source firewall or NAS distribution, the Linux variants are nowhere near the BSD ones (the Linux ones are getting better and better over time).
I have both my NAS and my Firewalls on BSD and the getting compatible new (old) hardware part was always a pain in the a… But once you get them working, I always had rock solid and highly performant systems.
My last chance to get the MT card running is to go virtual, it has some benefits.
Anyway my chance to try it this week is gone, probably next week then.

Tested with 7.4.1, same story.

  • link is detected correctly
  • interface speed is incorrectly reported (1000baseT instead of 10000baseSR)
  • outgoing traffic passes the interface and is correctly passed through to sfp28-1
  • incoming traffic not visible, neither on sfp28-1, ether-pcie1 nor alc0 on host

I considered getting one for SSD NAS build, but no FreeBSD/TrueNAS support just kills that use case.
It’s a shame because it would be interesting hardware to test and play with…

Well, Mikrotik advertises FreeBSD support… whatever that means ¯_(ツ)_/¯
I don’t see this working as of now.

Hi!
I managed to do a short test yesterday, and not surprisingly I can confirm: on Opnsense 22.7 (OpenBSD 13.1) the 4 alcX interfaces show up, link is detected at 1G. I was using an SFP+ 10G direct attach cable. Had no time for more…
I did not check which ROS did it have. I will check next time with ROS 7.5beta, but I have not much hope.
I will probably open a ticket with MT as well.
Too bad, but I hope they will fix this, or maybe provide us with some advice?

W

FreeBSD is indeed a wonderfull OS, but it’s most likely up to the kernel developers to implement the Mikrotik-specific stuff in the alc driver, that have been done to the Linux kernel one.

There is a change to the FreeBSD alc(4) driver from Gatis Peisenieks <gatis@mikrotik.com> here https://cgit.freebsd.org/src/commit/sys/dev/alc?id=77b637338a3656d4ccedb9798a3f98ac283962f4. Its the same Gatis implementing all the Linux driver side here https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/log/drivers/net/ethernet/atheros/atl1c/atl1c_main.c, only that there are a lot more commits to the linux driver as to the FreeBSD one. Also both sources show the last commit in May last year, so Mikrotik might believe development is finished.

Also, how should someone from the FreeBSD team know all the quirks of the Mikrotik NIC without the ROS side being open-sourced?

I have searched for the changes regarding the alc driver, but there have been none since the commit of Konstantin Belousov. Does not seem, like too much going on.
The commit was already introduced into FreeBSD 12.3.

https://www.bsdforen.de/threads/freebsd-12-3-erschienen.36360/

Also that guy Konstantin does not seem to work for MT at least according to his LinkedIn profile.

Yea, he is the one that handled this bug https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256000. Has nothing to do with Mikrotik.

Hi, I got to test my card again, albeit for a short period of time only. ROS 7.5b8, FreeBSD 13.1.
SFP+ 10G Direct attach between an CSS610 and sfp1 on the card.
It sets the state of alc0 correctly up and down. If I send something into the port while set into the passthrough mode I see the traffic via torch from RoS.
The same is true if I don´t use passthrough, but just bridge the real interface and the alc0 together.
However I did not get a lease on the BSD side. (I checked, I can get a lease on the ROS bridge.)
I did not get to do more, but it again does not look too well. Packets seem to arrive from BSD into the card, but nothing comes back into the alc0
I will do more testing.

W

Hi,

I opened a ticket at MT with some additional infos, I hope to get some help or at least some statement about BSD support. Let’s see.
W