Mobile Networking
Mobile Networking
Section titled “Mobile Networking”RouterOS provides comprehensive mobile networking capabilities for MikroTik devices, enabling cellular connectivity through USB modems, built-in LTE modules, and mPCIe expansion cards. Mobile networking allows routers to connect to cellular networks for primary internet access, backup connectivity, or remote deployment scenarios.
Overview
Section titled “Overview”The mobile networking documentation covers all aspects of cellular connectivity in RouterOS, including:
- USB Modem Configuration - Setting up and managing USB-based cellular modems
- LTE Interface Management - Configuring built-in LTE modules and mPCIe cards
- SIM Card Management - Handling multiple SIM cards and carrier selection
- Signal Monitoring - Tracking signal strength, quality, and network registration
- Band Configuration - Selecting and locking specific frequency bands
- PPP over Cellular - Establishing PPP links over mobile networks
- Troubleshooting - Diagnosing and resolving connectivity issues
Key Capabilities
Section titled “Key Capabilities”- Support for a wide range of USB LTE/4G/5G modems from major manufacturers
- Built-in LTE category designations (CAT4, CAT6, CAT12, CAT18, CAT20)
- Dual-SIM support for failover and multi-carrier scenarios
- Signal quality monitoring with RSSI, RSRP, RSRQ, and SINR metrics
- Band locking for carrier-specific or performance optimization
- Automatic and manual network operator selection
- SMS messaging and USSD support
- GPS integration for location-based services
- Quality of Service controls for cellular traffic
USB Modem Configuration
Section titled “USB Modem Configuration”USB modems provide cellular connectivity through the router’s USB port. RouterOS includes a generic USB modem driver that supports many common modems, along with specific drivers for known device types.
Interface Creation
Section titled “Interface Creation”When a USB modem is connected, RouterOS automatically creates the appropriate interfaces. The modem type determines which interface is created:
- lte1 - Primary LTE interface for CAT4 and above modems
- ppp-out1 - PPP interface for modems requiring PPP encapsulation
- qmiwwan0 - QMI interface for Qualcomm-based modems
- cdc-wdm0 - CDC-WDM interface for MBIM-based modems
Create an LTE interface for a USB modem:
/interface lte apnadd apn=internet name=internet
/interface lteset [find] lte-name=lte1 apn-profiles=internet
/interface lte monitor [find]USB Modem Identification
Section titled “USB Modem Identification”List connected USB devices and identify the modem:
/system resource usb printView detailed modem information:
/interface lte info [find] onceDisplay modem firmware and hardware information:
/interface lteAT/port at:sim1 ATIModem-Specific Configuration
Section titled “Modem-Specific Configuration”Some modems require specific initialization commands. Configure modem-specific settings:
/interface lte at-chatset at="" input-result-map="" error=""
/interface lte at-chat at"=AT+QCFG=\"usbnet\",2"USB Port Power Management
Section titled “USB Port Power Management”Ensure adequate power for USB modems, especially on routers with limited USB power:
/system routerboard usb set type=usb2
/interface lte set [find] power-saving-management=disabledLTE Interface Configuration
Section titled “LTE Interface Configuration”LTE interfaces provide direct access to cellular networks through built-in modems or mPCIe expansion cards. These interfaces support advanced LTE features and provide better performance than PPP-based connections.
Basic LTE Configuration
Section titled “Basic LTE Configuration”Configure the LTE interface with APN settings:
/interface lte apnadd apn=internet name=internet authentication=chap username= password=
/interface lteadd lte-name=lte1 apn-profiles=internet
/ip address add address=10.0.0.2/24 interface=lte1 network=10.0.0.0
/ip route add gateway=10.0.0.1Network Mode Selection
Section titled “Network Mode Selection”Configure the LTE interface to use specific network modes:
/interface lte set [find] network-mode=4g+3g+2g
/interface lte set [find] preferred-network-mode=lte,3g,2gAvailable network modes:
- 4g - LTE only
- 3g - UMTS/HSPA only
- 3g+4g - Automatic selection between 3G and 4G
- 4g+3g+2g - Full automatic mode
- 5g - 5G NR (on supported hardware)
Carrier Locking
Section titled “Carrier Locking”Lock the modem to a specific carrier for testing or optimization:
/interface lte set [find] operator=24601
/interface lte set [find] operator-lock=allow-specific
/interface lte set [find] forbidden-operator=12345,67890SIM Card Management
Section titled “SIM Card Management”Multiple SIM cards enable carrier failover, multi-carrier deployments, and cost optimization through selective routing.
SIM Configuration
Section titled “SIM Configuration”Configure SIM card settings and switching behavior:
/interface lte simset [find] number=1 default-action=use-sim1
/interface lte simset [find] number=2 default-action=use-sim2
/interface lte simset [find] switch-policy=on-signal-quality-below threshold=-95SIM-based Routing
Section titled “SIM-based Routing”Configure routing policies based on which SIM is active:
/ip route ruleadd src-address=10.0.0.0/24 routing-mark=sim1-traffic action=lookup table=sim1add src-address=192.168.1.0/24 routing-mark=sim2-traffic action=lookup table=sim2
/ip routeadd dst-address=0.0.0.0/0 gateway=10.0.0.1 routing-mark=sim1add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=sim2SIM Status Monitoring
Section titled “SIM Status Monitoring”Check SIM card status and activity:
/interface lte sim print
/interface lte info [find] sim-status
/interface lte info [find] onceSignal Monitoring
Section titled “Signal Monitoring”RouterOS provides comprehensive signal monitoring through the LTE interface. Monitor signal quality to optimize antenna placement and troubleshoot connectivity issues.
Signal Metrics
Section titled “Signal Metrics”Key signal metrics available through RouterOS:
| Metric | Description | Optimal Range |
|---|---|---|
| RSSI | Received Signal Strength Indicator | Better than -85 dBm |
| RSRP | Reference Signal Received Power | Better than -95 dBm |
| RSRQ | Reference Signal Received Quality | Better than -10 dB |
| SINR | Signal to Interference Plus Noise Ratio | Better than 10 dB |
| CQI | Channel Quality Indicator | 10-15 |
Monitor signal metrics continuously:
/interface lte monitor [find] once
/interface lte monitor [find] interval=5sSignal History
Section titled “Signal History”View historical signal data for trend analysis:
/interface lte info [find] stats
/tool fetch url="http://[lte-ip]/signal" mode=httpSignal-Based Actions
Section titled “Signal-Based Actions”Configure automatic actions based on signal thresholds:
/interface lte set [find] sms-trigger=""
// Create a script to react to signal changes/system script add name=signal-monitor source={ :local signal [/interface lte info [find] rssi]; :if ($signal < -100) do={ /log warning "Weak LTE signal detected: $signal dBm"; }}Band Configuration
Section titled “Band Configuration”LTE bands are specific frequency ranges allocated for cellular use. Different carriers use different bands, and band selection affects coverage and performance.
Available Bands
Section titled “Available Bands”Common LTE bands worldwide:
| Band | Frequency | Common Use |
|---|---|---|
| B1 | 2100 MHz | Europe, Asia |
| B2 | 1900 MHz | Americas |
| B3 | 1800 MHz | Global |
| B4 | 1700 MHz | Americas (AWS) |
| B5 | 850 MHz | Americas |
| B7 | 2600 MHz | Global |
| B8 | 900 MHz | Europe |
| B20 | 800 MHz | Europe |
| B28 | 700 MHz | Global |
Band Selection
Section titled “Band Selection”Configure which bands the modem should use:
/interface lte set [find] band=B3,B7,B20
/interface lte set [find] band-locking=enabled
/interface lte set [find] allowed-bands=B3,B7,B20CA (Carrier Aggregation) Configuration
Section titled “CA (Carrier Aggregation) Configuration”Configure carrier aggregation for improved throughput:
/interface lte set [find] ca-mode=enabled
/interface lte set [find] ca-bands=B3+B7PPP over Cellular
Section titled “PPP over Cellular”Some cellular connections require PPP encapsulation. Configure PPP over LTE for compatibility with certain carriers or modem types.
PPP Client Configuration
Section titled “PPP Client Configuration”Set up a PPP client over the cellular interface:
/interface pppoe-clientadd add-default-route=yes default-route-distance=10 \ dial-on-demand=no disabled=no interface=lte1 \ name=pppoe-lte1 password=internet user=internet
/ppp profile set default-encryption=requiredPPP Authentication
Section titled “PPP Authentication”Configure PPP authentication methods:
/ppp aaaset accounting=yes interim-update=10m use-radius=no
/interface pppoe-clientset [find] pap-secret=internet chap-secret=internetPPP Status Monitoring
Section titled “PPP Status Monitoring”Monitor PPP connection status:
/interface pppoe-client print
/interface pppoe-client monitor [find]SMS and USSD Support
Section titled “SMS and USSD Support”RouterOS supports SMS messaging and USSD commands for carrier interaction, balance checking, and management.
SMS Configuration
Section titled “SMS Configuration”Enable and configure SMS handling:
/interface lte set [find] sms-auto-respond=""
/tool smsset enabled=yes port=lte1 receive-on=sim1
/tool sms inboxprintSend an SMS message:
/tool sms send phone-number=+1234567890 message="Status check"USSD Commands
Section titled “USSD Commands”Execute USSD commands for carrier services:
/interface lte at-chat input="*123#"
/interface lte at-chat input="AT+CUSD=1,\"*123#\",15"Quality of Service
Section titled “Quality of Service”Implement QoS policies for cellular traffic to prioritize critical applications and manage bandwidth effectively.
Queue Configuration
Section titled “Queue Configuration”Configure queues for cellular traffic:
/queue simpleadd name=cellular-traffic target=interface=lte1 max-limit=50M/100M
/queue treeadd name=cellular-prio parent=lte1 priority=1Traffic Marking
Section titled “Traffic Marking”Mark cellular traffic for QoS processing:
/ip firewall mangleadd action=mark-packet chain=prerouting new-packet-mark=cellular-voip \ passthrough=no port=5060,5061 protocol=tcp
add action=mark-connection chain=prerouting connection-mark=no-mark \ new-connection-mark=cellular-web passthrough=yes port=80,443 protocol=tcpBackup and Failover
Section titled “Backup and Failover”Configure cellular as a backup connection for primary WAN failover scenarios.
Default Route Configuration
Section titled “Default Route Configuration”Set up primary and backup routes:
/ip routeadd dst-address=0.0.0.0/0 gateway=10.0.0.1 distance=1 comment="primary-wan"
add dst-address=0.0.0.0/0 gateway=lte1 distance=10 comment="cellular-backup"Health Check Failover
Section titled “Health Check Failover”Configure automatic failover based on connectivity checks:
/tool netwatchadd host=8.8.8.8 timeout=3s interval=10s up-script="/ip route set [find comment=\"primary-wan\"] distance=1" \ down-script="/ip route set [find comment=\"primary-wan\"] distance=20"Scripted Failover
Section titled “Scripted Failover”Create advanced failover logic with scripts:
/system script add name=failover source={ :local primary [/interface get [find comment="primary"] running]; :if (!$primary) do={ /interface set [find name=lte1] disabled=no; /log info "Primary down - cellular activated"; }}Troubleshooting
Section titled “Troubleshooting”Diagnose and resolve common mobile networking issues using RouterOS tools.
Connectivity Tests
Section titled “Connectivity Tests”Test cellular connectivity step by step:
/interface lte info [find] once
/ping 8.8.8.8 interface=lte1
/tool traceroute 8.8.8.8 interface=lte1Modem Diagnostics
Section titled “Modem Diagnostics”Access detailed modem diagnostic information:
/interface lteAT/port at:sim1 AT+CSQ
/port at:sim1 AT+CREG?
/port at:sim1 AT+COPS?Log Analysis
Section titled “Log Analysis”Review system logs for cellular-related events:
/log print where message~"lte\|cellular\|modem"Common Issues
Section titled “Common Issues”No network registration:
/interface lte set [find] network-mode=4g+3g+2g
/interface lte resetPoor signal quality:
/interface lte monitor [find] once
/rebootConnection drops:
/interface lte set [find] pin-insert=no
/system routerboard usb power-resetRelated Topics
Section titled “Related Topics”- SMS - SMS messaging and USSD commands
- Dual SIM Application - Multi-SIM management
- Network Interfaces - General interface configuration
- PPP - PPP client and server configuration for cellular modems
- Firewall and Quality of Service - Traffic filtering and QoS
- Diagnostics and Monitoring - Network troubleshooting tools
- High Availability Solutions - Redundancy configurations