Subject: [alpine-devel] Feature for NETDOWN=no

From: Natanael Copa <[email-masked]>
Date: Thu, 1 Aug 2013 08:31:50 +0200

Hi,

I got a feature request for preventing taking down an interface on
shutdown. I wonder how we should implement this.

Option 1:

 set RC_NETDOWN=no in /etc/rc.conf (or /etc/conf.d/networking) will
 prevent taking down all the network interface on shutdown. No support
 for preventing individual interfaces - its all or nothing.

Option 2:

 Use a blacklist (eg RC_PREVENT_NETDOWN) of interfaces to not take
 down. For example: RC_PREVENT_NETDOWN="eth0 eth3" will take down eth1
 and eth2 but not eth0 and eth3. If set to 'all', all interfaces will
 be kept up and if set to 'none' all interfaces will be taken down.
 Deafult would be 'none'.

 Alternative variable names are: RC_NET_KEEP_UP

Option 3:

 Use a whitelist of interfaces to take down on shutdown. For example
 RC_NETDOWN="eth1 eth2" will keep eth0 and eth3 up on shutdown. If set
 to 'all' then all interfaces will be taken down and if set to 'none',
 all interfaces will be kept up on shutdown. Default would be 'all'.

What do you prefer? They are all very simple to implement.

What are good variable names?

-nc

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Jeff Pohlmeyer <[email-masked]>
Date: Fri, 2 Aug 2013 07:34:28 -0500

> shutdown. I wonder how we should implement this.

Since /etc/network/interfaces specifies which interfaces come up automatically,
wouldn't that be a good place to specify which ones come down automatically?

> They are all very simple to implement.

Not sure about this one.

 - Jeff

---

---

From: Natanael Copa <[email-masked]>
Date: Fri, 2 Aug 2013 16:13:06 +0200

On Fri, 2 Aug 2013 07:34:28 -0500

> wouldn't that be a good place to specify which ones come down automatically?

thats actually a good point. we should check what Debian does here.
-nc

---

---

From: Natanael Copa <[email-masked]>
Date: Fri, 2 Aug 2013 16:18:27 +0200

On Fri, 2 Aug 2013 16:13:06 +0200

> thats actually a good point. we should check what Debian does here.

They set NETDOWN=no in /etc/default/halt (corresponds to /etc/conf.d/halt)

I tend to agree that it makes sense to have a 'nodown eth0' or
similar in /etc/network/interfaces. But that should they do upstream.
(ifup/ifdown comes from debian)

-nc

---

---

From: Alan Messias <[email-masked]>
Date: Thu, 1 Aug 2013 13:32:56 -0300

Hi,

I cant understand how useful it is but, in my opinion, Option 3 (with
default as 'all') makes more sense. With Option 3 who doesnt want/know this
feature will never worry about it.

:wq!

-- 
Atenciosamente,
Alan MeC Lacerda
Tecnólogo em Redes de Computadores
CCNA / LPIC-1 / CLA
http://alanlacerda.blogspot.com/
"-"-"-"-"-"-" Of course it runs NetBSD "-"-"-"-"-"-"

“Somente após a última árvore ser cortada.
Somente após o último rio ser envenenado.
Somente após o último peixe ser pescado.
Somente então o homem descobrirá que dinheiro não pode ser comido!!” -
Provérbio Cree (uma tribo indígena norte-americana)

---

From: Natanael Copa <[email-masked]>
Date: Fri, 2 Aug 2013 08:52:16 +0200

On Thu, 1 Aug 2013 13:32:56 -0300

> feature will never worry about it.

I didn't know that there was a need for this kind either til yesterday.
I think its used in some WOL scenarios, but i dont know why it might be
needed. (ah it just made sense, i suppose the switch keeps the ip/mac
mapping in its arp table, so you can WOL on IP instead of mac addr...
or something like that. If you take down the iface you tell the switch
to clear the ip from its arp table.)

I was thinking more of option 2. Also with this option, people who
don't need this will never know that it exists and people who needs it
will need to list which devices they want it on (rather than a list of
devices they dont want this feature for).

Option 2 also means that if you use this feature, and additional net
interface is added, the new interface will by default be taken down,
even if some other device is configured to stay up on shutdown. With
option 3, if you add an interface, it will be kept up unless you
manually add it to RC_NETDOWN)

I just feel that RC_PREVENT_NETDOWN, sounds weird :)

RC_NO_NETDOWN?

RC_KEEP_NET?

RC_KEEP_IP?

RC_NO_IFDOWN?

-nc

---

---

From: Alan Messias Cordeiro <[email-masked]>
Date: Fri, 2 Aug 2013 08:35:53 -0300

Hi,

Option 2 makes more sense now... And I think one of this would be used:

> RC_NO_NETDOWN
Or
> RC_KEEP_NET

:wq!
----
Alan Messias Cordeiro
Enviado pelo meu iPad

---