Help understanding iproute2 and tc scripts

Hi all,

I am new to linux routing and would like to keep a possible running dialog about some scripts I have been studying and what the different parts of them mean. We are using Openwrt backfire along with openvpn and Swyx as VoIP. My goal is to eventually implement some QoS using dsmark, but I want to understand what I am doing before I put anything into production.

Here is the first part of the script I have a question about:

# tc qdisc add dev eth0 handle ffff: ingress
# tc filter add dev eth0 parent ffff: protocol ip prop 1 u32 \ match ip protocol 17 0xff police rate 240kbit \ burst 15kb continue flowid :1

I think I comprehend everything except 'burst 15kb continue flowid :1'. What does that mean, and what is the point of it?

According to the author: opalsoft(.) net/qos/VoIP(.) htm

Our first ingress filter, priority 1, catchs UDP packets (UDP is protocol number 17) policing them up to 240kbits. Then we can manage with this 15 conversations of 16kbps each. Check your VoIP implementation to know the bandwidth requeriment per session and adjust your command according.

Now our valuable packets are in the outgoing queue *(What is the outgoing queue? out going as in the LAN side or WAN side?)*as fast as we can. For this side I suggest a prio queue to kick them asap to the outgoing interface (again which one is outgoing?); then something like this can help:

Here is the second part that is confusing:

# tc qdisc add dev eth1 root handle 1: prio
# tc filter add dev eth1 parent 1:0 protocol ip prio 1 \ handle 1 tcindex classid 1:1

Is this filter for stuff coming from the WAN to the LAN, the other way or both?
I am a bit confused on what constitutes ingress and egress. If the WAN (eth1) gets packets thats ingress, but then if eth1 sends the packets to eth0 (LAN) thats then egress?

Sorry to be long winded, but I think I need to chat a bit to work out all the stuff I read. Thank you in advance!

-Shawn

Hello,

Any one have any ideas about this?

Regards,

Shawn