mikrotik 1100x2 DSCP_based_QoS_with_HTB
Добавлено: 18 мар 2019, 12:36
Здравствуйте. на версии прошивки 6.43 скрипты для QOS на вики микротика работали https://wiki.mikrotik.com/wiki/DSCP_based_QoS_with_HTB . Интернет приходил от провайдер по PPPoE . Провайдер изменил настройки и интернет приходит по транковому порту . PPPoE убралось остались вланы. После обновления на 6.44 перестал отображаться траффик в Queues- Queue Tree . Трафик по нулям. На ether1 приходят 2 влана vlan100 (интернет от провайдера ) и Vlan200 (L2 канал в филиал).
Маркируем траффик:
Делаем приоритеты:
очередь создается но траффик показывает ноль. Как узнать работают ли приоритеты? Может маркировать весь ether1 а не отдельный влан?
Маркируем траффик:
Код: Выделить всё
:for x from 0 to 63 do={/ip firewall mangle add action=mark-packet chain=postrouting \
comment=("dscp_" . $x . "vlan100") disabled=no dscp=$x new-packet-mark=("dscp_" . $x . "vlan100") passthrough=no}
Код: Выделить всё
#Set interface here
:global outboundInterface "vlan100"
#Set bandwidth of the interface (remember, this is for OUTGOING)
:global interfaceBandwidth 0
#Set where in the chain the packets should be mangled
:global mangleChain postrouting
#Don't mess with these. They set the parameters for what is to follow
:global queueName ("qos_" . $outboundInterface)
:global qosClasses [:toarray "netcon,intercon,critical,flash_override,flash,immedate,priority,routine"]
:global qosIndex 64
#Set up mangle rules for all 64 DSCP marks
#This is different in that the highest priority packets are mangled first.
:for indexA from 63 to 0 do={
/ip firewall mangle add \
action=mark-packet \
chain=$mangleChain \
comment=("dscp_" . $indexA) \
disabled=no \
dscp=$indexA \
new-packet-mark=("dscp_" . $indexA) \
passthrough=no
}
#Add a base queue to the queue tree for the outbound interface
/queue tree add \
max-limit=$interfaceBandwidth \
name=$queueName \
parent=$outboundInterface \
priority=1
#Set up queues in queue tree for all 64 classes, subdivided by 8.
:for indexA from=0 to=7 do={
:local subClass ([:pick $qosClasses $indexA] . "_" . $outboundInterface)
/queue tree add \
name=$subClass \
parent=$queueName \
priority=($indexA+1) \
queue=ethernet-default
:for indexB from=0 to=7 do={
:set qosIndex ($qosIndex-1)
/queue tree add \
name=($subClass . "_" . $indexB) \
parent=$subClass \
priority=($indexB+1) \
packet-mark=("dscp_" . $qosIndex) \
queue=ethernet-default
}
}