Manual:Master-port

From MikroTik Wiki
Jump to navigation Jump to search

Applies to RouterOS: >6.41


Summary

Since RouterOS v6.41 the Bridge Hardware Offloading feature was introduced to connect software based features (for example, Spanning Tree Protocol) with hardware based features (for example, port switching). With Bridge Hardware Offloading it is very convenient to switch multiple ports together by using device's built-in switch chip, but prior to RouterOS v6.41 port switching had to be done using a property called master-port. This page serves a legacy purpose to help users manually reconfigure a device that still uses an outdated software version.

Background

The master-port property has proven to be confusing for most users. To switch some ports together you had to choose one port to be the master-port and other ports had to be enslaved to this port. This concept exists internally in the switch chip and therefore the same principle was used to configure the device, but for most users this caused confusion. Also, it caused issues to add new switch and bridge features. To solve these issues, the master-port property had to be REPLACED with a more robust and convenient concept - a bridge.

Note: The switching feature is not removed, only the configuration method has changed.


With the configuration method change, only the port switching part has been changed. VLAN configuration, switch ACL rule, QoS and other switch related feature configurations are not changed, there is no need to reconfigure anything under /interface ethernet switch, only the master-port property has been removed under /interface ethernet

Automatic conversion

If you are using an old RouterOS version (before 6.41), then you can simply upgrade to the latest RouterOS version (6.41 or newer). Since RouterOS v6.41 there is a built-in automatic conversion script that will automatically convert your old master-port configuration to the new Bridge Hardware Offloading configuration without needing to adjust anything.

Note: The automatic conversion only works one way, the built-in script will only convert master-port to bridge, but will not convert bridge to master-port in case you perform a downgrade. Backup your configuration before you upgrade, if you are intending to downgrade your RouterOS version at some point.


The built-in script takes each master-port and creates a bridge for each master-port that have been configured. Each port that had the master-port property set, will be added to the newly created bridge.

Manual conversion

In case you want to manually configure your device without relying on the automatic conversion script, then below you can find an example how to convert a simple port switching setup:

  • Before RouterOS v6.41
/interface ethernet
set ether2 master-port=ether1
set ether3 master-port=ether1
set ether4 master-port=ether1
set ether5 master-port=ether1
  • After RouterOS v6.41
/interface bridge
add name=bridge1 protocol-mode=none
/interface bridge port
add bridge=bridge1 interface=ether1
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether3
add bridge=bridge1 interface=ether4
add bridge=bridge1 interface=ether5

Spanning Tree Protocol

Below you can find examples to enable (RSTP:

  • Before RouterOS v6.41
/interface ethernet
set ether2 master-port=ether1
set ether3 master-port=ether1
set ether4 master-port=ether1
set ether5 master-port=ether1
/interface bridge
add name=bridge1 protocol-mode=rstp
/interface bridge port
add bridge=bridge1 interface=ether1
  • After RouterOS v6.41
/interface bridge
add name=bridge1 protocol-mode=rstp
/interface bridge port
add bridge=bridge1 interface=ether1
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether3
add bridge=bridge1 interface=ether4
add bridge=bridge1 interface=ether5

See also