Topic: tech myref prev next

tech myref > MikroTik

MikroTik

RouterOS

MikroTik’s operating system for routers. RouterOS is available in two major releases, v6 and v7. RouterOS v6 uses a Linux version 3 kernel; RouterOS v7 uses a Linux version 5 kernel. As such, some features which entered Linux in version 5, such as WireGuard, are only available in RouterOS from version 7.

Hardware and Setup

WinBox

Download WinBox from the MikroTik website. There are sometimes breaking changes between versions of WinBox; if it doesn’t work, try the latest version.

Reset Button Behaviour

Power up the router with the reset button held down. When the ‘usr’ LED is lit, release the reset button to use the secondary Routerboot.

Or, wait until the LED flashes. Release the reset button to wipe the configuration.

Or, wait until the LED shows a steady light, for CAPs mode.

Or, wait for the LED to go out for Netinstall mode.

Logging

MikroTik devices keep an internal event log. This can optionally be forwarded to a syslog server. MikroTik devices, with the exception of x86 (virtualised) MikroTiks, do not have hardware clocks. This means that the router will lose the time on loss of power. This is generally not a problem, because the router will learn the time from an NTP server.

When the router has not received time information from an NTP source, it will:

  1. Set the system clock to the timestamp of the most recent log message, i.e., the approximate time the router went offline.
  2. Or, if there are no logs, set the time to 1st January 1970.

Bridging

Creating a VLAN Interface

A network makes use of both the native VLAN (172.18.3.0/24) and a tagged VLAN (VLAN 2, 172.18.2.0/24).

First, to place an interface on the native VLAN, go to ‘Bridge’ and create a new bridge, named, e.g., ‘lan’. Then go to the ‘Ports’ tab under ‘Bridge’ and add a new port, linking interface ‘ether1’ to bridge ‘lan’. The new bridge, ‘lan’, can have Layer 3 addresses applied to it.

To create the second interface, on VLAN 2, go to ‘Interface’, then the ‘VLAN’ tab. Create a new VLAN interface, named, e.g., ‘vlan2’. Specify the interface ‘ether1’ as the physical interface and ‘2’ as the VLAN id. Create another bridge, named, e.g., ‘br2’, using the same process by which the ‘lan’ bridge was created previously. Under ‘Bridge’, ‘Ports’ tab, create a new port between the interface ‘vlan2’ and ‘br2’. The new bridge, ‘br2’, can have Layer 3 addresses applied to it.