QOS e priorização de tráfego no Mikrotik
Boa tarde amigos, bem pessoal não sou nenhum especialista em Mikrotik, mais de tanto ver aqui no forum ser sitado o qos e priorização de trafego andei pesquisando e cheguei a seguinte solução que uso aqui no provedor:
Marcando os pacotes no firewall:
/ ip firewall mangle
add chain=prerouting p2p=all-p2p action=mark-connection \
new-connection-mark=P2P-Conexao passthrough=yes comment="CONTROLE P2P" \
disabled=no
add chain=prerouting protocol=tcp p2p=all-p2p connection-limit=40,32 \
action=mark-connection new-connection-mark=P2P-Conexao-Limite \
passthrough=yes comment="" disabled=no
add chain=prerouting connection-mark=P2P-Conexao action=mark-packet \
new-packet-mark=P2P-Pacotes passthrough=no comment="" disabled=no
add chain=prerouting connection-mark=P2P-Conexao-Limite action=mark-packet \
new-packet-mark=P2P-Pacotes passthrough=no comment="" disabled=no
add chain=prerouting protocol=icmp \
action=mark-connection new-connection-mark=ICMP-Conexao passthrough=yes \
comment="CONTROLE ICMP" disabled=no
add chain=prerouting connection-mark=ICMP-Conexao action=mark-packet \
new-packet-mark=ICMP-Pacotes passthrough=yes comment="" disabled=no
add chain=prerouting protocol=tcp dst-port=443 action=mark-connection \
new-connection-mark=Navegacao-Conexao passthrough=yes comment="CONTROLE \
NAVEGACAO" disabled=no
add chain=prerouting protocol=tcp dst-port=80 action=mark-connection \
new-connection-mark=Navegacao-Conexao passthrough=yes comment="" \
disabled=no
add chain=prerouting protocol=tcp dst-port=53 action=mark-connection \
new-connection-mark=Navegacao-Conexao passthrough=yes comment="" \
disabled=no
add chain=prerouting protocol=udp dst-port=53 action=mark-connection \
new-connection-mark=Navegacao-Conexao passthrough=yes comment="" \
disabled=no
add chain=prerouting protocol=tcp dst-port=21 action=mark-connection \
new-connection-mark=Navegacao-Conexao passthrough=yes comment="" \
disabled=no
add chain=prerouting connection-mark=Navegacao-Conexao action=mark-packet \
new-packet-mark=Navegacao-Pacotes passthrough=no comment="" disabled=no
add chain=prerouting protocol=tcp dst-port=110 action=mark-connection \
new-connection-mark=E-mail-Conexao passthrough=yes comment="CONTROLE \
E-MAIL" disabled=no
Continuando a marcação de pacotes no firewall
add chain=prerouting protocol=tcp dst-port=25 action=mark-connection \
new-connection-mark=E-mail-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting protocol=udp dst-port=25 action=mark-connection \
new-connection-mark=E-mail-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting connection-mark=E-mail-Conexao action=mark-packet \
new-packet-mark=E-mail-Pacotes passthrough=no comment="" disabled=no
add chain=prerouting protocol=tcp dst-port=1863 action=mark-connection \
new-connection-mark=Messenger-Conexao passthrough=yes comment="CONTROLE \
MESSENGER" disabled=no
add chain=prerouting protocol=udp dst-port=1863 action=mark-connection \
new-connection-mark=Messenger-Conexao passthrough=yes comment="" \
disabled=no
add chain=prerouting protocol=tcp dst-port=6891-6901 action=mark-connection \
new-connection-mark=Messenger-Conexao passthrough=yes comment="" \
disabled=no
add chain=prerouting protocol=udp dst-port=6891-6901 action=mark-connection \
new-connection-mark=Messenger-Conexao passthrough=yes comment="" \
disabled=no
add chain=prerouting protocol=udp dst-port=5190 action=mark-connection \
new-connection-mark=Messenger-Conexao passthrough=yes comment="" \
disabled=no
add chain=prerouting connection-mark=Messenger-Conexao action=mark-packet \
new-packet-mark=Messenger-Pacotes passthrough=no comment="" disabled=no
add chain=prerouting protocol=tcp dst-port=22 action=mark-connection \
new-connection-mark=Acesso-Remoto-Conexao passthrough=yes \
comment="CONTROLE ACESSO REMOTO" disabled=no
add chain=prerouting protocol=tcp dst-port=23 action=mark-connection \
new-connection-mark=Acesso-Remoto-Conexao passthrough=yes comment="" \
disabled=no
add chain=prerouting protocol=tcp dst-port=3389 action=mark-connection \
new-connection-mark=Acesso-Remoto-Conexao passthrough=yes \
comment="Terminal Server" disabled=no
add chain=prerouting protocol=tcp dst-port=5800 action=mark-connection \
new-connection-mark=Acesso-Remoto-Conexao passthrough=yes comment="VNC" \
disabled=no
add chain=prerouting protocol=tcp dst-port=5900 action=mark-connection \
new-connection-mark=Acesso-Remoto-Conexao passthrough=yes comment="" \
disabled=no
add chain=prerouting protocol=tcp dst-port=8291 action=mark-connection \
new-connection-mark=Acesso-Remoto-Conexao passthrough=yes comment="Winbox" \
disabled=no
add chain=prerouting connection-mark=Acesso-Remoto-Conexao action=mark-packet \
new-packet-mark=Acesso-Remoto-Pacotes passthrough=no comment="" \
disabled=no
add chain=prerouting protocol=tcp dst-port=3306 action=mark-connection \
new-connection-mark=Banco-Dados-Conexao passthrough=yes comment="CONTROLE \
BANCO DE DADOS - SQL" disabled=no
add chain=prerouting protocol=tcp dst-port=1521 action=mark-connection \
new-connection-mark=Banco-Dados-Conexao passthrough=yes comment="Oracle" \
disabled=no
add chain=prerouting protocol=tcp dst-port=1433-1434 action=mark-connection \
new-connection-mark=Banco-Dados-Conexao passthrough=yes comment="Microsoft \
SQL Server" disabled=no
add chain=prerouting connection-mark=Banco-Dados-Conexao action=mark-packet \
new-packet-mark=Banco-Dados-Pacotes passthrough=no comment="" disabled=no
add chain=prerouting protocol=tcp dst-port=7171 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="CONTROLE JOGOS" \
disabled=no
add chain=prerouting protocol=tcp dst-port=27015 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting protocol=tcp dst-port=55905 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="Mu Online" \
disabled=no
add chain=prerouting protocol=udp dst-port=55905 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting protocol=tcp dst-port=4376 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="Line Age" \
disabled=no
add chain=prerouting protocol=udp dst-port=4376 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting protocol=tcp dst-port=6112 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="WarCraft" \
disabled=no
add chain=prerouting protocol=udp dst-port=6112 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting protocol=tcp dst-port=4500 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting protocol=udp dst-port=4500 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting protocol=tcp dst-port=6900 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting protocol=udp dst-port=6900 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting protocol=tcp dst-port=5000 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting protocol=udp dst-port=5000 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting protocol=tcp dst-port=27018 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="Counter Strike" \
disabled=no
add chain=prerouting protocol=udp dst-port=27018 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting protocol=tcp dst-port=27015 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting protocol=udp dst-port=27015 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting protocol=tcp dst-port=27020 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting protocol=udp dst-port=27020 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting protocol=tcp dst-port=27019 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting protocol=udp dst-port=27019 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting protocol=tcp dst-port=27013 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting protocol=udp dst-port=27013 action=mark-connection \
new-connection-mark=Jogos-Conexao passthrough=yes comment="" disabled=no
add chain=prerouting connection-mark=Jogos-Conexao action=mark-packet \
new-packet-mark=Jogos-Pacotes passthrough=no comment="" disabled=no
add chain=prerouting protocol=udp action=mark-connection \
new-connection-mark=UDP-Conexao passthrough=yes comment="CONTROLE UDP" \
disabled=no
add chain=prerouting connection-mark=UDP-Conexao action=mark-packet \
new-packet-mark=UDP-Pacotes passthrough=no comment="" disabled=no
add chain=prerouting action=mark-connection new-connection-mark=Outros-Conexao \
passthrough=yes comment="CONTROLE SERVICOS NAO IDENTIFICADOS" disabled=no
add chain=prerouting connection-mark=Outros-Conexao action=mark-packet \
new-packet-mark=Outros-Pacotes passthrough=no comment="" disabled=no