From: "Vladimir Lettiev" <thecrux@gmail.com>
To: "Vitalik Salomatin" <chelroot74@mail.ru>,
"ALT Linux Community general discussions"
<community@lists.altlinux.org>
Subject: Re: [Comm] Можно ли получать запросы http на один IP, а отвечать другим IP
Date: Sat, 27 Sep 2008 23:17:34 +0400
Message-ID: <3b8491740809271217m254c12f1v73333eb493600a52@mail.gmail.com> (raw)
In-Reply-To: <E1KjG0o-0005xy-00.chelroot74-mail-ru@f49.mail.ru>
26 сентября 2008 г. 20:17 пользователь Vitalik Salomatin <chelroot74@> написал:
> Сервер виден снаружи по двум IP. Работает, просто пропускная способность разная по скорости и стоимости.
>
> Вопрос:
>
> Есть ли тежническая возможность свести к минимуму дорогой входной канал оптики, загрузив безлимитный входящий ADSL?
> И наоборот, загрузить халявный исходящий канал оптики на скачивание, разгрузив жутко плохой исходящий канал ADSL.
При такой постановке вопроса всё просто:
Веб-серфинг пустить по adsl, а для подключения к вашим сервисам (ftp,
http...) из вне использовать оптику. Это как раз и даст нужный вам
результат, поскольку для веб-серфинга соотношение вх/исх трафика
примерно 10/1, а для веб-сервера и прочих соотношение обратное 1/10.
Сделать это можно так.
Пусть net1 - сеть "сёрферов", net2 - сеть с серверами (dmz). Всё это
внутри вашей локалки.
Роутер: eth1, ipgw1 - adsl-интерфейс и адрес шлюза провайдера, eth2,
ipgw2 - интерфейс на оптику, и адрес шлюза провайдера
создаём записи для двух таблиц adsl и optic в /etc/iproute2/rt_tables,
затем прописываем маршруты для этих таблиц для дефолтного роута:
ip route add default via ipgw1 dev eth1 table adsl
ip route add default via ipgw2 dev eth2 table optic
добавляем правила, которые отправят сёрферов через adsl, а сервера на оптику:
ip rule add from net1 table adsl
ip rule add from net2 table optic
правила для iptables для snat, dnat приводить не буду - стандартно.
--
Vladimir Lettiev aka crux <theCrux@gmail.com>
prev parent reply other threads:[~2008-09-27 19:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-26 16:17 Vitalik Salomatin
2008-09-27 4:37 ` kaf
2008-09-27 4:39 ` Serge
2008-09-27 9:20 ` Roman V. Tutov
2008-09-27 19:17 ` Vladimir Lettiev [this message]
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=3b8491740809271217m254c12f1v73333eb493600a52@mail.gmail.com \
--to=thecrux@gmail.com \
--cc=chelroot74@mail.ru \
--cc=community@lists.altlinux.org \
/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 Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git