Commit graph

776 commits

Author SHA1 Message Date
Yu Watanabe 8d78191a46 man: ARP=no also disables IPv6 Neighbor Discovery Protocol
Addresses https://github.com/systemd/systemd/issues/18063#issuecomment-2323410288.
2024-09-05 10:20:18 +09:00
Daan De Meyer 2b9ced9072 network: Add support for mq qdisc 2024-09-04 14:56:40 +02:00
Daan De Meyer 3f14557ce0 network: Add support for multiq qdisc 2024-09-04 14:56:37 +02:00
Luca Boccassi bdf75118ba
Merge pull request #34049 from yuwata/network-routing-policy-rule
network: further rework for routing policy rule
2024-08-21 12:46:37 +02:00
Yu Watanabe ac1d8aa5bc network/routing-policy-rule: support all known type of rule
This also adds GoTo= to specify the target priority of goto rule.

Note, table was the default but could not be specified in Type=.
2024-08-20 21:02:31 +09:00
Yu Watanabe 489671d225 network/address-label: allow to configure IPv6 address label in networkd.conf
Closes #23159.
2024-08-20 20:50:56 +09:00
Yu Watanabe 0b695febb2 network: make IPMasquerade= imply global IP forwarding settings again
After 3976c43092 (#31423), IPMasquerade=
implies only per-interface IP forwarding. That means, nspawn users need
to manually enable IPv4/IPv6Forwarding= in networkd.conf when
--network-veth or friend is used. Even the change was announced in NEWS,
the change itself breaks backward compatibility and extremely reduces
usability.

Let's make the setting imply the global setting again.

Fixes #34010.
2024-08-17 00:13:06 +09:00
Yu Watanabe a61869d4a5 network/dhcp-pd: allow to customize route type for delegated prefix
Closes #33929.
2024-08-06 05:24:16 +09:00
Yu Watanabe 347c8822d1 man: extend explanation for ConfigureWithoutCarrier= in systemd.network(5)
Prompted by #33702.
2024-08-03 05:57:55 +09:00
jauge-technica 82f2a2f032
Added support for L2 BridgeMDB entries (#32894)
* Added support for L2 BridgeMDB entries
2024-08-02 16:31:20 +01:00
Yu Watanabe 175cdefd33 man: suggest to enable global IPv6Forwarding= setting to make IPv6 packets forwarded
Closes #33414.
2024-07-31 09:53:18 +02:00
Yu Watanabe dd87ad8e19 network: mention that IPv4 ACD is enabled by default for 169.254.0.0/16
Prompted by #33824.
2024-07-31 10:06:25 +09:00
Nick Cao 034b7dfc08
man: network: move note about L3MasterDevice to the correct section 2024-07-28 13:51:36 -04:00
Zbigniew Jędrzejewski-Szmek 7b529bfc47 man: document that separate /usr/local/ must not be used for config
Since we document /usr/local/lib/systemd/ and other paths for various things,
add notes that this is not supported if /usr/local is a separate partition. In
systemd.unit, I tried to add the footnote in the table where
/usr/local/lib/systemd/ is listed, but that get's rendered as '[sup]a[/sup]'
with a mangled footnote at the bottom of the table :( .

Also, split paragraphs in one place where the subject changes without any
transition.

Follow-up for 02f35b1c90.
Replaces https://github.com/systemd/systemd/pull/33231.
2024-06-11 18:02:31 +01:00
Yu Watanabe 4ccaf512d7 man: fix typo
Follow-up for d24ceef937.
2024-06-01 14:42:19 +09:00
Yu Watanabe d24ceef937 man: mention that IPMasquerade= and IPv6SendRA= implies IPv4Forwarding=/IPv6Forwarding=
It has been mentioned in IPv4Forwarding= and IPv6Forwarding=,
but let's also explain in the settings who imply these settings.

Follow-up for 3976c43092 and
485f5148b3.
2024-05-30 10:20:33 +02:00
Colin Watson 566491c971 docs,man: Avoid some ambiguous uses of "may not"
Like much English text, the systemd documentation uses "may not" in the
sense of both "will possibly not" and "is forbidden to".  In many cases
this is OK because the context makes it clear, but in others I felt it
was possible to read the "is forbidden to" sense by mistake: in
particular, I tripped over "the target file may not exist" in
systemd.unit(5) before realizing the correct interpretation.

Use "might not" or "may choose not to" in these cases to make it clear
which sense we mean.
2024-05-08 17:14:32 +02:00
Mathias Lang 07b6924de4 networkd: Correct documentation for LinkLocalAddressing
LinkLocalAddressing accepts a boolean. This can be seen by looking at
`link_local_address_family_from_strong(cont char *s)` in
`src/network/netword-util.c#L102-108` which falls back to
`address_family_from_string`, defined two lines above (L100)
using `DEFINE_STRING_TABLE_LOOKUP_WITH_BOOLEAN`.
2024-04-27 12:55:12 +02:00
Luca Boccassi f64222b748
Merge pull request #32347 from yuwata/sd-radv-reachable-time
sd-radv: allow to configure reachable time
2024-04-22 14:04:25 +02:00
Yu Watanabe 4f52944054 man: fix typo
Follow-ups for 418f2dc755.
2024-04-22 18:44:48 +09:00
Yu Watanabe 5d8b72e1e0 man: slightly rephrase RetransmitSec= setting 2024-04-22 18:42:46 +09:00
Yu Watanabe 59d475ba40 network/radv: introduce ReachableTimeSec= setting
To make the reachable time in the RA header sent by networkd
configurable.
2024-04-22 18:41:37 +09:00
Yu Watanabe 418f2dc755 network: introduce network- and protocol-independent default for UseDomains=
Follow-up for fb57300743.

Prompted by #32273.
2024-04-20 12:01:53 +09:00
Yu Watanabe 769f9744b7 network/ndisc: disable Neighbor discovery client if RADV is enabled
Running both sd-ndisc and sd-radv should be mostly a misconfiguration,
but may not. So, let's only disable sd-ndisc by default when sd-radv is
enabled, but allow when both are explicitly requested.
2024-04-18 09:40:23 +09:00
Henry Li fb57300743 network: add mechanism to configure default UseDomains= setting, update man page and add test 2024-04-13 16:54:31 -07:00
Yu Watanabe 6df0059441 network/ndisc: add basic support for Redirect message
Closes #31438.
2024-04-05 05:57:54 +09:00
Yu Watanabe a3ed665a29 network/dhcp-server: introduce PersistLeases= setting
Requested at https://github.com/systemd/systemd/pull/31772#issuecomment-2000053357.
2024-03-27 13:21:15 +00:00
cunshunxia cc59d1014f man: fix a few issues in manpage
fix: #31482

Signed-off-by: cunshunxia <cunshunxia@tencent.com>
2024-03-20 15:24:11 +01:00
Yu Watanabe 5582b36c38 network/dhcp-server: save leases in state directory
Then, we can read the lease file on restart, and the DHCP server will be
able to manage previously assigned addresses.

To save leases in the state directory /var/lib/systemd/network/, this
adds systemd-networkd-dhcp-server.service, and by default
systemd-networkd does not start the DHCP server without the heler
service started.

Closes #29991.
2024-03-12 01:57:17 +09:00
Yu Watanabe 39af486a7f network/ndisc: drop redundant sd_ndisc_router_get_icmp6_ratelimit()
This effectively reverts 9175002864.

The retrans time field in RA message is for neighbor solicitation,
and the commit d4c8de21a0 makes the value
assigned to the correct sysctl property.

Let's deprecate the option, and drop the redundant functions.
2024-02-28 11:05:00 +00:00
Yu Watanabe 3976c43092 network: introduce per-interface IP forwarding settings
This deprecates IPForward= setting, which unconditionally controled
the global setting, even though it is a setting in .network file.

Instead, this introduces new IPv4Forwarding= and IPv6Forwarding=
settings both in .network and networkd.conf.
If these settings are specified in a .network file, then the
per-interface forwarding setting will be configured.
If specified in networkd.conf, then the global IP forwarding setting will
be configured.

Closes #30648.
2024-02-22 19:24:12 +00:00
Martin Ivicic ea932bd34d networkd: support setting dhcp server port 2024-02-21 19:33:27 +09:00
Yu Watanabe 1452d49741 network/ndisc: set IPv6 neighbor reachable time
Closes #31402.
2024-02-20 15:31:39 +09:00
Yu Watanabe 6a32108812 man: add missing "=" after setting name
Follow-up for b93bf1bf9f.
2024-02-09 19:03:56 +09:00
Yu Watanabe 7dc431839e network/dhcp4: disable IPv6OnlyMode= by default
As explained in #30891, IPv6OnlyMode= should be enabled with 464XLAT
support, but we do not support it yet. Let's disable by default.

Fixes #30891.
2024-02-07 23:30:17 +00:00
Yu Watanabe a853cc99e6 network: adjust default RequiredForOnline= and RequiredFamilyForOnline= setting
E.g. a bonding port does not support addressing, hence the default
should be 'enslaved'.

Follow-up for 3255bda698.

Closes #27724.
2024-02-02 15:38:30 +09:00
Yu Watanabe c89efaf9e5 man: fix default behavior of RequiredFamilyForOnline= 2024-02-02 15:38:30 +09:00
Matt Muggeridge d4c8de21a0 IPv6 RA: Support the Retrans Timer field (IPv6 Conformance Test: v6LC.2.1.5)
The RA's Retransmission Timer field was being ignored. This resolves the IPv6
Core Conformance test, v6LC.2.1.5 [1].

Retransmission Timer is a 32-bit unsigned integer. The time, in milliseconds,
between retransmitted Neighbor Solicitation messages. Used by the Address
Resolution and Neighbor Unreachability Detection (NUD) algorithm.

Support setting a default value for the neighbour retransmission timer value with:

    [Network]
    IPv6RetransmissionTimeSec=<int>

By default, upon receiving a Router Advertisement with the Retransmission Timer
field set to a non-zero value, it will update the kernel's retransmit timer value.
To disable this behaviour, configure the UseIPv6RetransmissionTime= under the
[IPv6AcceptRA] section.

    [IPv6AcceptRA]
    UseIPv6RetransmissionTime=<bool>

RFC4861: Neighbor Discovery in IPv6
  * Section 4.2 RA Message Format.
  * Section 6.3.4 Processing Received Router Advertisements

A Router Advertisement field (e.g., Cur Hop Limit, Reachable Time,
and Retrans Timer) may contain a value denoting that it is
unspecified. In such cases, the parameter should be ignored and the
host should continue using whatever value it is already using. In
particular, a host MUST NOT interpret the unspecified value as
meaning change back to the default value that was in use before the
first Router Advertisement was received.

The RetransTimer variable SHOULD be copied from the Retrans Timer
field, if the received value is non-zero.

References
[1] IPv6 Core Conformance Spec (PDF)
2024-01-23 03:18:01 +09:00
Nick Cao 4be1fc8443 network: Add L3MasterDevice= into routing policy 2024-01-19 00:17:50 +00:00
Yu Watanabe 3255bda698 network: make 'carrier' as the default required operational state for CAN device
As CAN devices do not support IP address, hence the state never goes to
higher than 'carrier'.

Prompted by https://github.com/linux-can/can-utils/issues/68#issuecomment-1327987724.
2024-01-17 04:05:43 +09:00
Yu Watanabe cb0a3b8c14 network/route: drop TTL propagate support for MPLS routes
This effectively reverts 9b88f20aba.

We do not support MPLS routes, only IPv4 or IPv6 routes are supported.
2024-01-03 08:41:53 +09:00
David Tardon eea10b26f7 man: use same version in public and system ident. 2023-12-25 15:51:47 +01:00
David Tardon 617b85d10e man: use <warning> for warnings 2023-12-25 10:00:43 +01:00
Raito Bezarius b49595503d networkd: support proxy_arp_pvlan sysctl
The proxy ARP private VLAN sysctl is useful for VLAN aggregation, see
https://sysctl-explorer.net/net/ipv4/proxy_arp_pvlan/ for details.
2023-12-24 03:40:03 +09:00
David Tardon 13a69c120b man: use <simplelist> for 'See also' sections
This is just a slight markup improvement; there should be no difference
in rendering.
2023-12-23 08:28:57 +01:00
Yu Watanabe a61738b3a6 network/address: make Address= in [Network] support an empty string
Closes #30485.
2023-12-21 04:08:53 +09:00
Yu Watanabe 03a46b5eca man,NEWS: mention that all previously assigned VLAN IDs are cleared
Addresses https://github.com/systemd/systemd/pull/29987#issuecomment-1863934902.
2023-12-20 19:22:53 +09:00
Yu Watanabe b9e6e92510 man: fix indentation 2023-12-20 19:21:11 +09:00
Yu Watanabe bbc05bec98 network/nexthop: introduce ManageForeignNextHops= boolean setting
Closes #29034.
2023-12-12 23:51:10 +09:00
Zbigniew Jędrzejewski-Szmek bfa95c369a
Merge pull request #29987 from yuwata/network-bridge-vlan
network: remove unnecessary bridge vlan IDs
2023-12-06 22:25:42 +01:00