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

Reindl Harald h.reindl at thelounge.net
Sun Sep 13 04:40:40 PDT 2015



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

> -----Original Message-----
> From: systemd-devel [mailto:systemd-devel-bounces at lists.freedesktop.org] On Behalf Of Manuel Reimer
> Sent: Sunday, September 13, 2015 11:55 AM
> To: systemd-devel at lists.freedesktop.org
> Subject: [systemd-devel] How to turn off some network interface?
>
> Hello,
>
> it seems to be impossible to just stop networkd (keeps starting itself again).
>
> If I use "ifconfig" to turn off one NIC, then networkd immediately restarts it.
>
> What do I have to do to gain back control over my network interfaces? I want to be able to turn off one interface.
>
> Thanks in advance

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150913/a133da2d/attachment.sig>


More information about the systemd-devel mailing list