Hello,
I try to accomplish this using traffic shaping:
so when the clients receive or send traffic to the DMZ will be shaped by 2 Gbps, but when they go to the Internet they will be shaped by 500 Mbps.
My first approach is this:
set traffic-policy shaper INET-IN bandwidth 2gbit
set traffic-policy shaper INET-IN class 10 bandwidth 100%
set traffic-policy shaper INET-IN class 10 match INET6-IN-WAN ipv6 source address 2001:db8:1::/48
set traffic-policy shaper INET-IN class 10 match INET-IN-WAN ip source address 1.2.2.0/24
set traffic-policy shaper INET-IN class 10 queue-type fq-codel
set traffic-policy shaper INET-IN class 20 bandwidth 500mbit
set traffic-policy shaper INET-IN class 20 match INET6-IN-WAN-SHAPING ipv6 destination address 2001:db8:2::/48
set traffic-policy shaper INET-IN class 20 match INET-IN-WAN-SHAPING ip destination address 1.2.2.2/32
set traffic-policy shaper INET-IN class 20 queue-type fq-codel
set traffic-policy shaper INET-IN default bandwidth 100%
set traffic-policy shaper INET-IN default queue-type fq-codel
set traffic-policy shaper INET-OUT bandwidth 2gbit
set traffic-policy shaper INET-OUT class 10 bandwidth 100%
set traffic-policy shaper INET-OUT class 10 match INET6-OUT-WAN ipv6 destination address 2001:db8:1::/48
set traffic-policy shaper INET-OUT class 10 match INET-OUT-WAN ip destination address 1.2.2.0/24
set traffic-policy shaper INET-OUT class 10 queue-type fq-codel
set traffic-policy shaper INET-OUT class 20 bandwidth 500mbit
set traffic-policy shaper INET-OUT class 20 match INET6-OUT-WAN-SHAPING ipv6 source address 2001:db8:2::/48
set traffic-policy shaper INET-OUT class 20 match INET-OUT-WAN-SHAPING ip source address 1.2.2.2/32
set traffic-policy shaper INET-OUT class 20 queue-type fq-codel
set traffic-policy shaper INET-OUT default bandwidth 100%
set traffic-policy shaper INET-OUT default queue-type fq-codel
set interfaces bonding bond0 traffic-policy out INET-OUT
set interfaces bonding bond0 redirect ifb0
set interfaces input ifb0 traffic-policy out INET-IN
But the clients connections fluctuate, even a ping jumps with higer latency.
What is wrong with the code?
Thanks!