HWMPplus mesh
HWMPplus mesh
Section titled “HWMPplus mesh”HWMP+ (Hybrid Wireless Mesh Protocol Plus) is a layer 2 mesh networking protocol implemented in RouterOS that enables automatic path selection and forwarding in wireless and Ethernet networks. It combines the flexibility of on-demand routing with proactive topology maintenance to provide reliable mesh connectivity.
Overview
Section titled “Overview”HWMP+ is MikroTik’s implementation of a hybrid mesh protocol that operates at layer 2, making it transparent to higher network layers. The protocol automatically discovers paths between mesh nodes, handles route selection based on metrics like path cost, and adapts to topology changes without manual intervention.
The protocol supports multiple port types for mesh participation:
- Wireless interfaces: Direct wireless connections between nodes
- WDS (Wireless Distribution System): Static or dynamic WDS links
- Ethernet interfaces: Ethernet-backed mesh segments
- Bridge ports: Hybrid configurations mixing different media
Key Capabilities
Section titled “Key Capabilities”HWMP+ implements several advanced features that make it suitable for mesh networking:
- Hybrid Routing: Combines reactive (on-demand) and proactive (pre-computed) path selection
- Automatic Topology Discovery: Nodes automatically discover neighbors and build routing tables
- Multi-path Support: Can maintain multiple paths to destinations for redundancy
- Root Node Concept: Supports tree-based topology with designated root nodes
- Mesh Traceroute: Diagnostic tool to trace path through the mesh
- FDB (Forwarding Database): Maintains MAC address to port mappings
Protocol Operation
Section titled “Protocol Operation”Reactive Mode
Section titled “Reactive Mode”In reactive mode, HWMP+ operates similarly to a traditional on-demand routing protocol. When a node needs to send traffic to a destination, it broadcasts a Route Request (RREQ) message. The destination node replies with a Route Reply (RREP) containing the path information. Intermediate nodes learn about the path and can cache it for future use.
Reactive mode is suitable for:
- Large mesh networks with sporadic traffic patterns
- Networks where paths change frequently
- Scenarios where proactive route maintenance overhead is undesirable
The reactive process works as follows:
- Source node broadcasts RREQ when it needs to reach a destination
- Each intermediate node records the predecessor and forwards the RREQ
- When RREQ reaches the destination (or a node with a valid route), it sends RREP back
- The source learns the complete path and can begin transmitting
- Routes expire after a timeout period, requiring fresh discovery
Proactive Mode
Section titled “Proactive Mode”In proactive mode, HWMP+ maintains routing information continuously. One or more nodes are designated as root nodes and periodically generate topology information that propagates throughout the mesh. This allows immediate path availability without the delay of on-demand discovery.
Proactive mode is suitable for:
- Networks with frequent communication between nodes
- Latency-sensitive applications
- Smaller, more stable mesh topologies
Root nodes send periodic PREQ (Path Request) messages that traverse the mesh, building path information at each node. The root acts as a central point for topology information, and all nodes maintain paths to the root.
Topology Change Detection
Section titled “Topology Change Detection”HWMP+ detects topology changes through:
- Hello Messages: Periodic messages on each port announcing presence
- Link Failure Detection: Rapid detection of broken links through missing Hello messages
- FDB Aging: MAC address entries time out if not refreshed
When a topology change is detected, affected nodes initiate route recovery either reactively or through root-originated PREQ messages.
Configuration
Section titled “Configuration”Mesh Interface Configuration
Section titled “Mesh Interface Configuration”Create a mesh interface and configure its properties:
/interface mesh add name=mesh1/interface mesh set mesh1 arp=enabled auto-mac=no admin-mac=xx:xx:xx:xx:xx:xxProperties:
- admin-mac: MAC address assigned to the mesh interface (used when auto-mac=no)
- arp: Address Resolution Protocol setting (enabled, disabled, proxy-arp, reply-only)
- auto-mac: If disabled, uses admin-mac; otherwise uses port MAC address
- mesh-id: Optional identifier for the mesh network
- mtu: Maximum Transmission Unit for the mesh interface
- prio: Priority for becoming a root node (lower values = higher priority)
Port Configuration
Section titled “Port Configuration”Add interfaces as ports to the mesh:
/interface mesh port add interface=wlan1 mesh=mesh1/interface mesh port add interface=ether1 mesh=mesh1/interface mesh port add interface=wds1 mesh=mesh1Properties:
- interface: Interface to add to the mesh
- mesh: Parent mesh interface name
- hello-interval: Interval between Hello messages (default: 10s for Ethernet)
- port-type: Automatically detected based on interface type
- admin-link-up: Administrative link state
Example: Basic Wireless Mesh
Section titled “Example: Basic Wireless Mesh”This example demonstrates a simple three-node wireless mesh:
Node A (Root Node):
# Create wireless interface as AP/interface wireless set wlan1 mode=ap-bridge ssid=MeshNet frequency=5180 band=5ghz-n/ac
# Create mesh interface/interface mesh add name=mesh1
# Add wireless interface to mesh/interface mesh port add interface=wlan1 mesh=mesh1
# Configure as root with highest priority/interface mesh set mesh1 prio=1
# Add IP address/ip address add address=10.0.0.1/24 interface=mesh1Node B:
# Create wireless interface as station/interface wireless set wlan1 mode=station ssid=MeshNet frequency=5180 band=5ghz-n/ac
# Create mesh interface/interface mesh add name=mesh1
# Add wireless interface to mesh/interface mesh port add interface=wlan1 mesh=mesh1
# Add IP address/ip address add address=10.0.0.2/24 interface=mesh1Node C:
# Create wireless interface as station/interface wireless set wlan1 mode=station ssid=MeshNet frequency=5180 band=5ghz-n/ac
# Create mesh interface/interface mesh add name=mesh1
# Add wireless interface to mesh/interface mesh port add interface=wlan1 mesh=mesh1
# Add IP address/ip address add address=10.0.0.3/24 interface=mesh1Verify mesh operation:
/interface mesh print/interface mesh port print/interface mesh fdb printExpected output shows port status and learned MAC addresses in the FDB.
Example: Mesh with WDS Interconnections
Section titled “Example: Mesh with WDS Interconnections”For more complex meshes, use WDS links between APs:
AP1:
# Configure AP with WDS/interface wireless set wlan1 mode=ap-bridge ssid=MeshNet wds-mode=static wds-default-bridge=bridge1/interface wireless wds add name=wds1 master-interface=wlan1 wds-address=xx:xx:xx:xx:xx:01
# Add to mesh/interface mesh add name=mesh1/interface mesh port add interface=wds1 mesh=mesh1
# Bridge for switching/interface bridge add name=bridge1/interface bridge port add bridge=bridge1 interface=mesh1/interface bridge port add bridge=bridge1 interface=wds1AP2:
/interface wireless set wlan1 mode=ap-bridge ssid=MeshNet wds-mode=static wds-default-bridge=bridge1/interface wireless wds add name=wds1 master-interface=wlan1 wds-address=xx:xx:xx:xx:xx:02
/interface mesh add name=mesh1/interface mesh port add interface=wds1 mesh=mesh1
/interface bridge add name=bridge1/interface bridge port add bridge=bridge1 interface=mesh1/interface bridge port add bridge=bridge1 interface=wds1Example: Ethernet Mesh Segment
Section titled “Example: Ethernet Mesh Segment”For Ethernet-backed mesh segments:
# On each router with Ethernet mesh segment/interface mesh add name=mesh1/interface mesh port add interface=ether1 mesh=mesh1 hello-interval=5sConfigure hello-interval on Ethernet ports to detect failures faster (lower values = faster detection but more overhead).
Monitoring and Diagnostics
Section titled “Monitoring and Diagnostics”FDB Status
Section titled “FDB Status”View the Forwarding Database to see learned MAC addresses:
/interface mesh fdb print detailOutput shows:
- mac-address: Learned MAC address
- interface: Egress interface
- age: Time since last refresh
- type: Type of entry (local, dynamic)
- mesh: Parent mesh interface
Mesh Traceroute
Section titled “Mesh Traceroute”Trace the path through the mesh to a specific MAC address:
/interface mesh traceroute mac-address=xx:xx:xx:xx:xx:xx mesh=mesh1This shows each hop from source to destination with interface information.
Port Status
Section titled “Port Status”Monitor port status and statistics:
/interface mesh port print detailShows:
- link-up: Physical link state
- port-type: Detected port type (wireless, WDS, ethernet-mesh)
- mtu: Configured MTU
- auto-mac: Whether MAC was auto-assigned
Best Practices
Section titled “Best Practices”Network Design
Section titled “Network Design”- Designate Root Nodes: Assign one or more nodes as roots with lower prio values
- Link Redundancy: Ensure multiple paths exist between critical nodes
- Interference Planning: Use non-overlapping channels for wireless mesh links
- Hello Interval Tuning: Adjust Ethernet hello-interval based on failure detection requirements
Performance Considerations
Section titled “Performance Considerations”- Wireless Channel Selection: Use clean frequencies for mesh backhaul
- MTU Considerations: Ensure consistent MTU across mesh paths
- Mesh Size: Limit mesh size to maintain reasonable convergence times
- Traffic Patterns: Consider proactive mode for frequent root-to-node communication
Troubleshooting
Section titled “Troubleshooting”- Verify Port Links: Check that all mesh ports show link-up status
- Check FDB: Confirm MAC addresses are learned on expected ports
- Use Traceroute: Identify path issues through mesh
- Monitor Hello Messages: Ensure Hello messages are received on all ports
Common issues:
- Routes not forming: Verify wireless links and WDS connections
- Slow convergence: Reduce hello-interval on Ethernet ports
- FDB timeout: Check for intermittent link failures
- Bridge loops: Ensure STP/RSTP is configured if using bridged mesh