* [mdk-re] HELP NEED @ 2001-01-19 23:21 Igor Solovyov 2001-01-19 23:35 ` Alexander Bokovoy 0 siblings, 1 reply; 5+ messages in thread From: Igor Solovyov @ 2001-01-19 23:21 UTC (permalink / raw) To: Mandrake-Russian Hi All! Очень срочно (до понедельника) нужно разрешить такую проблему: Есть рутер, к нему несколько локалок прицеплено. И имеются два канала в и-нет - один скоростной (radio-ethernet), второй медленный (выделенка на 115 кбит/с). Нужно разделить и-нет между локалками. Т.е. часть локалок идут все время через медленный канал, остальные - через скоростной. Не пойму как этого можно добиться. Когда был один канал, все было просто - прописал default gateway и нет проблем. А как сделать для разных сетей разные default gateway в одном рутере? Видимо никак. Может есть иные способы? Или это вообще невозможно? Если кто боролся или знает как побороть, ПОМОГИТЕ! -- Best regards! Igor Solovyov Zlatoust, Russia ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [mdk-re] HELP NEED 2001-01-19 23:21 [mdk-re] HELP NEED Igor Solovyov @ 2001-01-19 23:35 ` Alexander Bokovoy 2001-01-20 0:03 ` Igor Solovyov 2001-01-20 0:35 ` Igor Solovyov 0 siblings, 2 replies; 5+ messages in thread From: Alexander Bokovoy @ 2001-01-19 23:35 UTC (permalink / raw) To: mandrake-russian On Sat, Jan 20, 2001 at 01:21:20AM -0500, Igor Solovyov wrote: > Hi All! > > Очень срочно (до понедельника) нужно разрешить такую проблему: > > Есть рутер, к нему несколько локалок прицеплено. > И имеются два канала в и-нет - один скоростной (radio-ethernet), > второй медленный (выделенка на 115 кбит/с). > Нужно разделить и-нет между локалками. Т.е. часть локалок > идут все время через медленный канал, остальные - через скоростной. > > Не пойму как этого можно добиться. Когда был один канал, все было > просто - прописал default gateway и нет проблем. А как сделать > для разных сетей разные default gateway в одном рутере? > Видимо никак. Может есть иные способы? Есть. Ставите iproute2/iputils. Затем определяете две таблицы маршрутизации и добавляете правила, определяющие какую из них для какой сети использовать. Вроде такого (номера таблиц я взял "от балды", чтоб не пересеклись с тем, что там есть по умолчанию): echo "10 highspeed" >> /etc/iproute2/rt_tables echo "11 lowspeed" >> /etc/iproute2/rt_tables Теперь выставим маршруты в таблицах, для простоты -- только по умолчанию: /sbin/ip route add default via ШЛЮЗ-БЫСТРОГО-КАНАЛА table highspeed /sbin/ip route add default via ШЛЮЗ-МЕДЛЕННОГО-КАНАЛА table lowspeed Теперь определим, кто куда ходит (повторить столько раз, сколько подсетей входит в БЫСТРАЯ-СЕТЬ и МЕДЛЕННАЯ-СЕТЬ, каждый раз изменяя preference -- это значение должно быть уникальным для каждого правила -- и, естественно, подсеть): /sbin/ip rule add from БЫСТРАЯ-ПОДСЕТЬ/МАСКА preference 100 table highspeed /sbin/ip rule add from МЕДЛЕННАЯ-ПОДСЕТЬ/МАСКА preference 200 table lowspeed Я выбрал 100 и 200 "от балды". А теперь скажем, что все должно начать работать: /sbin/ip route flush cache Можно также поставить что-нибудь еще в основной (main) таблице по умолчанию (например, ШЛЮЗ-БЫСТРОГО-КАНАЛА), тогда одним набором правил будет меньше. Читайте ip-cref.ps из документации на iproute2 для больших подробностей. -- Sincerely yours, Alexander Bokovoy The Midgard Project | www.midgard-project.org | Aurora R&D team Minsk Linux Users Group | www.minsk-lug.net | www.aurora-linux.com IPLabs Linux Team | linux.iplabs.ru | Architecte Open Source -- "Trust me. I know what I'm doing." -- Sledge Hammer ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [mdk-re] HELP NEED 2001-01-19 23:35 ` Alexander Bokovoy @ 2001-01-20 0:03 ` Igor Solovyov 2001-01-20 0:35 ` Igor Solovyov 1 sibling, 0 replies; 5+ messages in thread From: Igor Solovyov @ 2001-01-20 0:03 UTC (permalink / raw) To: mandrake-russian Hi ! On Fri, 19 Jan 2001 22:31:46 +0200 Alexander Bokovoy <ab@avilink.net> wrote: AB> Есть. Ставите iproute2/iputils. Затем определяете две таблицы маршрутизации AB> и добавляете правила, определяющие какую из них для какой сети использовать. ОГРОМНОЕ СПАСИБО! Завтра "забодаю" это дело! -- Best regards! Igor Solovyov Zlatoust, Russia ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [mdk-re] HELP NEED 2001-01-19 23:35 ` Alexander Bokovoy 2001-01-20 0:03 ` Igor Solovyov @ 2001-01-20 0:35 ` Igor Solovyov 2001-01-20 0:53 ` Aleksey Novodvorsky 1 sibling, 1 reply; 5+ messages in thread From: Igor Solovyov @ 2001-01-20 0:35 UTC (permalink / raw) To: mandrake-russian Hi ! On Fri, 19 Jan 2001 22:31:46 +0200 Alexander Bokovoy <ab@avilink.net> wrote: AB> Есть. Ставите iproute2/iputils. Затем определяете две таблицы маршрутизации AB> и добавляете правила, определяющие какую из них для какой сети использовать. WoW! Я тут потыкался в и-нет, гляжу, а это оказывается для ядра 2.4. А где взять iproute2 для ядер меньше 2.4? И будет ли это работать на 2.2.14....2.2.18 ? -- Best regards! Igor Solovyov Zlatoust, Russia ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [mdk-re] HELP NEED 2001-01-20 0:35 ` Igor Solovyov @ 2001-01-20 0:53 ` Aleksey Novodvorsky 0 siblings, 0 replies; 5+ messages in thread From: Aleksey Novodvorsky @ 2001-01-20 0:53 UTC (permalink / raw) To: mandrake-russian Igor Solovyov wrote: > > Hi ! > On Fri, 19 Jan 2001 22:31:46 +0200 Alexander Bokovoy <ab@avilink.net> wrote: > > AB> Есть. Ставите iproute2/iputils. Затем определяете две таблицы маршрутизации > AB> и добавляете правила, определяющие какую из них для какой сети использовать. > > WoW! > Я тут потыкался в и-нет, гляжу, а это оказывается для ядра 2.4. > А где взять iproute2 для ядер меньше 2.4? > И будет ли это работать на 2.2.14....2.2.18 ? > -- Возьмите в Sisyphus. Rgrds, AEN ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-01-20 0:53 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2001-01-19 23:21 [mdk-re] HELP NEED Igor Solovyov 2001-01-19 23:35 ` Alexander Bokovoy 2001-01-20 0:03 ` Igor Solovyov 2001-01-20 0:35 ` Igor Solovyov 2001-01-20 0:53 ` Aleksey Novodvorsky
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