[systemd-devel] How to turn off some network interface?

David Herrmann dh.herrmann at gmail.com
Mon Sep 21 10:40:16 PDT 2015


Hi

On Sun, Sep 13, 2015 at 1:40 PM, Reindl Harald <h.reindl at thelounge.net> wrote:
>
>
> Am 13.09.2015 um 13:28 schrieb Rosen, Rami:
>>
>> What do you mean by stopping networkd, can you elaborate a bit about what
>> you want to achieve?
>>
>> If you want to stop the service, simply run
>> "systemctl stop systemd-networkd".
>>
>> The after that ifconfig command, it won't start.
>>
>> If you want to disable one network interface (let's say eth0),
>> then go to the proper configuration file under
>> /etc/systemd/networkd and comment/disable it, and
>> restart the networkd service by:
>>
>> systemctl restart systemd-networkd
>
>
> well, that's a little unfortune compared to a setup not using
> systemd-networkd where you can *temporary* disable interfaces just with
> "ifdown lan4" without changing a configuration
>
> the point is *temporary*, changing the config means it would be disabled at
> the next boot too, on a machine acting as router/switch temporary disable
> interfaces makes a lot of sense to disconnect a client from the network

Just modify your .network files and restart networkd. It will adapt to
the new configurations at runtime.

Proper runtime-management via networkctl is planned, but no-one
implemented it yet.

Thanks
David


More information about the systemd-devel mailing list