Не работает sfp модуль mikrotik

Обновлено: 05.07.2024

MikroTik RouterOS supports various types of Ethernet interfaces - ranging from 10Mbps to 10Gbps Ethernet over copper twisted pair, 1Gbps and 10Gbps SFP/SFP+ interfaces and 40Gbps QSFP interface. Certain RouterBoard devices are equipped with a combo interface that simultaneously contains two interface types (e.g. 1Gbps Ethernet over twisted pair and SFP interface) allowing to select the most suitable option or creating a physical link failover. Through RouterOS, it is possible to control different Ethernet related properties like link speed, auto-negotiation, duplex mode, etc, monitor a transceiver diagnostic information and see a wide range of Ethernet related statistics.

Properties

  • disabled - the interface will not use ARP
  • enabled - the interface will use ARP
  • local-proxy-arp - the router performs proxy ARP on the interface and sends replies to the same interface
  • proxy-arp - the router performs proxy ARP on the interface and sends replies to other interfaces
  • reply-only - the interface will only reply to requests originated from matching IP address/MAC address combinations which are entered as static entries in the ARP table. No dynamic entries will be automatically stored in the ARP table. Therefore for communications to be successful, a valid static entry must already exist.
  • Note1: Auto-negotiation should not be disabled on one end only, otherwise Ethernet Interfaces may not work properly.
  • Note2: Gigabit Ethernet and NBASE-T Ethernet links cannot work with auto-negotiation disabled.


Read-only properties

Property Description
running (yes | no) Whether interface is running. Note that some interface does not have running check and they are always reported as "running"
slave (yes | no) Whether interface is configured as a slave of another interface (for example Bonding)
switch (integer) ID to which switch chip interface belongs to.

Menu specific commands

Property Description
blink ([id, name]) Blink Ethernet leds
monitor ([id, name]) Monitor ethernet status. Read more>>
reset-counters ([id, name]) Reset stats counters. Read more>>
reset-mac-address ([id, name]) Reset MAC address to manufacturers default.
cable-test (string) Shows detected problems with cable pairs. Read More >>

Monitor

To print out a current link rate, duplex mode, and other Ethernet related properties or to see detailed diagnostics information for transceivers, use /interface ethernet monitor command. The provided information can differ for different interface types (e.g. Ethernet over twisted pair or SFP interface) or for different transceivers (e.g. SFP and QSFP).

  • disabled - negotiation disabled
  • done - negotiation completed
  • failed - negotiation failed
  • incomplete - negotiation not completed yet
  • short - support short cables
  • standard - support standard cables
  • link-ok - the card is connected to the network
  • no-link - the card is not connected to the network
  • unknown - the connection is not recognized (if the card does not report connection status)

Example output of an Ethernet status:

Example output of a SFP status:

Detect Cable Problems

Cable test can detect problems or measure the approximate cable length if the cable is unplugged on the other end and there is therefore, "no-link". RouterOS will show:

  • which cable pair is damaged
  • the distance to the problem
  • how exactly the cable is broken - short-circuited or open-circuited

This also works if the other end is simply unplugged - in that case, the total cable length will be shown.

Here is example output:

In the above example, the cable is not shorted but “open” at 4 meters distance, all cable pairs equally faulty at the same distance from the switch chip.

Currently cable-test is implemented on the following devices:

  • CCR series devices
  • CRS1xx series devices
  • CRS2xx series devices
  • OmniTIK series devices
  • RB450G series devices
  • RB951 series devices
  • RB2011 series devices
  • RB4011 series devices
  • RB750Gr2
  • RB750UPr2
  • RB751U-2HnD
  • RB850Gx2
  • RB931-2nD
  • RB941-2nD
  • RB952Ui-5ac2nD
  • RB962UiGS-5HacT2HnT
  • RB1100AHx2
  • RB1100x4
  • RBD52G-5HacD2HnD
  • RBcAPGi-5acD2nD
  • RBmAP2n
  • RBmAP2nD
  • RBwsAP-5Hac2nD
  • RB3011UiAS-RM
  • RBMetal 2SHPn
  • RBDynaDishG-5HacD
  • RBLDFG-5acD
  • RBLHGG-5acD

Note: Currently cable-test is not supported on Combo ports.

Stats

Using /interface ethernet print stats command, it is possible to see a wide range of Ethernet related statistics. The list of statistics can differ between RouterBoard devices due to different Ethernet drivers. The list below contains all available counters across all RouterBoard devices. Most of the Ethernet statistics can be remotely monitored using SNMP and MIKROTIK-MIB.

For example, output of Ethernet stats on hAP ac2 device:

Switch

Sub-menu: /interface ethernet switch

This submenu allows configuration of certain RouterBoard switch chip features. Read more >>.

PoE out

Sub-menu: /interface ethernet poe


А в подарок дали роутер — Sercomm rv6699. Начал тестировать. Гигабит действительно есть.

Зашел в свою любимую игру – а там пинг на целую миллисекунду меньше, чем раньше. Моему счастью не было предела, но продлилось оно только до первого рабочего дня.

1. Сброс настроек — только удаленно

Свой любимый Mikrotik RB3011 я использую для разблокировки интернета, для доступа по VPN к корпоративным ресурсам и всему такому. Чтобы выкинуть провайдерский роутер из головы, поставил его в бридж. Как и на других китайских роутерах это делается с помощью отключения функции роутера. Перезагрузил, все завелось, Mikrotik получил адрес от провайдера по DHCP, все хорошо.

На утро следующего дня встаю и вижу, что интернет не работает. Бридж не доступен по веб интерфейсу, микротик по DHCP адрес не получает. Перезагрузка не помогает.

Пришлось звонить на горячую линию, меня попросили на глазах у оператора горячей линии дважды перезагружать роутер, объяснять, что такое бридж, потом ждать ответа старшего оператора, потом звонок сорвался…

Цирковую эпопею, происходившую в тот день я опущу. В конце концов мне сбросили настройки роутера по TR-069, но 2 часа рабочего времени уже были потеряны.

Такой уровень зависимости от провайдера абсолютно неприемлем, факт того, что сбросить настройки роутера кнопкой нельзя просто ужасает.

2. Ограничения на загрузку файлов

У меня есть сервер на тарифе «Большой диск», там у меня лежат все бэкапы и файловая помойка и контроллер домена. Все на одном гиге оперативки и Windows Server Core.



Подключается тут

На большой диск я часто бэкапирую виртуалки, которые кручу у себя дома. Приятно видеть, как большие файлы улетают в облако на скорости 100 мегабайт в секунду, жаль, что не долго. Когда я начал бэкапировать свои файлы на гигабитной скорости, маршрут до моего сервера начал выглядеть так:


Да! Залить куда-то больше 10 гигабайт на скорости, за которую ты заплатил нельзя, иначе блэкхол. Проблема не встречается на скоростях ниже, только на постоянном гигабите и лечится только перезагрузкой роутера. То есть в дни, когда сеть не нагружена залить большой файл куда либо не представляется возможным.

Вот так и получается, что гигабит провели, а пользоваться не провели.

3. Ограничение на сканирование портов

В традиционной китайской прошивке есть фаерволл, который почему-то работает даже в отключенном состоянии. Причем работает и туда и сюда. Сканировать сеть нельзя ни с того, ни с другого конца NAT.

Когда я начал пентестить свои серверы, начал сканировать порты, меня внезапно отключило от интернета. Я уже был знаком с закидонами этого роутера и начал проверять, есть ли сеть на других машинах. И оказалось, что есть.

Злая коробка не дает сканировать порты, но она не блэкхолит конкретный IP адрес, она сразу отключает тебя от интернета.

Проводим пользоваться

А ниже по тексту я расскажу о том, как заменить провайдерское оборудование на свое. Расскажу обо всем, что хотел бы знать тогда, когда мне мешал мой старый роутер.

Но сначала нам понадобятся:

▍Переходники


Про разъемы. Они бывают либо SC/UPC (синие), либо SC/APC (зеленые). Все абонентское оборудование во всем мире поставляется с синими UPC коннекторами, а головное с зелеными, поэтому, если у вас дома проведен зеленый коннектор, вам потребуется адаптер SC/APC Female на SC/UPC Male.

Кулибины, которые с помощью подтачивания вставляли UPC в APC тоже встречались, но они рапортовали о проблемах, поэтому, купите переходник на алиэкспрессе.

▍SFP-модуль


На выбор предлагаю два варианта, которые все еще находятся в производстве и на которых можно поменять SN, и PLOAM пароль.

  1. SFP GPON ONU Stick
  2. C-Data FD511GX-RM0

Найти этот GPON ONU Stick можно на алиэкспрессе по количеству покупок. Это самый популярный лот. Еще его можно найти по названию модели — DFP-34G-2C2.

Настраиваем

Предположим, что все уже куплено, что провод уже воткнут в переходник, а переходник воткнут в SFP. Дело осталось за малым.

1. Вынимаем данные авторизации

В последний раз входим по адресу веб интерфейса старого роутера и входим в традиционный китайский интерфейс под логином/паролем mgts/mtsoao, переходим в раздел: Configure → GPON.


Выписываем эти два значения и навсегда прощаемся с этой коробкой.

Не беспокойтесь, МГТС не скрывают эти данные от вас, это (почти) ваш роутер, только не спрашивайте эти данные у сотрудников МГТС, они сами не знают.

2. Настраиваем Mikrotik

Модуль из коробки стоит в бридже. Несмотря на то, что интернет, телефония и все прочее у МГТС распиханы по отдельным VLAN’ам, пакеты через бридж доходят без тэга. Поэтому, осталось сделать всего ничего.

2.1. Вешаем DHCP клиент на интерфейс SFP1

Открываем Winbox, переходим в IP → DHCP Client и вешаем DHCP клиент на интерфейс sfp1, все как на картинке.

Это позволит нам пользоваться интернетом сразу, как только он появится.


Это же самое командой:

2.2. Назначаем IP адрес на интерфейс SFP1

Далее, в разделе IP → Addresses нужно добавить новый IP адрес. Делаем как на картинке.

Таким образом мы получим доступ к веб интерфейсу SFP модуля по его IP адресу.


То же самое, только командой:

3. Настраиваем SFP

Как только назначили IP на интерфейс, входим в стандартную китайскую народную вебморду под традиционным admin/admin и переходим в раздел: Network → PON → SN

Там вводим те данные, что мы получили из роутера, предоставленного провайдером.


Жмем Submit и перезагружаем модуль.

Теперь нужно проверить, авторизовала ли вас головная станция. Посмотреть это нужно в разделе: Status → PON Inform.


Если авторизация прошла успешно, то поздравляю. Головная станция сначала авторизует, а потом выдаст интернет, ожидание займет не более 5 минут.

Проблемы и решения

Этот модуль я эксплуатирую уже без малого, год как, поэтому, о проблемах тоже расскажу.

1. Перегрев

На ощупь модуль горячий, замеры температуры на поверхности корпуса инфракрасным термометром показывали температуру около 55 градусов по цельсию при комнатной температуре в 25 градусов.

Летом он действительно может намертво зависать, модуль целиком выключится и не поднимется сам. Я не замечал проблем с перегревом в зимнее время года, когда температура окружающей среды составляла от -10 до +10 градусов.

Установка радиатора от NVME накопителя прямо на корпус без термопрокладок и термопасты решило проблему перегрева.

2. Падение линка

Прошивка DFP-34G-2C2, как и другая традиционная китайская прошивка имеет те же самые проблемы, что и sercomm rv6699. Примерно раз в месяц-два что SFP модуль что и sercomm теряли соединение с интернетом, но получали адрес по DHCP и были доступны по веб интерфейсу.

Происходит это ночью, поэтому предполагаю, что это связано с работами головной станции. Если есть специалисты, которые могут пояснить подробнее, буду рад прочитать ответ.

Штатно перезагрузить SFP помощью Netwatch мы не можем, в нем нет SSH, только Telnet, но у нас есть Watchdog, который перезагрузит все.

Мониторить доступность наш Watchdog будет с помощью ICMP на IP адрес роутера провайдера. Делаем трассировку до любого места в интернете и останавливаемся на втором хопе. Второй хоп и будем мониторить.


В Winbox’e переходим в: System → Watchdog

и вписываем IP адрес второго хопа, как на картинке. Если указанный IP адрес перестал отвечать на ICMP, то роутер вместе с SFP модулем перезагрузится.

Sun Jul 22, 2018 4:59 pm

I have bought new hEX S and i am having problem with SFP link with other devices (also mikrotik).
Sometimes it does work after a few hard resets. but usually doesn't work.

I have tried with several mikrotik SFP modules (all are the same), with different haredware (CCR, hex poe, switch), and different optical cables. nothing seems to work.

I did new netinstall and problem still persist.

To summarise. module is present and working, but no link. module and cables tried with hex s are working normal with other mikrotik devices.

Looking forward for your answer. maybe haredware problem?

Just to say. routeros 6.42.6, and latest firmware are on board.

Posts: 2353 Joined: Tue Feb 18, 2014 12:56 am Location: Netherlands / Nīderlande

Sun Jul 22, 2018 6:20 pm

Loving my freedom and so, no Twitter, no Meta/Facebook/Instagram/WhatsApp, no Apple and no Alphabet/Google, no Amazon/Cloudfront/AWS. However, 'happy' with giving money to Italy.

Running: RouterOS 7.1rc5 and 6.49RC / Winbox 3.31 64bits

Posts: 28 Joined: Fri Jan 02, 2015 12:52 pm

Sun Jul 22, 2018 10:56 pm

Posts: 2353 Joined: Tue Feb 18, 2014 12:56 am Location: Netherlands / Nīderlande

Mon Jul 23, 2018 1:05 am

You can look at this page how compatible your SFP is with other Mikrotik stuff. It is not up-to-date I know.

And as you indicated yourself, your RB760iGS can be defective.

Loving my freedom and so, no Twitter, no Meta/Facebook/Instagram/WhatsApp, no Apple and no Alphabet/Google, no Amazon/Cloudfront/AWS. However, 'happy' with giving money to Italy.

Running: RouterOS 7.1rc5 and 6.49RC / Winbox 3.31 64bits

Posts: 28 Joined: Fri Jan 02, 2015 12:52 pm

Mon Jul 23, 2018 6:28 pm

Ok. i have tried everything. nothing worked.
I have sent file to mikrotik support.
In meantime. will send rb to seller.
Thx for support. Posts: 28 Joined: Mon Jul 30, 2018 5:54 pm

Mon Jul 30, 2018 6:18 pm

I've just observed exactly the same behavior on hEX S (6.42.6) with different SFP modules, including officially supported S-85DLC05D and Mikrotik's 3m DAC, and many setups (RB2011, RB3011, TP-Link MC220) - when one party is hEX S, link is down (nego done, rx power -15, but no-link); any other two boxes in lab communicate via fiber well.

Also tried downgrading to 6.42.2 and 6.41.4, in all tested versions the behavior is the same. I've never seen link up on hEX S' sfp1.

Posts: 28 Joined: Mon Jul 30, 2018 5:54 pm

Tue Jul 31, 2018 1:23 pm

I've done dozens of tests so far. Following steps:

- downgrading packages to 6.42.5
- reboot
- downgrading firmware to 6.42.5
- shutdown
- remove power, wait 10s
- restore power and let the router boot with inserted SFP module (this seems to be important)

can quite reliably make sfp1 work again. Also it seems that first cold boot after firmware upgrade/downgrade without inserted SFP module starts this "permanent no-link problem" and the problem does not disappear by rebooting/powercycling; the only recovery, I was successful with, is performing the steps above.

In addition, when SFP module is inserted/removed to/from running router, copper ports lose link for approximately 4 seconds (link down/up events can be seen in router's log as well). Maybe this is due to CPU-to-switch lane reconfiguration (according to block diagram), please can someone from MikroTik confirm this?

<speculation>Can the problem with permanent no-link on sfp1 be related to lane configuration in early stages of ROS boot or even firmware initialization?</speculation>

Nevertheless, I cannot put device behaving this way into the production

Posts: 2420 Joined: Sat Dec 24, 2016 11:17 am Location: Magrathean

Tue Jul 31, 2018 1:46 pm

Do you have an Ethernet cable connected to the port closest to the SFP?
If I am not wrong, this is a shared port, and you can only use one of them.

Try Splunk> to monitor your MikroTik Router(s). How to set it up.

Posts: 2353 Joined: Tue Feb 18, 2014 12:56 am Location: Netherlands / Nīderlande

Tue Jul 31, 2018 1:46 pm

I've done dozens of tests so far. Following steps:

- downgrading packages to 6.42.5
- reboot
- downgrading firmware to 6.42.5
- shutdown
- remove power, wait 10s
- restore power and let the router boot with inserted SFP module (this seems to be important)

can quite reliably make sfp1 work again. Also it seems that first cold boot after firmware upgrade/downgrade without inserted SFP module starts this "permanent no-link problem" and the problem does not disappear by rebooting/powercycling; the only recovery, I was successful with, is performing the steps above.

In addition, when SFP module is inserted/removed to/from running router, copper ports lose link for approximately 4 seconds (link down/up events can be seen in router's log as well). Maybe this is due to CPU-to-switch lane reconfiguration (according to block diagram), please can someone from MikroTik confirm this?

<speculation>Can the problem with permanent no-link on sfp1 be related to lane configuration in early stages of ROS boot or even firmware initialization?</speculation>

Nevertheless, I cannot put device behaving this way into the production

Loving my freedom and so, no Twitter, no Meta/Facebook/Instagram/WhatsApp, no Apple and no Alphabet/Google, no Amazon/Cloudfront/AWS. However, 'happy' with giving money to Italy.

Note: MikroTik devices and SFP/SFP+/QSFP+ modules do not have any restrictions for other vendor equipment.

As long as the other vendor modules and devices comply with transceiver multi-source agreement (MSA) they should be compatible with MikroTik.

1G SFP

mANTBox 52 15s/NetMetal ac²

10G SFP+/25G SFP28

mANTBox 52 15s/NetMetal ac²

40G QSFP+

S-RJ01

Table that states in what link rates if mounted in specific MikroTik devices S-RJ01 module will be able to work. Use these modules only with auto-negotiation enabled, forced link speeds are not supported. They will negotiate to correct duplex and highest possible rate.

mANTBox 52 15s/NetMetal ac²

  • Rate works fine: +
  • Rate does not work: -
  • RB953: SFP1/SFP2
  • CCR1009: SFP+/SFP

10 Gigabit Ethernet

S+RJ10

Use these modules only in 10G SFP+ ports with auto-negotiation enabled, forced link speeds are not supported. They will negotiate to correct duplex and highest possible rate. For proper S+RJ10 module installation and recommended use case scenarios, please read S+RJ10 General Guidance.

Note: Negotiated speed highly depends on quality and length of the cables that are used.

Note: S+RJ10 to S+RJ10 always will negotiate to highest possible rate.

The latest revision of S+RJ10 contains "/r2" by the end of serial number. It comes with following improvements:

CRS312-4C+8XG

10GE ports maximum supported cable length.

Note: Negotiated speed highly depends on quality and length of the cables that are used.

Warning: 10GE ports doesn't support Half duplex mode with forced link speeds.

SFP interface compatibility with 100M optical transceivers

SFP interface on the listed devices is compatible with fast ethernet fiber links.

Compatible devices (interface):

SFP+ interface compatibility with 1G optical transceivers

For MikroTik devices with SFP+ interface that support both 10G and 1G link rate following settings must be set on both linked devices for required interfaces. These settings only relate when optical SFP transceivers are used. In order to get them working in 1G link rate, use the following configuration:

  • auto-negotiation disabled
  • port speed 1G
  • full-duplex

Devices which SFP+ ports support 1G links:

  • CCR2004-1G-12S+2XS - All SFP+ interfaces can be used in 1G mode if required.
  • CCR2004-16G-2S+ - All SFP+ interfaces can be used in 1G mode if required.
  • CCR1072-1G-8S+ - All SFP+ interfaces can be used in 1G mode if required.
  • CCR1036-8G-2S+ - All SFP+ interfaces can be used in 1G mode if required.
  • CCR1009-8G-1S-1S+ - All SFP+ interfaces can be used in 1G mode if required.
  • CCR1009-7G-1C-1S+ - All SFP+ interfaces can be used in 1G mode if required.
  • CSS326-24G-2S+RM - All SFP+ interfaces can be used in 1G mode if required.
  • CRS3xx series switches - All SFP+ interfaces can be used in 1G mode if required.
  • RB5009 series - SFP+1 interface can be used in 1G mode if required.
  • RB4011 series - SFP+1 interface can be used in 1G mode if required.
  • CRS226-24G-2S+ - Only SFP+1 supports 1G link speed, SFP+2 is for 10G links only.
  • CRS210-8G-2S+ - Only SFP+1 supports 1G link speed, SFP+2 is for 10G links only.
  • CSS610 series switches - All SFP+ interfaces can be used in 1G mode if required.

Devices which SFP+ interfaces can be used only for 10G links:

SFP+ interface compatibility with 10G/25G optical transceivers

MikroTik devices with SFP+ ports can establish 10G links using 10G/25G optical fiber transceivers, however additional SFP Rate Select setting must be configured to avoid data corruption during transmission. The SFP Rate Select setting is implemented since RouterOS v6.49 and the following settings are required on the SFP+ interface:

This requirement applies to MikroTik 10G/25G modules:

QSFP+ interface compatibility with QSFP+ to SFP+ breakout cables

MikroTik devices can establish links between QSFP+ and SFP+ ports using breakout cable when following settings are configured on the QSFP+ interface:

Читайте также: