Command Line Interface
Using MikroTik’s Command Line Interface (CLI) is an efficient way to manage and configure RouterOS devices. Here’s a step-by-step guide to getting started with MikroTik CLI:
1. Accessing the CLI
Using Winbox:
Open Winbox: Launch the Winbox application on your computer.
Connect to Router: Enter the IP address or MAC address of the MikroTik router, along with the login credentials.
Open Terminal: Click on the "New Terminal" button in Winbox to open the CLI.
Using SSH:
Open an SSH Client: Use an SSH client like PuTTY.
Connect to Router: Enter the IP address of the MikroTik router and connect using your credentials.
Login: Enter your username and password when prompted.
Using the Console Port:
Connect a Console Cable: Use a console cable to connect your computer to the router's console port.
Open Terminal Emulator: Use a terminal emulator like PuTTY or Tera Term.
Select the Serial Port: Configure the terminal emulator to use the correct serial port and connect.
2. Basic CLI Navigation
Show Commands:
?or pressingTabto autocomplete commands.Help: Type
?after a command or partial command to get help.List Commands: Type the command name followed by
?to list options.
3. Basic Commands
Viewing System Information:
System Info:
system resource printRouterOS Version:
system resource printConfiguring IP Addresses:
List IP Addresses:
ip address printAdd IP Address:
ip address add address=192.168.1.1/24 interface=ether1Remove IP Address:
ip address remove [find address=192.168.1.1]Managing Interfaces:
List Interfaces:
interface printEnable/Disable Interface:
interface enable [find name=ether1]
interface disable [find name=ether1]Managing Routes:
List Routes:
ip route printAdd Static Route:
ip route add dst-address=0.0.0.0/0 gateway=192.168.1.254Remove Route:
ip route remove [find dst-address=0.0.0.0/0]4. Advanced Commands
Firewall Rules:
List Firewall Rules:
ip firewall filter printAdd Firewall Rule:
ip firewall filter add chain=input action=accept protocol=tcp port=22Remove Firewall Rule:
ip firewall filter remove [find chain=input]User Management:
List Users:
user printAdd User:
user add name=newuser password=newpassword group=fullRemove User:
user remove [find name=newuser]5. Saving and Rebooting
Save Configuration:
system configuration saveReboot Router:
system reboot6. Logging Out
Exit CLI Session:
exit7. Tips and Best Practices
Use Scripts: For repetitive tasks, consider creating and using scripts.
Backup Configuration: Regularly back up your configuration to avoid data loss.
Keep Updated: Familiarize yourself with the latest MikroTik RouterOS updates and features.
By following these steps, you’ll be able to efficiently navigate and manage your MikroTik devices using the CLI.
Keywords
MikroTik, RouterOS, RouterBOARD, wireless networking, ISP, WISP, networking equipment, routers, switches, Cloud Core Router, CCR, SXT, LTE integration, 5G, cybersecurity, network security, networking software, networking hardware, Latvia, John Trully, Arnis Riekstiņš, MikroTik Academy, MUM events, network management, hotspot, VLAN, firewall, VPN, QoS, bandwidth management, traffic shaping, wireless access point, CAPsMAN, WinBox, PoE, mesh networking, routing protocols, MPLS, OSPF, BGP, MikroTik training
میکروتیک, روتر او اس, روتر برد, شبکه بیسیم, آی اس پی, وایرلس آی اس پی, تجهیزات شبکه, روترها, سوییچها, کلود کور روتر, سی سی آر, اس ایکس تی, ادغام ال تی ای, 5G, امنیت سایبری, امنیت شبکه, نرمافزار شبکه, سختافزار شبکه, لتونی, جان ترولی, آرنیس ریکسینش, آکادمی میکروتیک, رویدادهای مام, مدیریت شبکه, هات اسپات, ویلَن, فایروال, ویپیان, کیواُاس, مدیریت پهنای باند, شکلدهی ترافیک, نقطه دسترسی بیسیم, کپزمن, وینباکس, پی او ای, شبکه مش, پروتکلهای مسیریابی, ام پی ال اس, اُ اس پی اف, بی جی پی, آموزش میکروتیک
Last updated