Meidokon Wiki
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Useful(?) links

  • furinkan's stuff

  • Postfix snippets


  • SystemInfo

  • This sidebar

Navigation

  • FrontPage
  • RecentChanges
  • FindPage
  • HelpContents
Revision 1 as of 2024-11-24 08:19:20
MeidokonWiki:
  • servers
  • MikrotikNotes

Mikrotik stuff has plenty of its own quirks, I'll note them down here.

Contents

  1. Bridging and VLANs
  2. SFPs

Bridging and VLANs

Bridging with VLANs is complicated on Mikrotik. I don't really get why there's /interface/vlan and /interface/bridge/vlan and why it matters, but it does. It's also important to note that this stuff can be hardware-offloaded, depending on the switch chip in your particular device. For this reason, you need to know what you've got, what you're doing, and whether you need to care about offload.

  • https://help.mikrotik.com/docs/spaces/ROS/pages/103841826/Basic+VLAN+switching#BasicVLANswitching-Otherdeviceswithabuilt-inswitchchip

  • https://help.mikrotik.com/docs/spaces/ROS/pages/328227/Packet+Flow+in+RouterOS#PacketFlowinRouterOS-FastPath

SFPs

If you've got one plugged in you can check it's info/stats.

{
    :local iflist [find where default-name~"(sfp|combo|ether)"]
    :foreach if in=$iflist do={
        :local ifname     [get $if name]
        :local nicename   [:pick "$ifname          " 0 13]
        :local ifmon      [monitor $ifname once as-value]
        :local sfppresent ($ifmon->"sfp-module-present")
        :local sfpmodel   ($ifmon->"sfp-vendor-part-number")
        :if ($sfppresent = true) do={:put "$nicename --> $sfpmodel"} else={:put "$nicename --> <empty>" }
    }
}

You can just run this on the terminal. Here's an example from helena, where I've connected its SFP port to the Unifi switch for a 1G uplink trunk.

[furinkan@helena] > /interface/ethernet/
[furinkan@helena] /interface/ethernet> {
{...     :local iflist [find where default-name~"(sfp|combo|ether)"]
{...     :foreach if in=$iflist do={
{{...         :local ifname     [get $if name]
{{...         :local nicename   [:pick "$ifname          " 0 13]
{{...         :local ifmon      [monitor $ifname once as-value]
{{...         :local sfppresent ($ifmon->"sfp-module-present")
{{...         :local sfpmodel   ($ifmon->"sfp-vendor-part-number")
{{...         :if ($sfppresent = true) do={:put "$nicename --> $sfpmodel"} else={:put "$nicename --> <empty>" }
{{...     }
{... }
core-uplink   --> <empty>
kalina        --> <empty>
persica1      --> <empty>
persica2      --> <empty>
persica3      --> <empty>
sfp1          --> SFPP-PC015
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01
MoinMoin Release 1.9.11 [Revision release], Copyright by Juergen Hermann et al.