User Tools

Site Tools


doc:howto:packet.scheduler:packet.scheduler.example4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
doc:howto:packet.scheduler:packet.scheduler.example4 [2012/09/11 22:51]
champtar title
doc:howto:packet.scheduler:packet.scheduler.example4 [2012/09/12 00:29] (current)
champtar Other end
Line 1: Line 1:
-====== Example4: HFSC + FQ_CODEL + FLOW classifier; ​basic ip based fair sharing behind triple play box ======+====== Example4: HFSC + FQ_CODEL + FLOW classifier; ​====== 
 +===== Basic ip-based fair sharing behind triple play box ===== 
  
 In this exemple the router is not connected directly to internet, but throught another router (triple play box for exemple, with adsl connection). In this exemple the router is not connected directly to internet, but throught another router (triple play box for exemple, with adsl connection).
Line 106: Line 108:
  
  
 +===== Other end =====
 +
 +<code bash>
 +$TC qdisc add dev $IF_WAN root       ​handle ​ 1   hfsc default 2
 +
 +$TC class add dev $IF_WAN parent 1:  classid 1:1  hfsc sc rate ${UP_RATE}kbit ul rate ${UP_RATE}kbit
 +$TC qdisc add dev $IF_WAN parent 1:1 handle 11: fq_codel
 +$TC filter add dev $IF_WAN parent 11: handle 11 protocol all flow hash keys nfct-src divisor 1024
 +
 +$TC class add dev $IF_WAN parent 1:  classid 1:2  hfsc sc rate ${PHY_RATE}mbit ul rate ${PHY_RATE}mbit
 +$TC filter add dev $IF_WAN parent 1: protocol ip prio 1 u32 match ip dst ${WAN_NET} flowid 1:2 # match all local ip traffic
 +$TC filter add dev $IF_WAN parent 1: protocol ip prio 1 u32 match ip dst 255.255.255.255/​32 flowid 1:2 # Limited Broadcast
 +#$TC filter add dev $IF_WAN parent 1: protocol ip prio 1 u32 match ip dst 169.254.0.0/​16 flowid 1:2 # link-local
 +#$TC filter add dev $IF_WAN parent 1: protocol ip prio 1 u32 match ip dst 224.0.0.0/4 flowid 1:2 # multicast
 +
 +$TC filter add dev $IF_WAN parent 1: protocol ip prio 2 u32 match u32 0 0 flowid 1:1 # match all the remaining ip traffic
 +
 +#$TC filter add dev $IF_WAN parent 1: protocol all prio 3 u32 match u32 0 0 flowid 1:2 # useless as we use default 2
 +</​code>​
doc/howto/packet.scheduler/packet.scheduler.example4.txt · Last modified: 2012/09/12 00:29 by champtar