MikroTik Troubleshooting¶
Діагностика та вирішення типових проблем.
Базова діагностика¶
Перевірка статусу¶
# Загальний стан
/system resource print
# Інтерфейси
/interface print
# IP адреси
/ip address print
# Маршрути
/ip route print
# DNS
/ip dns print
Логи¶
# Останні записи
/log print
# Фільтр по темі
/log print where topics~"firewall"
/log print where topics~"dhcp"
/log print where topics~"wireless"
# Включити логування
/system logging add topics=firewall action=memory
Мережеві проблеми¶
Немає інтернету¶
- Перевірити WAN інтерфейс:
/interface print where name=ether1
/ip address print where interface=ether1
- Перевірити gateway:
/ip route print where dst-address=0.0.0.0/0
/ping 8.8.8.8 count=3
- Перевірити DNS:
/ip dns print
/ping google.com count=3
- Перевірити NAT:
/ip firewall nat print where chain=srcnat
Клієнт не отримує IP¶
- Перевірити DHCP сервер:
/ip dhcp-server print
/ip dhcp-server lease print
- Перевірити пул:
/ip pool print
/ip pool used print
- Перевірити мережу DHCP:
/ip dhcp-server network print
Немає з'єднання між VLAN¶
- Перевірити інтерфейси:
/interface vlan print
/ip address print
- Перевірити маршрутизацію:
/ip route print
- Перевірити firewall:
/ip firewall filter print where chain=forward
Firewall проблеми¶
Трафік блокується¶
# Включити логування dropped пакетів
/ip firewall filter add chain=input action=log log-prefix="DROP-INPUT"
/ip firewall filter add chain=forward action=log log-prefix="DROP-FWD"
# Переглянути логи
/log print where message~"DROP"
Перевірка правил¶
# Статистика правил
/ip firewall filter print stats
# Знайти правило що блокує
/ip firewall filter print where action=drop
Connection tracking¶
# Активні з'єднання
/ip firewall connection print
# Пошук конкретного хоста
/ip firewall connection print where src-address~"192.168.1.100"
Wireless проблеми¶
Клієнт не підключається¶
- Перевірити статус:
/interface wireless print
/interface wireless registration-table print
- Перевірити безпеку:
/interface wireless security-profiles print
- Сканування:
/interface wireless scan wlan1
Низька швидкість¶
# Статистика
/interface wireless monitor wlan1
# Перевірити частоту
/interface wireless print detail
# Змінити канал
/interface wireless set wlan1 frequency=2437
Продуктивність¶
Висока CPU¶
# Перевірити навантаження
/system resource print
# Процеси
/tool profile
# Знизити logging
/system logging set [find] disabled=yes
Висока пам'ять¶
# Перевірити пам'ять
/system resource print
# Очистити кеш
/ip dns cache flush
/ip firewall connection tracking set enabled=no
Проблеми з диском¶
# Перевірити диск
/file print
# Видалити старі файли
/file remove [find name~"backup"]
Інструменти діагностики¶
Ping¶
/ping 8.8.8.8 count=10
/ping google.com count=5 size=1500
Traceroute¶
/tool traceroute 8.8.8.8
Bandwidth Test¶
# Сервер
/tool bandwidth-server set enabled=yes
# Клієнт
/tool bandwidth-test address=192.168.1.1 protocol=tcp direction=both
Packet Sniffer¶
# Захопити пакети
/tool sniffer quick ip-address=192.168.1.100
# Зберегти в файл
/tool sniffer set file-name=capture.pcap filter-ip-address=192.168.1.100
/tool sniffer start
# ...
/tool sniffer stop
Torch (Real-time traffic)¶
/tool torch interface=ether1 src-address=0.0.0.0/0 dst-address=0.0.0.0/0
Відновлення¶
Скинути до заводських¶
/system reset-configuration no-defaults=yes skip-backup=yes
Відновити backup¶
/system backup load name=backup-file
Netinstall¶
- Завантажити Netinstall з mikrotik.com
- Підключити ПК до ether1
- Зажати reset при включенні
- Вибрати пакети та встановити
Типові помилки¶
"couldn't change..."¶
# Інтерфейс використовується
/interface bridge port print
# Видалити з bridge перед зміною
"no such item"¶
# Перевірити правильність ID/імені
/interface print
"connection timed out"¶
# Перевірити IP та порт
/ip service print
# Перевірити firewall
/ip firewall filter print where dst-port=22
Моніторинг¶
SNMP¶
/snmp set enabled=yes contact="admin@example.com"
/snmp community add name=public addresses=192.168.1.0/24 read-access=yes
Graphing¶
/tool graphing interface add interface=ether1
/tool graphing resource add
Email сповіщення¶
/tool e-mail set server=smtp.gmail.com port=587 start-tls=yes user=alert@gmail.com password=app-password
# Скрипт для сповіщення
/system script add name=alert source={
/tool e-mail send to="admin@example.com" subject="Router Alert" body="Check router status"
}
Чеклист¶
Перед зверненням по допомогу¶
- [ ]
/system resource print— версія, uptime, CPU, RAM - [ ]
/interface print— статус інтерфейсів - [ ]
/ip address print— IP адреси - [ ]
/ip route print— маршрути - [ ]
/log print— останні помилки - [ ]
/export— конфігурація (без паролів)
Шлях: networking/mikrotik/troubleshooting.md