MikroTik RouterOS — Comandos e Configuração
Sintaxe do RouterOS v7.
BGP (v7)
/routing bgp template add name=upstream as=65001 router-id=1.1.1.1
/routing bgp connection add name=isp1 remote.address=200.1.1.2 \
remote.as=65002 local.role=ebgp templates=upstream
/routing bgp advertisements print
CGNAT (NAT444, RFC 6598)
O bloco 100.64.0.0/10 é reservado para o link CPE ↔ CGNAT da operadora (evita NAT sobre NAT com as faixas RFC1918 do cliente).
/ip firewall nat add chain=srcnat action=netmap \
src-address=100.64.0.0/10 to-addresses=200.1.1.10-200.1.1.20 \
to-ports=1024-65535 comment="CGNAT pool cliente"
Logging IP:porta privado ↔ público + timestamp é obrigatório (Marco Civil). Em grande escala, operadoras usam appliances dedicados (A10, F5, Huawei NE40) pela exigência de performance/logging.
Firewall e NAT básico
/ip firewall filter print
/ip firewall filter add chain=input protocol=tcp dst-port=22 action=accept
/ip firewall nat add chain=srcnat out-interface=ether1 action=masquerade
Interfaces, IPs e rotas
/interface print
/ip address print
/ip route print
/ip route add dst-address=0.0.0.0/0 gateway=192.168.1.1
Diagnóstico
/ping 8.8.8.8
/tool traceroute 8.8.8.8
/interface monitor-traffic ether1
/system resource print # CPU, RAM, versão do RouterOS
/log print
Backup
/system backup save name=backup-$(date) # backup binário
/export file=config-completa # export legível (texto)
Veja também: Cisco IOS · Huawei VRP