Creating a redundant layer two network using rapid spanning-tree protocol on Mikrotik

We can use the rapid spanning-tree protocol on Mikrotik to avoid layer two loops while creating redundancy on our networks. In this lab, I will be using two connections (one fiber and the other wireless, both connecting the HQ office to the a branch office) to demonstrate how we can create a layer two redundancy to automatically switch from the fiber to the wireless point-to-point link whenever the fibre goes down.

The rapid spanning-tree protocol is an upgrade of the spanning-tree protocol introduced many years ago. Over the years, STP has been found to be too slow for today’s application-hungry networks because of its slow convergence time. As a remedy, the RSTP was introduced and the good news is that the Mikrotrik routeros is capable of this feature.

Network Topology

Rapid spanning-tree protocol on mikrotik
Image showing two offices connected through fiber and wireless

Implementation

The task is to elect SWA the root bridge and make the fiber link becomes the preferred path to the branch office. The connection should fail over to the wireless link if for any reason the fiber link goes down. The following will be done on both Mikrotik switches. Please note that the devices labeled SWA and SWB are Mikrotik routers while HQ and BO can be any vendor’s router and are not configured in this lab. A breakdown of the tasks is as follows.

  1. Create a bridge and add both connectin interfaces (ether1 and ether2) to the bridge
  2. Set bridge priority for SWA to make sure it becomes the root bridge
  3. Set the port priority for the ports in the bridge to make sure ether1 becomes the preferred path from HQ to BO

Configuration commands on SWA

/interface bridge

add name=HQ_bridge priority=0x1000

/interface bridge port

add bridge=bridge interface=ether1 priority=0x50

add bridge=bridge interface=ether2 priority=0x60

Configuration commands on SWB

/interface bridge

add name=HQ_bridge priority=0x2000

/interface bridge port

add bridge=bridge interface=ether1 priority=0x50

add bridge=bridge interface=ether2 priority=0x60

 

My may also like:  Configuring Point to Multi-point on Mikrotik

 

Verification

To check bridge rstp status, us the command interface bridge monitor bridge. See below

 

/interface bridge monitor bridge1                  state: enabled    current-mac-address: 64:D1:54:D9:27:E6            root-bridge: yes         root-bridge-id: 0x1000.64:D1:54:D9:27:E6         root-path-cost: 0              root-port: none             port-count: 2  designated-port-count: 2

On SWB, ether2 port will be placed in discarding state and will only transition to forwarding once ether1 goes down. This time for this transitioning is using a few seconds or milliseconds.

Spread the love

Timigate

Ashioma Michael, a BSc (Computer Science)., MTCNA, CCNA, and CCNP holder with many years of industry-proven experience in network design, implementation and optimization. He has tutored and guided many professionals towards obtaining their Cisco certifications. Mike works as a senior network engineer with one of the leading internet service providers in West Africa.

Leave a Reply

Your email address will not be published. Required fields are marked *