Help understanding iproute2 and tc scripts

Thread Tools Search this Thread
Special Forums IP Networking Help understanding iproute2 and tc scripts
# 1  
Old 09-05-2011
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!

# 2  
Old 09-15-2011
Any ideas?


Any one have any ideas about this?


Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Understanding the difference between individual BASH login scripts

Hello... and thanks in advance for reading this or offering me any assistance I'm trying to understand specific differences between the various login scripts... I understand the differences between interactive vs non-interactive and login vs non-login shells... and that's not where my question... (4 Replies)
Discussion started by: bodisha
4 Replies

2. IP Networking

iproute2 loopback source address

Hi, I'm trying to set up a test bed where I can use a single machine to do some network packet captures between 2 different applications without needing a network connection. I'm actually trying to do some SIP VoIP development, but for illustration purposes will use ping. I want: ping (0 Replies)
Discussion started by: racitup
0 Replies

3. Programming

iproute2 for Python?

I have seen a lot of IPv4/IPv6 address manipulation libraries but I have yet to see a library allowing you to manipulate the interfaces/addresses/routes. Anybody else have any experience finding an iproute2 equivalent for Python? My basic requirements are the ability to add/remove addresses,... (1 Reply)
Discussion started by: jjinno
1 Replies

4. Shell Programming and Scripting

KSH - How to call different scripts from master scripts based on a column in an Oracle table

Dear Members, I have a table REQUESTS in Oracle which has an attribute REQUEST_ACTION. The entries in REQUEST_ACTION are like, ME, MD, ND, NE etc. I would like to create a script which will will call other scripts based on the request action. Can we directly read from the REQUEST_ACTION... (2 Replies)
Discussion started by: Yoodit
2 Replies

5. Shell Programming and Scripting

Need a better understanding of shell scripts

Need a better understanding of shell scripts (14 Replies)
Discussion started by: sureshkumar4737
14 Replies

6. Shell Programming and Scripting

Changing the Bash Scripts to Bourne Scripts:URGENT

Hi, I have to write a program to compute the checksums of files ./ I wrote the program using bash and it took me forever since I am a beginner but it works very well. I'm getting so close to the deadline and I realised today that actually I have to use normal Bourne shell... (3 Replies)
Discussion started by: pgarg1989
3 Replies

7. Shell Programming and Scripting

Running scripts within scripts from cron

Hi all, I have set up a cron job which calls another shell script shell script which in turn calls a Java process. The cron tab looks so. 0,30 7-18 * * 1-5 /u01/home/weblogic/brp/bin/ >> /u01/home/weblogic/logs/checkstatus.log The scripts looks like this. ... (4 Replies)
Discussion started by: sirbrian
4 Replies

8. Shell Programming and Scripting

Need help on understanding the Shell and AWK scripts

Hello Friends, I am new to the scripting & have to analyze bunch of regular production scripts. It has .ksh which calls on the .awk script having many functions I need to understand and debug the scripts ASAP Can anybody please let me know as how can I debug, I want to see the flow of code... (3 Replies)
Discussion started by: amberj123
3 Replies

9. UNIX for Dummies Questions & Answers

Profile scripts versus rc scripts....

what is the difference between login and profile scripts versus the rc scripts? (1 Reply)
Discussion started by: rookie22
1 Replies

10. UNIX for Dummies Questions & Answers

Understanding System Vish startup scripts

I'm trying to get a clear picture of how startup scripts are executed during bootup. When run-level N is entered, the scripts in /rcN.d are executed. I understand that the S* scripts are executed in numerical order during bootup. What I don't understand is if the K* scripts are executed... (0 Replies)
Discussion started by: darkmatter14B
0 Replies
Login or Register to Ask a Question