ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: "Peter V. Saveliev" <peet@altlinux.ru>
To: sisyphus@altlinux.ru
Cc: "Anatoly A. Ivanov" <anatol@fxp.ru>
Subject: [sisyphus] rt-network next
Date: Sun, 19 Dec 2004 22:57:11 +0300
Message-ID: <200412192257.11956.peet@altlinux.ru> (raw)

...

По мотивам переписки с Анатолием, кое-что поправил и краткая хавтушка.

Заливаю следующую версию (1.0-alt2), чуть подправив согласно пожеланиям.

Сначала необходимое пояснение: htb, как и cbq, которые я использую, зажимают 
_исходящий_ траффик, то есть, их можно ставить или на траффикогенерящих 
машинах (ограничивать скорость с какого-то порта), или на маршрутизаторах 
(ограничивать скорость проходящего траффика). Ограничение входящего траффика 
пока не приделано, да и то это уже будет на shaping, а policing, то есть на 
входящем можно только откидывать лишние пакеты, это понятно.

Чтобы использовать rt-network (с 1.0-alt2) _только_ для того, чтобы зажимать 
траффик, необходимы _только_ секции "shaper rule" и "ip shaper", никаких 
больше. Предположим, нужно зажать траффик, идущий через машину к хосту 
192.168.111.1 на порт 80:

[root@acer root]# cat /etc/sysconfig/rt-network/config 
! rt-network config file
!
shaper rule test
        address 192.168.111.1:80
        bound 128Kbit
!
ip shaper ethernet 0
        use rule test


Если нужно зажать траффик, идущий _с_ адреса 192.168.111.254 неважно, на этой 
же машине или через маршрутизацию, неважно куда:

shaper rule test
        address <192.168.111.254
        bound 128Kbit

Если нужно зажать траффик, идущий с адреса 192.168.111.254 на адрес 
192.168.111.1 порт 80:

shaper rule test
        address 192.168.111.1:80<192.168.111.254
        bound 128Kbit

Шейпер навешивается на интерфейс через ip shaper <name>, который name можно 
записывать как ethernet 0 или как eth0 -- кому как удобнее. То же -- bridge 0 
== br0, и так далее. Как быть с вланами без секции global, я пока ещё не 
думал. Завтра подумаю.

Алиасы интерфейсов за таковые не считаются -- очередь вешается только на сам 
интерфейс. Если нужно навесить шейпер на интерфейс eth0:1, нужно вешать на 
eth0, прописав исходящим соотв. адрес в shaper rule, если это нужно.

В строчке address адреса откуда и куда пишутся без пробелов, порты через :, 
сорцовый адрес предваряется <, даже если dest ip нет (см. выше в примерах).

Ещё пример, зажать траффик с порта 3100 на порт 80:

shaper rule test
        address :80<:3100
 bound 1Mbit

-- 
Peter V. Saveliev

                 reply	other threads:[~2004-12-19 19:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200412192257.11956.peet@altlinux.ru \
    --to=peet@altlinux.ru \
    --cc=anatol@fxp.ru \
    --cc=sisyphus@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git