From: Dmitry Lebkov <dima@sakhalin.ru> To: community@altlinux.ru Subject: Re: [Comm] два интерфейса в одной сети - куда правильнее прописать метрику в /etc/sysconfig ? Date: Fri, 1 Aug 2003 08:49:45 +1100 Message-ID: <20030801084945.287d013c.dima@sakhalin.ru> (raw) In-Reply-To: <20030731130754.53471642.olli@rbauto.ru> On Thu, 31 Jul 2003 13:07:54 +0400 "Oleg K. Artemjev" <olli@rbauto.ru> wrote: > Hi. > > subj. хочу второй ethernet использовать как резервный. Куда и какой > переменной прописывать метрику для роутинга на данном интерфейсе? Частный случай с default route и двумя интерфейсами в одной сети можно "объехать" следующим образом: - из /etc/sysconfig/networks "выбрасываются" все упоминания GATEWAY* - в /etc/sysconfig/static-routes пишется следующее: eth0 net 0.0.0.0 netmask 0.0.0.0 gw 192.168.100.253 dev eth1 net 0.0.0.0 netmask 0.0.0.0 gw 192.168.100.253 metric 254 dev В этом случае, приподнятии eth0 - поднимится default route с метрикой 0 через eth0 и default route с метрикой 254 через eth1. > По умолчанию поднимается с одной метрикой, причем на каких > основаниях в таком случае осуществляется выбор интерфейса я не > понимаю: [skip routes] Если есть два одинаковых роута с одинаковой метрикой, то (если я ничего не путаю) работает примитивный load-balancing, т.е. для отправки пакетов по-очередно используются оба интерфейса. Ну а для того, чтоб расставлять метрики роутов для connected-сети (т.е. сети, куда подключен интерфейс) придется патчить скрипт ifup на предмет чего-нить типа METRIC=N в конфигурации интерфейса. -- WBR, Dmitry Lebkov
next prev parent reply other threads:[~2003-07-31 21:49 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-07-31 9:07 Oleg K. Artemjev 2003-07-31 10:04 ` Maxim.Savrilov 2003-07-31 10:43 ` Oleg K. Artemjev 2003-07-31 10:57 ` Maxim.Savrilov 2003-07-31 11:35 ` Oleg K. Artemjev 2003-07-31 16:13 ` Igor Solovyov 2003-08-01 7:21 ` Oleg K. Artemjev 2003-08-01 9:33 ` Dmitry Lebkov 2003-08-01 10:13 ` Oleg K. Artemjev 2003-08-03 4:58 ` Igor Solovyov 2003-08-04 6:55 ` Oleg K. Artemjev 2003-08-04 13:42 ` Igor Solovyov 2003-07-31 21:49 ` Dmitry Lebkov [this message] 2003-08-01 15:19 ` Oleg K. Artemjev
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=20030801084945.287d013c.dima@sakhalin.ru \ --to=dima@sakhalin.ru \ --cc=community@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 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