Re: [DNG] interfaces.d question

2019-12-23 Thread Ralph Ronnquist via Dng
The "word" following "iface" in is the name of the configuration blocks. The 
full format for using them has the syntax:


# ifup =

Thus, you should define two blocks:
---
iface staticlan ...

iface dynamiclan ...
---

and use that on the command line, like:

# ifup eth0=staticlan

or

# ifup eth0=dynamiclan

You might want to refer to the man pages for more extensive details.

Ralph.

Gregory Nowak wrote on 24/12/19 9:57 am:

Hi All,
assume the following:

--- start /etc/network/interfaces.d/staticlan ---
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
# no gateway

--- end /etc/network/interfaces.d/staticlan ---

--- start /etc/network/interfaces/dynamiclan ---
iface eth0 inet dhcp

--- end /etc/network/interfaces.d/dynamiclan ---

If I do:

ifup staticlan
or:
ifup dynamiclan

I get:

"staticlan: unknown interface"

Same for dynamiclan

That makes sense, since there are no such physical interfaces in the
system. However, for ppp links the following works:

iface dsllink inet ppp
provider dsl-provider
...

This works, even though there is no such physical interface as
dsllink. This leads me to believe that what I want to do is
possible. However, I've read interfaces(5), and don't see there
anything that suggests how to do what I want to do.

So, Is it possible for me to define interfaces based on
/etc/network/interfaces.d/* instead of physical interfaces,
even though those interfaces don't
actually exist? If yes, then can someone either point me to an
explanation of how to do that, or can someone please explain how to do
that? Thanks.

Greg



___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] interfaces.d question

2019-12-23 Thread Gregory Nowak
Hi All,
assume the following:

--- start /etc/network/interfaces.d/staticlan ---
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
# no gateway

--- end /etc/network/interfaces.d/staticlan ---

--- start /etc/network/interfaces/dynamiclan ---
iface eth0 inet dhcp

--- end /etc/network/interfaces.d/dynamiclan ---

If I do:

ifup staticlan
or:
ifup dynamiclan

I get:

"staticlan: unknown interface"

Same for dynamiclan

That makes sense, since there are no such physical interfaces in the
system. However, for ppp links the following works:

iface dsllink inet ppp
provider dsl-provider
...

This works, even though there is no such physical interface as
dsllink. This leads me to believe that what I want to do is
possible. However, I've read interfaces(5), and don't see there
anything that suggests how to do what I want to do.

So, Is it possible for me to define interfaces based on
/etc/network/interfaces.d/* instead of physical interfaces,
even though those interfaces don't
actually exist? If yes, then can someone either point me to an
explanation of how to do that, or can someone please explain how to do
that? Thanks.

Greg


-- 
web site: http://www.gregn.net
gpg public key: http://www.gregn.net/pubkey.asc
skype: gregn1
(authorization required, add me to your contacts list first)
If we haven't been in touch before, e-mail me before adding me to your contacts.

--
Free domains: http://www.eu.org/ or mail dns-mana...@eu.org
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng