Re: tc and CONNMARK

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just realised I'd sent this direct not via list... must remember to
check address lines before sending in future.

2009/10/6 Richard Horton <arimus.uk@xxxxxxxxxxxxxx>:
> 2009/10/6 Fabio Marcone <fabio.marcone@xxxxxxx>:
>
>> what kind of problems? What do you mean with "I switch to classid" ?
>>
>
> Classid in this context I would assume to mean using the diff serv
> code point field (was the ToS field) in the IP Header and making
> queuing decisions based on the diffserv value rather than using
> marking in the packet structure.
>
> If you use Classid there are two routes you can go do;
>
> Route 1 uses 'class selectors' and provides 8 levels of discrimination.
> Route 2 goes down the full diffserv path and provides 3 levels of
> traffic - Expedited forwards, Assured Forwarding and 'Best' Effort
> (which is anything but best).
>
> The EF class is designed for real-time jitter (variation of delay)
> sensitive traffic, AF is designed for loss-intolerant traffic and
> provides 4 levels of forwarding each with 3 levels of drop precedence
> and BE is well... whatever is left over.
>
> Using the AFxy (x class, y drop precedence) you can define some
> complex schemes with each class having a guaranteed bandwidth with
> packets being dropped on the basis of their drop precedence...
>
>
> For instance to mark rtp and give it decent bandwidth/priority and sip
> slightly lower...
>
> (Using port 20000/20001 for rtp, 5060 for sip)
> iptables -A INPUT -t mangle -p udp -dport 5060 -j DSCP --set-dscp-class AF41
> iptables -A INPUT -t mangle -p udp -dport 20000 -j DSCP --set-dscp-class EF
> iptables -A INPUT -t mangle -p udp -dport 20001 -j DSCP --set-dscp class EF
>
> tc qdisc add dev eth0 root handle 1: htb default 10
> tc class add dev eth0 classid 1:10 parent 1: htb rate 10mbps ceil 10mbps prio 10
> tc class add dev eth0 classid 1:20 parent 1: htb rate 30mbps ceil 40mbps prio 5
> tc class add dev eth0 classid 1:30 parent 1: htb rate 60mbps ceil 100mbps prio 0
>
> tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 \
>   match ip tos 0x88 0xff flowid 1:20
> tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 \
>   match ip tos 0xB8 0xff flowid 1:30
>
>
>
> --
> Richard Horton
> Users are like a virus: Each causing a thousand tiny crises until the
> host finally dies.
> http://www.solstans.co.uk - Solstans Japanese Bobtails and Norwegian Forest Cats
> http://www.pbase.com/arimus - My online photogallery
>



-- 
Richard Horton
Users are like a virus: Each causing a thousand tiny crises until the
host finally dies.
http://www.solstans.co.uk - Solstans Japanese Bobtails and Norwegian Forest Cats
http://www.pbase.com/arimus - My online photogallery
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux