:: Re: [DNG] interfaces.d question
Forside
Slet denne besked
Besvar denne besked
Skribent: Ralph Ronnquist
Dato:  
Til: dng
Emne: Re: [DNG] interfaces.d question
The "word" following "iface" in is the name of the configuration blocks. The
full format for using them has the syntax:

# ifup <interface>=<configuration-block>

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
>
>