[systemd-devel] Networkd defaulting to interface UP when BindCarrier points to non-existing interface
Hello, I'm using the BindCarrier option on some vlan interfaces so networkd will mirror the up/down state of another interface, and I'm mirroring the state of an interface that will be created by another program, after networkd has done its initial config. The problem I have is the interface's state in the small time interval between networkd creating the interfaces and the other program creating the interface to mirror. They are defaulting to "up" in absence of the interface to mirror. I'd like them to default to "down". I guess it's similar to the "ActivationPolicy=down" behaviour, but in this case, ActivationPolicy is of course "bound". In short, this is the order of things on boot: 1 - networkd runs, creates vlans and brings them UP 2 - other application runs, creates master interface, DOWN 3 - networkd reacts according to BindCarrier, brings vlans DOWN I'd like networkd to create vlans DOWN on step 1. Jordi Augé Embedded Linux Engineer
Re: [systemd-devel] BridgeMDB specifying port and group
To answer my own question in case anyone finds this question in a a search or something: - BridgeMDB is implemented properly in networkd, and it works fine - In order to add the mdb entry to the socnet0 interface, you have to put the [BridgeMDB] entry on the socnet0 network file - The associated bridge is not explicitly set in the mdb entry, networkd already knows this interface is part of a bridge - The permanent vs temp setting is also not necessary, it's implicit in whether you're selecting the root port of the bridge or another port. Jordi Augé Technica Engineering De: Jordi Auge Enviat el: dimarts, 23 de gener de 2024 17:58 Per a: systemd-devel@lists.freedesktop.org Tema: BridgeMDB specifying port and group Hello, I'm configuring a BridgeMDB using networkd. I'm trying to produce a networkd configuration with the same effect ad this command: bridge mdb add dev br0 port socnet0 grp 239.255.42.99 permanent vid 68 This produces the following entry in "bridge mdb show": dev br0 port socnet0 grp 239.255.42.99 permanent offload vid 68 I have this section in the network config file: [Match] Name=br0 (...) [BridgeMDB] MulticastGroupAddress=239.255.42.99 VLANId=68 Which produces this entry in "bridge mdb show": dev br0 port br0 grp 239.255.42.99 temp vid 68 So, I need to set the port (socnet0 vs br0), and the group (temp vs permanent). As far as I can tell, these options don't seem to be implemented in networkd. Can anyone please confirm if these feature are supported? Regards, Jordi Augé Technica Engineering
[systemd-devel] BridgeMDB specifying port and group
Hello, I'm configuring a BridgeMDB using networkd. I'm trying to produce a networkd configuration with the same effect ad this command: bridge mdb add dev br0 port socnet0 grp 239.255.42.99 permanent vid 68 This produces the following entry in "bridge mdb show": dev br0 port socnet0 grp 239.255.42.99 permanent offload vid 68 I have this section in the network config file: [Match] Name=br0 (...) [BridgeMDB] MulticastGroupAddress=239.255.42.99 VLANId=68 Which produces this entry in "bridge mdb show": dev br0 port br0 grp 239.255.42.99 temp vid 68 So, I need to set the port (socnet0 vs br0), and the group (temp vs permanent). As far as I can tell, these options don't seem to be implemented in networkd. Can anyone please confirm if these feature are supported? Regards, Jordi Augé Technica Engineering
networkd: bridge is configured before interfaces are enslaved
Hello, I'm using systemd 244 on an embedded device, and I'm having a problem when trying to configure the onboard switch via networkd. The CPU is a TI J7200 SOC, which has a hardware switch. It is configured from linux like a regular bridge, with switchdev. Basically, you create a br0 interface, bind the device's physical interfaces to it. A driver will pick up that you're actually bridging interfaces belonging to the bridge, and enable the hardware offloading. The driver will then pick up any configuration done to the software bridge, and forward it to the hardware, so all vlans, QoS rules and such get registered on the hardware. The problem I'm having is that networkd is registering the vlans on br0 before the physical interfaces are enslaved. So: * br0 is created. At this point it's a regular software bridge. * The physical interfaces are added as links, pending udev initialization * bridge configuration begins, some vlans are created, and enslaved on the bridge * udev reports the physical interfaces as initialized * networkd switches them from pending to initialized * networkd then enslaves physical interfaces to br0. At this point the driver starts picking up configurations on br0. * bridge configuration continues The problem I have here is that in the hardware switch's driver will only pick up any configuration done after the physical interfaces are bound. Everything done before is unknown to the hardware. So, what would be the correct behaviour here? The easiest idea that comes to mind is to delay bridge configuration until the physical interfaces are bound. I can configure the network via shell scripts by doing things in this order. Should I patch networkd to add this dependency, or is there a cleaner way? I know 244 is an old version, and it is a possibility to move to a newer version if that will indeed fix the problem, but I'd like to know if that is the case before committing the resources needed for this update. __ Jordi Augé Embedded Linux Engineer Technica Electronics Barcelona