From: Afanasov Dmitry <ender@altlinux.org>
To: sysadmins@lists.altlinux.org
Subject: Re: [Sysadmins] IfDown and RtNetLink
Date: Mon, 28 Dec 2009 11:07:50 +0300
Message-ID: <20091228080749.GB3293@ender.fondinvestrk.ru> (raw)
In-Reply-To: <20091228072317.GA3293@ender.fondinvestrk.ru>
[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]
On Mon, Dec 28, 2009 at 10:23:19AM +0300, Afanasov Dmitry wrote:
> On Sun, Dec 27, 2009 at 02:46:02AM +0300, MisHel64 wrote:
> > Возможно такое, что с начало удаляется 5.6.7.0/24, и автоматически via
> > 5.6.7.8, а потом ifdown повторно удаляет via 5.6.7.8, а так как такого
> > маршрута нет, то и возникает ошибка?
> >
> > Возможен такой вариант?
> я думаю именно так и происходит.
в общем, критичные строки в /etc/net/scripts/ifdown:
# здесь убивается dhcp клиент, что влечет за собой удаление маршрутов.
63 stop_dhcp_client
# здесь происходит уборка маршрутов в том числе
139 is_yes "$CONFIG_IPV4" && $SCRIPTDIR/config-ipv4 $NAME stop "${IPV4ADDRESS[*]}" "${IPV6ADDRESS[*]}"
# а вот тут выключается интерфейс, если он не выключен
142 if iface_is_up $NAME; then
146 $IP link set dev $NAME down && print_progress
147 fi
вот в итоге и имеем, что для dhcp сначала выключаем iface, потом чистим
маршруты, а для статики сначала чистим, потом выключаем.
--
С уважением
Афанасов Дмитрий
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2009-12-28 8:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-26 5:12 MisHel64
2009-12-26 7:46 ` Anton Farygin
2009-12-26 9:16 ` MisHel64
2009-12-26 9:48 ` Afanasov Dmitry
2009-12-26 10:14 ` MisHel64
2009-12-26 10:31 ` Afanasov Dmitry
2009-12-26 23:46 ` MisHel64
2009-12-28 7:23 ` Afanasov Dmitry
2009-12-28 8:07 ` Afanasov Dmitry [this message]
2010-01-01 11:43 ` MisHel64
2009-12-26 9:57 ` Stanislav Vlasov
2009-12-26 10:10 ` MisHel64
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=20091228080749.GB3293@ender.fondinvestrk.ru \
--to=ender@altlinux.org \
--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