:: Re: [DNG] ifconfig vs ip
Pàgina inicial
Delete this message
Reply to this message
Autor: Simon Walter
Data:  
A: dng
Assumpte: Re: [DNG] ifconfig vs ip
On 06/03/2016 04:43 PM, Adam Borowski wrote:
> On Fri, Jun 03, 2016 at 08:56:50AM +0900, Simon Walter wrote:
>> I am working on some cdist scripts for setting up some network interfaces.
>>
>> So far I am modifying the /etc/network/interfaces and then bring down
>> and up the interfaces. For a while now /etc/init.d/networking has a
>> warning that it is deprecated.
>
> /etc/init.d/networking is not deprecated, only calling it with the argument
> "restart" (="force-reload") is. There's no real way to do that reliably in
> any non-static setup.


OK. I see. So it's only with restart. Got it. By non-static is that only
dhcp or are there other non-static setups? I would imagine a dhcp setup
would restart fine, but maybe I am such a simple user.

> ifupdown keeps its state in /run/network/ifstate, if you bring devices up or
> down using low-level tools then ifupdown may get confused. Use --force to
> override the saved state.


Nice.

>> 2. Is there a plan to write a /etc/init.d/networking script that works
>> properly?
>
> What do you mean by "properly"? What's your problem with it?


Well, considering I misinterpreted the part where only "restart" was
deprecated, I suppose if restarting is not possible, then fine.

>> 4. For my project: How does one bring up and down interfaces with ip in
>> coordination with /etc/network/interfaces? Or shall I use ifup?
>
> Don't try to mix the two -- or rather, you may use ip safely for
> configuration (like, changing addresses, routes, etc) but not bringing an
> interface up or down. If ifupdown doesn't fit your needs you can simply
> omit that interface in /etc/network/interfaces or let it bring it up during
> boot and never touch it again. Unlike, say, network-manager, ifupdown will
> not mess with the interface unless either you or udev explicitely tell it
> so.


Thanks man. I don't know why there would be network-manager install on a
server, but we live in such a entertainment world. It's good there are
others striving for a professional OS.

Kind regards,

Simon