From: Di <denyago@rambler.ru>
To: ALT Linux sysadmin discuss <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] Два провайдера.
Date: Thu, 18 Jun 2009 17:30:14 +0300
Message-ID: <4A3A4F76.9080102@rambler.ru> (raw)
In-Reply-To: <1245318936.13218.6.camel@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 798 bytes --]
On 18.06.2009 12:55, Андрей Новосёлов wrote:
> Есть 2 провайдера
> основной и резервный. Надо организовать маршрутизатор так, чтобы при
> отвале одного автоматом подключался резервный. Или где почитать или
> может как организовать подскажите пожалуйста. Заранее спасибо.
Я где-то нашел скрипт, и он работает вполне нормально. Поставил в крон
на каждые 5 минут.
#!/bin/sh
GW1=1.2.3.4
GW2=4.3.2.1
/bin/ping -q -c 1 $GW1 > /dev/null 2>&1
if [ $? != 0 ]; then
/bin/ping -q -c 1 $GW2 > /dev/null 2>&1
if [ $? = 0 ]; then
if [ ! -f /tmp/gw.changed ]; then
/sbin/ip r change default via $GW2 \
&& touch /tmp/gw.changed
fi
fi
else
if [ -f /tmp/gw.changed ]; then
/sbin/ip r change default via $GW1 \
&& rm /tmp/gw.changed
fi
fi
[-- Attachment #2: denyago.vcf --]
[-- Type: text/x-vcard, Size: 366 bytes --]
begin:vcard
fn:Denis Timurovich Yagofarov
n:Yagofarov;Denis Timurovich
org:ITGIS NASU
adr:room 615;;Chokolovski blvdr., 13;Kiev;;03151;Ukraine
email;internet:denyago@rambler.ru
title:system administrator
tel;work:80442480755
tel;pager:diyago@jabber.te.ua
tel;home:80442434512
tel;cell:80662933760
note:diyago@jabber.te.ua
x-mozilla-html:FALSE
version:2.1
end:vcard
next prev parent reply other threads:[~2009-06-18 14:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-18 9:55 Андрей Новосёлов
2009-06-18 10:10 ` Шигапов Ринат
2009-06-18 10:12 ` Afanasov Dmitry
2009-06-18 11:13 ` Шишков Евгений
2009-06-18 10:58 ` Alexey I. Froloff
2009-06-18 14:30 ` Di [this message]
2009-06-18 14:39 ` Alexey I. Froloff
2009-06-24 3:37 ` Вадим Илларионов
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=4A3A4F76.9080102@rambler.ru \
--to=denyago@rambler.ru \
--cc=sysadmins@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 sysadmins discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/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 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
public-inbox-index sysadmins
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sysadmins
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git