QoS: limit outbound traffic rate for particular source

qos
shaping

#1

Hello there.
I’m looking for example to limit outbound traffic rate from external interface (e.g. from eth0) if the source of this traffic belongs to particular network (e.g. 10.20.0.0/24). I really can’t understand all these QoS mechanisms, I’m confused so much.


#2

Try these commands:

set traffic-policy limiter LIMIT_SMTP
set traffic-policy limiter LIMIT_SMTP class 10 bandwidth 512kbit
set traffic-policy limiter LIMIT_SMTP class 10 match TRAFFIC_SMTP ip destination port smtp
set traffic-policy limiter LIMIT_SMTP class 10 match TRAFFIC_SMTP ip destination address xx.xx.xx.xx
set traffic-policy limiter LIMIT_SMTP class 10 match TRAFFIC_SMTP ip source  address yy.yy.yy.yy
set interfaces ethernet eth_xx traffic-policy in LIMIT_SMTP

Remove smtp related rule (destination port smtp) if you don’t need it.
Insert correct IPs into “address xx.xx.xx.xx”.