LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to limit speed of venet (https://www.linuxquestions.org/questions/linux-networking-3/how-to-limit-speed-of-venet-936451/)

progammer 03-26-2012 04:23 AM

How to limit speed of venet
 
I am googling from last 2 days but didn't find anything useful to me.

I am running centos 5.4 32bit under openvz vps.

server is running on ip: 123.23.23.39 - just an example

According to ifconfig this ip is under venet0:1 adapter

I need to know how to limit the speed of this adapter?

cgtueno 03-26-2012 06:17 AM

Hi

Would this information be of some assistance ?

http://wiki.openvz.org/Traffic_shaping_with_tc

C.

progammer 03-26-2012 06:41 AM

Quote:

Originally Posted by cgtueno (Post 4636423)
Hi

Would this information be of some assistance ?

http://wiki.openvz.org/Traffic_shaping_with_tc

C.

I tried this one but didn't work.

cgtueno 03-26-2012 06:55 AM

Hmm
I'll keep digging

cgtueno 03-26-2012 06:58 AM

Could you please cut and paste the command line code you tried, and the resulting output,
so I can get an idea of the approach you are using

progammer 03-26-2012 07:59 AM

Quote:

Originally Posted by cgtueno (Post 4636463)
Could you please cut and paste the command line code you tried, and the resulting output,
so I can get an idea of the approach you are using

Following is the code and after executing second line I got an error.
Code:

root@server [~]# DEV=venet0
root@server [~]# tc qdisc del dev $DEV root
RTNETLINK answers: Invalid argument


cgtueno 03-27-2012 09:19 AM

According to:

http://linux.die.net/man/8/tc

tc has no "del" option - very strange

Can you check your implementation's man pages
for tc and see if it has a "del" parameter ?

Did you try (just thinking out loud) dropping
the first command line in the example entirely
("del" line), and making the next line
"replace" or "change" (instead of "add"),
and then enter the rest of the lines as
shown in the example ?

C.

progammer 03-27-2012 09:49 AM

Same Error again.

Code:

root@server [~]# DEV=venet0
root@server [~]# tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 100mbit
RTNETLINK answers: Invalid argument

Code:

root@server [~]# DEV=venet0
root@server [~]# tc qdisc add dev $DEV root
RTNETLINK answers: Invalid argument
root@server [~]#


cgtueno 03-27-2012 08:16 PM

Hmmm

Have you checked the command line syntax in the example against the
man entry for 'tc' in your distribution ?

Because it sounds like your distribution's implementation of tc
is not the same as openvz

C.

progammer 03-30-2012 12:23 AM

Here is output for only tc commnad:

Code:

root@server [~]# tc
Usage: tc [ OPTIONS ] OBJECT { COMMAND | help }
      tc [-force] -batch file
where  OBJECT := { qdisc | class | filter | action | monitor }
      OPTIONS := { -s[tatistics] | -d[etails] | -r[aw] | -b[atch] [file] }
root@server [~]#



All times are GMT -5. The time now is 06:57 PM.