[systemd-devel] [SPAM] Re: Custom options and passing options via command line.

Kamil Jońca kjonca at op.pl
Tue May 10 15:46:59 UTC 2022


Lennart Poettering <lennart at poettering.net> writes:

> On Di, 10.05.22 12:00, Kamil Jońca (kjonca at op.pl) wrote:
>
>> > The engine is decided at build time, i.e. can be either iptables or
>> > nftables.
>>
>> But there are two kind of "nat' in *tables suites: 1.masquerade or 2.snat.
>
> It uses DNAT or MASQUERADE.
>
>> Especially what wyould be equivalent of:
>>
>> --8<---------------cut here---------------start------------->8---
>> iface qemu inet static
>>         address 192.168.11.1
>>         netmask 255.255.255.0
>>         bridge_ports none
>> --8<---------------cut here---------------end--------------->8---
>> This creates "bridge" with assigned IP, without any ports (and with
>> scripts it can create/drop some nftables rules ...)
>
> A .netdev file with Kind=bridge to create the bridge + a .network file
> that assigns an IP address to it?

No. Does not work. interface is in "no-carrier" "configuring" state.

>
>> >> > Afaics RouteMetric= [DHCPv4] section already does all you need. just
>> >> > give the iface whose default route you want to take precedence a lower
>> >> > metric and you are done.
>> >>
>> >> How? By editing files? And what with other examples?
>> >
>> > I am not sure I follow? when do you intend to change the preference?
>>
>> When I manually up interface
>> (ie. when, for example, issue comand networkctl up "interface name")
>
> We don#t support any explicit logic with that. But you can add a
> drop-in for the .network file to /run/ and then reload before upping
> the iface.

So, that was my point. I will end with file editing  and continuous
daemon-reloading. Much less convenient. 

KJ

-- 
http://stopstopnop.pl/stop_stopnop.pl_o_nas.html


More information about the systemd-devel mailing list