Web lists-archives.com

Re: Worked example, was Re: Still unable to restart networking on Debian 9 text mode only




On Sat 24 Nov 2018 at 21:33:18 (-0500), Gary Dale wrote:
> On 2018-11-24 9:05 p.m., David Wright wrote:
> > So you can see the extra work (worth more than two cents) that
> > the higher level commands do for you automatically, thanks to
> > /etc/network/if-*.d/*
> 
> That, of course, assumes that ifup and ifdown work on your system.
> They don't work on two of my systems that uses systemd-networkd to
> control the network.

I don't understand why you would *want* to use ifup/ifdown on a system
where you've chosen to control the interface with systemd-networkd.
The only reason I bothered to actually perform the worked example was
because I have one host that's still using what the installer left
as its default.

> However ifconfig works on one and ip works on the
> other (although they are both running Stretch, one is a new
> server-type install while the other has been upgraded over the years
> from earlier versions).

Perhaps it would be useful to discover why, and then post any helpful
hints on what to do or avoid if other shave such a problem.

> The lower-level tools tend to be more flexible and are more agnostic
> regarding how your network is set up.

Yes, one might suppose that the high-level tools use the low-level ones
in a pre-arranged (hence less flexible) manner to do the actual work.

> In the case of the OP, he needs to change his interfaces file no
> matter how he changes the network. However the order of commands isn't
> important when he uses ifconfig or ip to update the ip address - he
> can do it before or after editing interfaces. Moreover, it takes one
> fewer command. And it's worth learning how to use these tools if you
> are working with networks.

I don't understand why you'd recommend using a particular method when
you've just explained that you can't get it to run consistently on
your own systems. Nor do I understand why the number of commands
required is of such importance: isn't that what scripts are for.
One reply suggested installing network manager just to reduce the
command count to two. That's a 15 package installation on my system.

Cheers,
David.