查看: 205|回复: 0

[Mikrotik Ros] Mikrotik RouterOS VoIP 流量 QoS 队列脚本

[复制链接]

124

主题

0

回帖

508

积分

管理员

积分
508
发表于 2026-8-20 21:34:27 | 显示全部楼层 |阅读模式
  1. # VoIP Traffic QoS Queuing

  2. # Rule 1: Mark connections coming FROM the VoIP gateway
  3. /add chain=prerouting src-address=xxx.xxx.xxx.xxx action=mark-connection new-connection-mark=VoIP_conn;

  4. # Rule 2: Mark connections going TO the VoIP gateway
  5. /add chain=prerouting dst-address=xxx.xxx.xxx.xxx action=mark-connection new-connection-mark=VoIP_conn;

  6. # Rule 3: Mark actual VoIP packets based on the connection mark
  7. /add chain=prerouting connection-mark=VoIP_conn action=mark-packet new-packet-mark=VoIP_packet passthrough=no;

  8. # Queues for Bandwidth Management
  9. # Note: Each concurrent VoIP call requires approximately 100 Kbps of upload and 100 Kbps of download bandwidth.
  10. # Allocating 1 Mbps for VoIP should cover around 10 concurrent calls (considering overheads).
  11. # Adjust the bandwidth allocation according to the expected number of concurrent calls.

  12. # Queue 1: Prioritized VoIP Traffic
  13. /queue simple
  14. add name="VoIP Traffic" target=0.0.0.0/0 packet-mark=VoIP_packet max-limit=1M/1M priority=1;

  15. # Queue 2: All Other Traffic
  16. add name="All Other Traffic" target=0.0.0.0/0 packet-mark=no-mark max-limit=99M/99M priority=2;
复制代码


您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注公众号

相关侵权、举报、投诉及建议等,请发 E-mail:admin@discuz.vip

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.|蜀ICP备17024538号-6

在本版发帖
关注公众号
QQ客服返回顶部