S
S
sas10242012-05-05 21:55:32
linux
sas1024, 2012-05-05 21:55:32

Limiting the outgoing speed of the virtual interface

Hello!

There is a dedicated Linux server with one network interface and two IP addresses. Support for a second IP address is implemented using the eth0:1 virtual subinterface.

I would like to configure the server's web content to be displayed from eth0, and the distribution of files was carried out from eth0:1 using nginx, but the question arises - how to limit the channel width for eth0:1? Will tc work for this? Or does it not know how to work with virtual subinterfaces?

In general, please share your experience.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
EvilMan, 2012-05-05
@sas1024

1. eth0:1 is not a virtual interface, but just an alias, it cannot have a separate queue discipline.
2. tc will do. Discipline is hung on the entire interface (eth0) and two child classes are created - one with a rate limit, the second - for the entire width. Send all packets with the specified sender address to the class with a rate limit (this will be the ip address on eth0:1). For details, I recommend contacting lartc.

V
Vitaly Peretyatko, 2012-05-06
@viperet

By the way, you can limit the speed of content delivery and use nginx - nginx.org/ru/docs/http/ngx_http_core_module.html#limit_rate

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question