[풀비누]님이 남기신 글:
>안녕하세요 ^^; 네트웍 bonding 기능을 이용한 이더넷 대역폭
늘리기에 대한 글을 보면서, 반대로 네트웍 대역폭을 낮추는
방법은 없을까 하고 생각해 봤는데, 그 부분에 대한 문서나,
글이 전무하더군요..
>
>IDC 에 입점하면서, 각 리눅스 박스에서 뽑을수 있는 최대
속도를 제한 할수 있느냐의 문제 입니다. ^^;
>
>나름대로 찾아봤는데. 레드헷 계열의 shapecfg 솔루션을
이용하면, 원하는 기능을 살릴 수 있을 것 같아, 이곳저곳을
뒤져 봤는데,,, 글이 전무하더군요 -_-;;;
>
>나름대로 howto 문서를 보면서 짜 맞춰 봤는데, 제대로 되는지
확인을 못하고 있습니다. ㅠ.ㅠ 산이님의 충고를 듣고자 이렇게
실례를 무릎쓰고 글을 남깁니다.
>
>아래는 howto 문서를 보고 제가 이렇게 설정하면 되겠다 하고
셋팅해 본 것입니다.
>
>Traffic Shaper For Linux
>
>This is the current ALPHA release of the traffic shaper for Linux. It
works
>within the following limits:
>
>o Minimum shaping speed is currently about 9600 baud (it can only
> shape down to 1 byte per clock tick)
>
>o Maximum is about 256K, it will go above this but get a bit
blocky.
>
>o If you ifconfig the master device that a shaper is attached to
down
> then your machine will follow.
>
>o The shaper must be a module.
>
>
>Setup:
>
>A shaper device is configured using the shapeconfig program.
>Typically you will do something like this
>
>shapecfg attach shaper0 eth1
>shapecfg speed shaper0 64000
>
>--
>shapecfg attach shaper0 eth0
>shapecfg speed shaper0 5120000 ( 5Mbit/sec )
>--
>
>ifconfig shaper0 myhost netmask 255.255.255.240 broadcast 1.2.3.4.255
up
>route add -net some.network netmask a.b.c.d dev shaper0
>
>ifconfig shaper0 host netmask mask broadcast bcast up
>route add -net net netmask mask dev shaper0
>
>--
>ifconfig shaper0 casper netmask 255.255.255.0 broadcast 210.118.169.255
up
>route add -net 210.118.169.0 netmask 255.255.255.0 dev shaper0
>
>ip 210.118.169.13
>netmask 255.255.255.0
>gateway 210.118.169.1
>network 210.118.169.0
>broadcast 210.118.169.255
>--
>
>route delete default eth0
>route add default gw gateway shaper0
>
>--
>route add default gw 210.118.169.1 shaper0
>route delete default eth0 (리모드 작업시 네트웍이 죽을수
있으므로 주의)
>--
>
>
>The shaper should have the same IP address as the device it is attached
to
>for normal use.
>
>Gotchas:
>
> The shaper shapes transmitted traffic. It's rather impossible
to
>shape received traffic except at the end (or a router) transmitting it.
>
> Gated/routed/rwhod/mrouted all see the shaper as an additional
device
>and will treat it as such unless patched. Note that for mrouted you can
run
>mrouted tunnels via a traffic shaper to control bandwidth usage.
>
> The shaper is device/route based. This makes it very easy to
use
>with any setup BUT less flexible. You may well want to combine this
patch
>with Mike McLagan 's patch to allow routes to be
>specified by source/destination pairs.
>
> There is no "borrowing" or "sharing" scheme. This is a
simple
>traffic limiter. I'd like to implement Van Jacobson and Sally Floyd's
CBQ
>architecture into Linux one day (maybe in 2.1 sometime) and do this
with
>style.
========================================
답변이 늦었습니다.
shaper는 아직 베터버전인것 같군요..
CBQ (Class-Based Queueing)를 설정해 보는 것이 어떨까요?
(직접 해보질 않아서..)
shaper는 네트워크 인터페이스 기반 sharing 이군요.
문서는
/usr/share/doc/shapecfg-2.2.12/README.cbq
에 예제가 나와 있군요
커널이미지에 CBQ 부분을 넣어야 하겠지요...
그리고
네트워크 대여폭을 인터페이스 기준으로 줄이는 것보다는
각각의 최상위 어플리케이션 층에서 조절해 주는 것이 더 낫을
듯한데,
예를 들어 아파치에선 bandwidth
...
|