Answer the question
In order to leave comments, you need to log in
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
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.
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 questionAsk a Question
731 491 924 answers to any question