Commit graph

480 commits

Author SHA1 Message Date
Daniel Kahn Gillmor de25aae110 man: clarify different uses of MACAddress
Improve the networkd documentation to clarify that Match.MACAddress is for
selection, but Link.MACAddress describes an action to be taken.
2016-05-17 16:55:20 -04:00
Lennart Poettering 7272b25e16 networkd: reworkd LLDP emission to allow control of propagation level
This allows selecting the propagation level of emitted LLDP packets
(specifically: the destination MAC address of the packets). This is useful
because it allows generating LLDP packets that optionally cross certain types
of bridges.

See 802.11ab-2009, Table 7-1 for details.
2016-05-09 15:45:31 +02:00
Lennart Poettering 2ef322fc40 man: link the part about [DHCP] to the DHCP= explanation 2016-05-06 17:08:03 +02:00
Lennart Poettering 82ecb4c3ec man: move IPv6 note to the right section
Make the XML validate again.
2016-05-06 17:07:43 +02:00
Lennart Poettering d05def163e networkd: move the IAID configuration option into the [DHCP] section
It's only relevant to DHCP, and it should be where the DUID is configured too.
2016-05-06 17:04:05 +02:00
Lennart Poettering 5119d304ff Merge pull request #3156 from keszybz/duid-settings
Rework DUID setting
2016-05-04 11:31:59 +02:00
Susant Sahani b5834a0b38 networkd: Add support to configure IPv6 preferred lifetime (#3102)
Closes #2166.

We only allow 0, infinity and forever.
infinity and forever is same.
2016-05-03 15:54:26 -04:00
Susant Sahani c953b24c65 networkd: add support to set route table
networkd: add support to set route table
1. add support to configure the table id.
   if id is less than 256 we can fit this in the header of route as
   netlink property is a char. But in kernel this proepty is a
   unsigned 32. Hence if greater that 256 add this as RTA_TABLE
attribute.

2. we are not setting the address family now. Now set this property.
2016-05-03 23:18:21 +05:30
Zbigniew Jędrzejewski-Szmek e2e08e77cc man: add a description of DUIDType and DUIDRawData
This is essentially a revert of f38e0cce75 (which
removed the documentation of DUIDType on purpose). The description is heavily
updated for the new semantics.

This addresses #3127 § 4.
2016-05-03 12:26:43 -04:00
Zbigniew Jędrzejewski-Szmek 23caf9baf2 man: s/similar/similarly/ 2016-05-03 12:26:43 -04:00
Lennart Poettering 076ea6f6d2 networkd: clean up DUID code a bit
Let's move DUID configuration into the [DHCP] section, since it only makes
sense in a DHCP context, and should be close to the configuration of
ClientIdentifier= and suchlike.

This really shouldn't be a section of its own, we don't have any for any of our
other per-protocol specific identifiers...

Follow-up for #2890 #2943
2016-04-29 12:23:34 +02:00
Torstein Husebø 4f25723c14 treewide: fix typos (#3092) 2016-04-22 14:18:05 +02:00
Susant Sahani 439689c6ec networkd: bump MTU to 1280 for interfaces which have IPv6 enabled (#3077)
IPv6 protocol requires a minimum MTU of 1280 bytes on the interface.
This fixes #3046.

Introduce helper link_ipv6_enabled() to figure out whether IPV6 is enabled.
Introduce network_has_static_ipv6_addresses() to find out if any static
ipv6 address configured.
If IPv6 is not configured on any interface that is SLAAC, DHCPv6 and static
IPv6 addresses not configured, then IPv6 will be automatically disabled for that
interface, that is we write "1" to /proc/sys/net/ipv6/conf//disable_ipv6.
2016-04-20 20:34:13 -04:00
Susant Sahani 23d8b221c0 networkd: Add support to configure proxy arp support to interfaces (#3020)
Fixes: #2889
2016-04-14 11:56:57 +02:00
Zbigniew Jędrzejewski-Szmek 74dd72d559 Merge pull request #2943 from vinaykul/systemd_duid_review_fixes
DHCP DUID parsing fix, logging fix, man-page fix
2016-04-07 20:19:19 -04:00
Torstein Husebø 95f4c7f595 man: fix spelling mistakes 2016-04-06 12:37:01 +02:00
Vinay Kulkarni f38e0cce75 Drop description of 'Type' field from docs. 2016-04-04 21:06:11 -07:00
Vinay Kulkarni b7f71444c0 Address code-review items for pull-request #2890
1. Replace strtol with unhexchar, verified with valid and invalid DUID strings.
2. Fix logging to use log_syntax instead of log_error.
3. On error reading DUID, ignore read and preserve previous state.
4. Fix man-pages to use markup, remove options not yet implemented.
5. Remove spurious header line in new files.
2016-04-04 21:06:11 -07:00
Zbigniew Jędrzejewski-Szmek 1db30aeab1 Merge pull request #2915 from vinaykul/master 2016-03-31 00:52:23 -04:00
Vinay Kulkarni 413708d106 DHCP DUID, IAID configuration options 2016-03-30 16:33:55 -07:00
Zbigniew Jędrzejewski-Szmek afec45395f Revert "DHCP DUID and IAID configurability" 2016-03-21 18:24:24 -04:00
Tobias Klauser 3708bd466e man: network - Fix misspelling of "router advertisement" 2016-03-14 12:13:58 +01:00
Vinay Kulkarni c83321e6d4 DHCP DUID and IAID configurability 2016-03-09 21:58:44 -08:00
Tom Gundersen 2ae7505f01 man: network - clarify BindCarrier documentation
Make it clear that we are talking of links (in the sense used in networkd) and not ports.

Addresses issue #964.
2016-02-23 01:25:32 +01:00
Tom Gundersen eb142d8ec1 man: network - improve IPv6Token documentation
Enabling router advertisement may even trigger SLAAC or DHCPv6 to be used to configure
IPv6 addresses on the link. It may not be obvious that only in the SLAAC case will the
Token have an effect. Clarify this in the man page.

Addresses issue #863.
2016-02-23 01:25:32 +01:00
Lennart Poettering da6c766d53 man: document the new EmitLLDP= .network setting
Also, beef up the LLDP documentation a bit.
2016-02-21 20:59:55 +01:00
Lennart Poettering 7cececb2ea networkd: turn on LLDP reception by default, in "routers-only" mode
This way "networkctl status" becomes a bit more useful by default, as router
information is just visible, without any further configuration.

LLDP reception is fully passive and relatively low simple and low traffic,
hence this should be safe to enable by default.
2016-02-21 20:40:57 +01:00
Lennart Poettering 34437b4f9c sd-lldp: rework sd-lldp API
This reworks the sd-lldp substantially, simplifying things on one hand, and
extending the logic a bit on the other.

Specifically:

- Besides the sd_lldp object only one other object is maintained now,
  sd_lldp_neighbor. It's used both as storage for literal LLDP packets, and for
  maintainging info about peers in the database. Separation between packet, TLV
  and chassis data is not maintained anymore. This should be a major
  simplification.

- The sd-lldp API has been extended so that a couple of per-neighbor fields may
  be queried directly, without iterating through the object. Other fields that
  may appear multiple times, OTOH have to be iterated through.

- The maximum number of entries in the neighbor database is now configurable
  during runtime.

- The generation of callbacks from sd_lldp objects is more restricted:
  callbacks are only invoked when actual data changed.

- The TTL information is now hooked with a timer event, so that removals from
  the neighbor database due to TTLs now result in a callback event.

- Querying LLDP neighbor database will now return a strictly ordered array, to
  guarantee stability.

- A "capabilities" mask may now be configured, that selects what type of LLDP
  neighbor data is collected. This may be used to restrict collection of LLDP
  info about routers instead of all neighbors. This is now exposed via
  networkd's LLDP= setting.

- sd-lldp's API to serialize the collected data to text files has been removed.
  Instead, there's now an API to extract the raw binary data from LLDP neighbor
  objects, as well as one to convert this raw binary data back to an LLDP
  neighbor object. networkd will save this raw binary data to /run now, and the
  client side can simply parse the information.

- support for parsing the more exotic TLVs has been removed, since we are not
  using that. Instead there are now APIs to extract the raw data from TLVs.
  Given how easy it is to parse the TLVs clients should do so now directly
  instead of relying on our APIs for that.

- A lot of the APIs that parse out LLDP strings have been simplified so that
  they actually return strings, instead of char arrays with a length. To deal
  with possibly dangerous characters the strings are escaped if needed.

- APIs to extract and format the chassis and port IDs as strings has been
  added.

- lldp.h has been simplified a lot. The enums are anonymous now, since they
  were never used as enums, but simply as constants. Most definitions we don't
  actually use ourselves have eben removed.
2016-02-21 20:40:56 +01:00
Jakub Wilk 07ff561c26 man: fix typos 2016-02-12 00:01:16 +01:00
Lennart Poettering b2a81c0b52 networkd: optinally use DHCP lease domain info for routing only
This changes the UseDomains= setting of .network files to take an optional third value "route", in addition to the
boolean values. If set, the passed domain information is used for routing rules only, but not for the search path
logic.
2016-01-26 14:42:04 +01:00
Lennart Poettering 3df9bec57c networkd: rework Domains= setting
Previously, .network files only knew a vaguely defined "Domains=" concept, for which the documentation declared it was
the "DNS domain" for the network connection, without specifying what that means.

With this the Domains setting is reworked, so that there are now "routing" domains and "search" domains. The former are
to be used by resolved to route DNS request to specific network interfaces, the latter is to be used for searching
single-label hostnames with (in addition to being used for routing). Both settings are configured in the "Domains="
setting. Normal domain names listed in it are now considered search domains (for compatibility with existing setups),
while those prefixed with "~" are considered routing domains only. To route all lookups to a specific interface the
routing domain "." may be used, referring to the root domain. An alternative syntax for this is the "*", as was already
implemented before using the "wildcard" domain concept.

This commit adds proper parsers for this new logic, and exposes this via the sd-network API. This information is not
used by resolved yet, this will be added in a later commit.
2016-01-26 14:42:03 +01:00
Lennart Poettering 8a516214c4 resolved: introduce support for per-interface negative trust anchors 2016-01-06 18:36:32 +01:00
Lennart Poettering ad6c047561 resolved,networkd: add a per-interface DNSSEC setting
This adds a DNSSEC= setting to .network files, and makes resolved honour
them.
2016-01-05 20:10:31 +01:00
Lennart Poettering f41b446a76 man: document that DNS= and Domains= is implemented by resolved 2016-01-05 17:41:41 +01:00
Lennart Poettering aaa297d4e5 networkd,resolved: add a per-interface mdns configuration option 2016-01-05 17:41:41 +01:00
Jakub Wilk 7f3fdb7f19 man: fix typos 2015-12-26 20:37:17 +01:00
Lennart Poettering 765afd5c4d networkd: stop managing per-interface IP forwarding settings
As it turns out the kernel does not support per-interface IPv6 packet
forwarding controls (unlike as it does for IPv4), but only supports a
global option (#1597). Also, the current per-interface management of the
setting isn't really useful, as you want it to propagate to at least one
more interface than the one you configure it on. This created much grief
(#1411, #1808).

Hence, let's roll this logic back and simplify this again, so that we
can expose the same behaviour on IPv4 and IPv6 and things start to work
automatically again for most folks: if a network with this setting set
is set up we propagate the setting into the global setting, but this is
strictly one-way: we never reset it again, and we do nothing for network
interfaces where this setting is not enabled.

Fixes: #1808, #1597.
2015-11-13 13:02:50 +01:00
Tom Gundersen f5a8c43f39 networkd: IPv6 router discovery - follow IPv6AcceptRouterAdvertisemnt=
The previous behavior:
When DHCPv6 was enabled, router discover was performed first, and then DHCPv6 was
enabled only if the relevant flags were passed in the Router Advertisement message.
Moreover, router discovery was performed even if AcceptRouterAdvertisements=false,
moreover, even if router advertisements were accepted (by the kernel) the flags
indicating that DHCPv6 should be performed were ignored.

New behavior:
If RouterAdvertisements are accepted, and either no routers are found, or an
advertisement is received indicating DHCPv6 should be performed, the DHCPv6
client is started. Moreover, the DHCP option now truly enables the DHCPv6
client regardless of router discovery (though it will probably not be
very useful to get a lease withotu any routes, this seems the more consistent
approach).

The recommended default setting should be to set DHCP=ipv4 and to leave
IPv6AcceptRouterAdvertisements unset.
2015-11-11 15:42:38 +01:00
Susant Sahani a86cba89be man: add man for IPV6 hop limit 2015-11-10 09:29:24 +05:30
Jan Engelhardt a8eaaee72a doc: correct orthography, word forms and missing/extraneous words 2015-11-06 13:45:21 +01:00
Jan Engelhardt b938cb902c doc: correct punctuation and improve typography in documentation 2015-11-06 13:00:02 +01:00
Susant Sahani 44de7fb14f man: add man for IPV6 DAD 2015-10-16 10:53:20 +05:30
Zbigniew Jędrzejewski-Szmek ebf9808112 man: describe IPv6AcceptRouterAdvertisements= better
With the previous description it wasn't clear that the
kernel default is being described.

Add link to kernel docs.
2015-10-12 13:50:29 -04:00
Daniel Mack 6c8fe33031 Merge pull request #1452 from poettering/journal-vacuum
A variety of journal vacuuming improvements, plus an nspawn fix
2015-10-06 11:02:04 +02:00
Lennart Poettering 6c1695be47 man: include numeric prefixes in example file names for .link, .netdev, .network files
In order to avoid confusion with the default files we ship, let's use a
low prefix number for all examples.

Fixes #1409.
2015-10-03 11:55:53 +02:00
Jens Kuske 0d07e595cc networkd: add support to configure preferred source of static routes 2015-09-24 14:04:51 +02:00
Susant Sahani 941d0aa8f4 man: add support for accept ra man 2015-09-12 08:18:36 +05:30
Tom Gundersen 9b3a67c55b networkd: dhcp-server - allow configuration of the pool
The constraints we place on the pool is that it is a contiguous
sequence of addresses in the same subnet as the server address, not
including the subnet nor broadcast addresses, but possibly including
the server address itself. If the server address is included in the
pool it is (obviously) reserved and not handed out to clients.
2015-08-31 21:42:33 +02:00
Lennart Poettering ad9437836f man: document the new DHCP settings added in the past commits 2015-08-27 17:34:44 +02:00
Major Hayden d94facdcaa Adding bonding examples for systemd-networkd
This commit provides some basic bonding configuration examples for .netdev and .network files.
2015-08-20 22:14:49 -05:00
Tom Gundersen eeb4b73b6a Merge pull request #727 from phomes/master
man: typo fixes
2015-07-25 23:27:44 +02:00
Thomas Hindoe Paaboel Andersen dd2b607b7d man: typo fixes 2015-07-25 23:15:51 +02:00
Zbigniew Jędrzejewski-Szmek 57e27ec0ad man: describe masking of .network files better
This should clear up some confusion in
https://github.com/systemd/systemd/issues/717.

This basically copies the description from systemd.unit to this
man page. Masking can happen also in /run, so strike the part
about /etc, and also add the magic work "mask".
2015-07-25 13:08:21 -04:00
Zbigniew Jędrzejewski-Szmek 23da66bb40 networkd: rename RootBlock to AllowPortToBeRoot
Justification is similar to BPDUGuard rename. "Positive" values
are easier. This is a rather uncommon option, so using a slightly
longer name should not be a problem, and may in fact may make it
easier to guess what the option does without reading the
documentation.
2015-07-24 23:44:42 -04:00
Zbigniew Jędrzejewski-Szmek 072f9e4af4 networkd: turn UnicastFlood on by default
Looking at the kernel commit, "on" seems to be the default value:
commit 867a59436fc35593ae0e0efcd56cc6d2f8506586
Author: Vlad Yasevich <vyasevic@redhat.com>
Date:   Wed Jun 5 10:08:01 2013 -0400

    bridge: Add a flag to control unicast packet flood.

    Add a flag to control flood of unicast traffic.  By default, flood is
    on and the bridge will flood unicast traffic if it doesn't know
    the destination.  When the flag is turned off, unicast traffic
    without an FDB will not be forwarded to the specified port.

... and it seems to be the reasonable thing to do by default.
2015-07-24 23:44:42 -04:00
Zbigniew Jędrzejewski-Szmek 84c3409631 networkd: rename BPDUGuard to UseBPDU
Rename to follow the follow the style of other options.

In general "positive" options are preferred to "negative" ones,
because they are easier to describe and easier for humans to
parse (c.f. the shortening on the man page entry).
2015-07-24 23:44:42 -04:00
Zbigniew Jędrzejewski-Szmek 47c7dfe275 man: reword new Bridge descriptions 2015-07-24 23:44:42 -04:00
Zbigniew Jędrzejewski-Szmek d59be2cf70 man: reword description of Hostname=
Also add dots at the end of sentences.
2015-07-24 23:43:51 -04:00
Susant Sahani 165c41a99a man: add man for bridge params 2015-07-23 23:33:40 +05:30
Susant Sahani 1adc5d0bcd man: add manual for DHCP override hostname 2015-07-11 09:26:55 +05:30
Lennart Poettering 1f0d969512 networkd: various fixes for the IPv6 privacy extensions support
- Make sure that the IPv6PrivacyExtensions=yes results in
  prefer-temporary, not prefer-public.

- Introduce special enum value "kernel" to leave setting unset, similar
  how we have it for the IP forwarding settings.

- Bring the enum values in sync with the the strings we parse for them,
  to the level this makes sense (specifically, rename "disabled" to
  "no", and "prefer-temporary" to "yes").

- Make sure we really set the value to to "no" by default, the way it is
  already documented in the man page.

- Fix whitespace error.

- Make sure link_ipv6_privacy_extensions() actually returns the correct
  enum type, rather than implicitly casting it to "bool".

- properly size formatting buffer for ipv6 sysctl value

- Don't complain if /proc/sys isn't writable

- Document that the enum follows the kernel's own values (0 = off, 1 =
  prefer-public, 2 = prefer-temporary)

- Drop redundant negating of error code passed to log_syntax()

- Manpage fixes

This fixes a number of issues from PR #417
2015-07-06 20:37:22 +02:00
Daniel Mack b5070ab9d0 Merge pull request #417 from ssahani/ipv6-private
Ipv6 private extensions
2015-07-05 13:08:13 -04:00
Susant Sahani a46e37cb12 man: add manual for ipv6 privacy extension 2015-07-05 11:25:20 +05:30
David Herrmann e2bccc9d99 man: fix sysctl references in networkd-manpage
We refer to the same sysctl-setting twice, which is misleading. Correctly
list all global forwarding options. As we _always_ change the forwarding
setting on links, they will get disabled by default. The global sysctl
defaults thus will not have any effect.
2015-07-04 13:10:10 +02:00
Tom Gundersen 12b42c7667 man: revert dynamic paths for split-usr setups
This did not really work out as we had hoped. Trying to do this upstream
introduced several problems that probably makes it better suited as a
downstream patch after all. At any rate, it is not releaseable in the
current state, so we at least need to revert this before the release.

 * by adjusting the path to binaries, but not do the same thing to the
   search path we end up with inconsistent man-pages. Adjusting the search
   path too would be quite messy, and it is not at all obvious that this is
   worth the effort, but at any rate it would have to be done before we
   could ship this.

 * this means that distributed man-pages does not make sense as they depend
   on config options, and for better or worse we are still distributing
   man pages, so that is something that definitely needs sorting out before
   we could ship with this patch.

 * we have long held that split-usr is only minimally supported in order
   to boot, and something we hope will eventually go away. So before we start
   adding even more magic/effort in order to make this work nicely, we should
   probably question if it makes sense at all.
2015-06-18 19:47:44 +02:00
Nick Owens 2972cba117 man: document IPForward=kernel option 2015-06-11 12:09:27 -07:00
Lennart Poettering ee0eb1d891 Revert "networkd: create "kernel" setting for IPForwarding" 2015-06-08 23:24:32 +02:00
Nick Owens 3ed7e9c735 man: document IPForward=kernel option 2015-06-02 15:42:21 -07:00
Daniel Mack 7d2e33a416 man: replace hard-coded /usr/lib
Replace some /usr/lib occurences in man/ with &rootprefix;/lib.
2015-06-02 07:54:51 -07:00
Filipe Brandenburger 681eb9cf2b man: generate configured paths in manpages
In particular, use /lib/systemd instead of /usr/lib/systemd in distributions
like Debian which still have not adopted a /usr merge setup.

Use XML entities from man/custom-entities.ent to replace configured paths while
doing XSLT processing of the original XML files. There was precedent of some
files (such as systemd.generator.xml) which were already using this approach.

This addresses most of the (manual) fixes from this patch:
http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/patches/Fix-paths-in-man-pages.patch?h=experimental-220

The idea of using generic XML entities was presented here:
http://lists.freedesktop.org/archives/systemd-devel/2015-May/032240.html

This patch solves almost all the issues, with the exception of:
- Path to /bin/mount and /bin/umount.
- Generic statements about preference of /lib over /etc.

These will be handled separately by follow up patches.

Tested:
- With default configure settings, ran "make install" to two separate
  directories and compared the output to confirm they matched exactly.
- Used a set of configure flags including $CONFFLAGS from Debian:
  http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/rules
  Installed the tree and confirmed the paths use /lib/systemd instead of
  /usr/lib/systemd and that no other unexpected differences exist.
- Confirmed that `make distcheck` still passes.
2015-05-28 19:28:19 +02:00
Zbigniew Jędrzejewski-Szmek e88d8021ba man: explain UseDomains a bit more
https://bugs.freedesktop.org/show_bug.cgi?id=85397
2015-05-18 22:35:42 -04:00
Benedikt Morbach 5c82dd13e1 man: IPMasquerade only implies IPForward=ipv4
at least that's what the code does.
2015-05-15 12:18:05 +02:00
Benedikt Morbach 505c5f6de1 networkd: don't touch global forwarding setting
This reverts commit 43c6d5abac
(and a small part of 4046d8361c)

It turns out we don't actually need to set the global ip_forward setting.
The only relevant setting is the one on each interface.

What the global toggle actually does is switch forwarding on/off for all
currently present interfaces and change the default for new ones.

That means that by setting the global ip_forward we

  - Introduce a race condition, because if the interface with IPForward=yes
    is brought up after one with IPForward=no, both will have forwarding
    enabled, because the global switch turns it on for all interfaces.
    If the other interface comes up first networkd correctly sets forward=0
    and it doesn't get overridden.

  - Change the forwarding setting for interfaces that networkd is not
    configured to touch, even if the user disabled forwarding via sysctl,
    either globally or per-interface

As forwarding works fine without this, as long as all relevant interfacest
individually set IPForward=yes:  just drop it

This means that non-networkd interfaces use the global default while
networkd interfaces default to off if IPForward isn't given.
2015-05-15 12:13:35 +02:00
Lennart Poettering a22e1850c3 man: clarify that only the first .network file with a matching [Match] matters
http://lists.freedesktop.org/archives/systemd-devel/2015-April/031294.html
2015-04-28 11:44:24 +02:00
Lennart Poettering 4046d8361c man: extend documentation on IPForward= and IPMasquerade=
Mention the default values, and clarify how this relates to the
underlying sysctls.
2015-04-24 19:56:47 +02:00
Michael Marineau 301f4073fe network: add UseNTP DHCP option
Despite having the internal logic in place to enable/disable using NTP
servers provided by DHCP the network config didn't expose the option.
2015-03-15 17:26:58 -04:00
Zbigniew Jędrzejewski-Szmek 3ba3a79df4 man: fix a bunch of links
All hail linkchecker!
2015-03-13 23:42:18 -04:00
Zbigniew Jędrzejewski-Szmek 9c8ca3f7a6 man: update example 2 in systemd.network(5)
none/both/v4/v6 are deprecated in favour of no/yes/ipv4/ipv6.

https://bugs.freedesktop.org/show_bug.cgi?id=89221
2015-03-13 00:26:03 -04:00
Torstein Husebø 4a6970c535 Fix typos 2015-03-09 13:38:53 +01:00
Jan Janssen 3e43b2cd97 networkd: Make DHCP client ID creation configurable 2015-03-04 11:01:39 +01:00
Alin Rauta 0d4ad91dd4 networkd: add support for Uplink Failure Detection
Introduce BindCarrier= to indicate the set of links that determine if
the current link should be brought UP or DOWN.

[tomegun: add a bit to commit message]
2015-02-27 13:58:30 -05:00
Tom Gundersen 56fd6bf795 networkd: .network - rename LinkLocal to LinkLocalAddressing
Makes it a bit less ambiguous.
2015-02-14 00:32:26 +01:00
Tom Gundersen 113bfde15f man: systemd.network - document IPv6Token 2015-02-14 00:30:51 +01:00
Tom Gundersen 5256e00e8b net: support globbing and disjunction in Match logic
Match{Name,OrginalName,Type,Driver,Path} can now take a space-separated glob of matches.
2015-02-10 22:30:35 +01:00
Tom Gundersen 769b56a308 networkd: support route scopes
For now we only support the hardcoded values RT_SCOPE_{UNIVERSE,LOCAL,HOST},
and not numerical values or values from /etc/iproute2/rt_scopes.

This addresses https://bugs.freedesktop.org/show_bug.cgi?id=88508.
2015-02-09 16:53:54 +01:00
Tom Gundersen d0d6a4cd70 networkd: generalize IPv4LL to LinkLocal
This allows both IPv4 and IPv6 link-local addresses to be enabled or disabled. By default
we still enable IPv6LL and disable IPv4LL. The old config option is kept for backwards
compatibility, but removed from the documentation.
2015-02-09 12:20:10 +01:00
Zbigniew Jędrzejewski-Szmek 798d3a524e Reindent man pages to 2ch 2015-02-03 23:11:35 -05:00
Lennart Poettering 769d324c99 networkd: make IP forwarding for IPv4 and IPv6 individually configurable 2015-01-13 20:17:07 +01:00
Lennart Poettering cb9fc36a12 networkd: introduce an AddressFamilyBoolean enum type
This introduces am AddressFamilyBoolean type that works more or less
like a booleaan, but can optionally turn on/off things for ipv4 and ipv6
independently. THis also ports the DHCP field over to it.
2015-01-13 20:17:06 +01:00
Jan Engelhardt bd763d350c doc: add cross-references between systemd.{link, netdev, network} 2015-01-13 18:27:33 +01:00
Lennart Poettering 5a8bcb674f networkd: add minimal IP forwarding and masquerading support to .network files
This adds two new settings to networkd's .network files:
IPForwarding=yes and IPMasquerade=yes. The former controls the
"forwarding" sysctl setting of the interface, thus controlling whether
IP forwarding shall be enabled on the specific interface. The latter
controls whether a firewall rule shall be installed that exposes traffic
coming from the interface as coming from the local host to all other
interfaces.

This also enables both options by default for container network
interfaces, thus making "systemd-nspawn --network-veth" have network
connectivity out of the box.
2015-01-13 13:55:15 +01:00
Susant Sahani ce43e48446 networkd: integrate LLDP
This patch integrates LLDP with networkd.

Example conf:
file : lldp.network

[Match]
Name=em1

[Network]
LLDP=yes
2014-12-19 08:02:45 +05:30
Alin Rauta b98b483bac networkd: add FDB support 2014-12-18 15:28:16 +01:00
Lennart Poettering 7303ec8f30 networkd: rename section [BridgePort] → [Bridge]
Let's stick to generic sections that describe the general technology,
instead of specific per-object sections, unless we really have a reason
to do that otherwise.
2014-12-10 19:07:48 +01:00
Mantas Mikulėnas 8c12bb073d networkd: update manpage for optional Gateway=
Following commit 59580681f5.
2014-12-08 12:20:11 -05:00
Tom Gundersen c106cc36b9 networkd: add basic [Link] settings to .network files
This allows the default link settings (set in .link files) to be overridden per Network. Only MTU and MACAddress is supported for now.
2014-12-05 00:38:10 +01:00
Tom Gundersen 9e7e440835 networkd: add support for source routing 2014-12-04 16:02:05 +01:00
Susant Sahani e1853b00ef networkd: Add bridge port path cost
This patch add support to specify path cost of the
bridge port to be configured via conf file.

Exampe: conf

file: br.netdev

[NetDev]
Name=br-test
Kind=bridge

file: br.network
[Match]
Name=em1

[Network]
Bridge=br-test

[BridgePort]
Cost=332

 bridge link
2: em1 state UP : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master
br-test state disabled priority 32 cost 332
2014-12-04 11:13:32 +01:00
Angus Gibson 84b5b79a8f networkd: allow specification of DHCP route metric
This lets the routing metric for links to be specified per-network,
still defaulting to DHCP_ROUTE_METRIC (1024) if unspecified. Hopefully
this helps with multiple interfaces configured via DHCP.
2014-09-08 15:09:08 +02:00
Ronny Chevalier 0566ef68b8 man: fix typos 2014-08-20 00:00:16 +02:00
Tom Gundersen 6192b846ca networkd: add support for Domains= to .network files
This allows the search/routing domanis to be specified per link/network and be passed
on to resolved.
2014-08-15 15:15:24 +02:00
Tom Gundersen ad0734e890 networkd: rename UseDomainName to UseDomains
This option will also apply to the search domains, so make it plural.
2014-08-15 12:53:34 +02:00
Tom Gundersen 1bd27a45d0 networkd: don't respect domainname from DHCP by default
Most routers will send garbage, so make this opt-in only.
2014-08-15 01:08:46 +02:00
Tom Gundersen ccf1c0299f networkd: disable ipv4ll default routes by default
This causes machines without connectivity to hang where they would otherwise fail. Keep it
opt-in for now, but consider whether we sholud just drop it.
2014-08-12 20:50:13 +02:00
Tom Gundersen bd8f653876 networkd: add and expose per-link LLMNR config option 2014-08-04 16:56:34 +02:00
Hong Shick Pak b85595b511 man: fix outdated example in systemd.network
The docs for the DHCP= was updated, but not the example.
2014-07-30 18:35:53 +02:00
Tom Gundersen ba17915457 networkd: ipv4ll - configure link-local address independently of DHCPv4
This changes the behavior when both DHCPv4 and IPv4LL are enabled. Before,
we would disable IPv4LL when we got a DHCPv4 lease and enable it if the
lease was lost.

Now we just always set up both, if both are enabled, but the DHCPv4
addresses and routes will always take precedence due to their metric
and scope.
2014-07-30 17:45:47 +02:00
Tom Gundersen bfa695b5cc networkd: ipv4ll - default to setting up ipv4ll routes
This is necessary for non-ipv4ll hosts to communicate with ipv4ll-only hosts on the same link. Defaults
to being enabled, but can be opted out.

See: <http://avahi.org/wiki/AvahiAutoipd#Routes>
2014-07-25 02:14:23 +02:00
Tom Gundersen f5de5b0020 sd-dhcp-client: make request broadcasts opt-in
It appears there is no good way to decide whether or not broadcasts should be enabled,
there is hardware that must have broadcast, and there are networks that only allow
unicast. So we give up and make this configurable.

By default, unicast is used, but if the kernel were to inform us abotu certain
interfaces requiring broadcast, we could change this to opt-in by default in
those cases.
2014-07-15 18:55:31 +02:00
Susant Sahani edb85f0d8d networkd: dhcp add vendor class indentifier option 60
Vendor Class Identifier be used by DHCP clients to identify
their vendor type and configuration. When using this option,
vendors can define their own specific identifier values, such
as to convey a particular hardware or operating system
configuration or other identifying information.

Vendor-specified DHCP options—features that let administrators assign
separate options to clients with similar configuration requirements.
For example, if DHCP-aware clients for example we want to separate
different gateway and option for different set of people
(dev/test/hr/finance) in a org or devices for example web/database
servers or let's say in a embedded device etc and require a different
default gateway or DNS server than the rest of clients.
2014-07-14 11:39:20 +02:00
Susant Sahani 5d8e593dce networkd: make metric of routes configurable
Now route metric can be configuted via conf file:

example conf:

[Match]
Name=em1

[Route]
Gateway=192.168.1.12
Metric=10

Test:
ip route output
default via 192.168.1.12 dev em1 metric 10

[tomegun: squash TODO update and reword man page a bit]
2014-07-14 11:39:20 +02:00
Tom Gundersen 1a43ddc8b1 man: network - document Peer key 2014-07-07 14:24:07 +02:00
Eugene Yakubovich 4cc7a82c94 networkd: send hostname to dhcp server
Send hostname (option 12) in DISCOVER and REQUEST messages so the
DHCP server could use it to register with dynamic DNS and such.

To opt-out of this behaviour set SendHostname to false in [DHCP]
section of .network file

[tomegun: rebased, made sure a failing set_hostname is a noop and moved
          config from DHCPv4 to DHCP]
2014-07-01 22:02:25 +02:00
Tom Gundersen 0a8a0fad01 man: bring systemd.network(5) up-to-date
Based on diff by 'poma'.
2014-07-01 21:49:53 +02:00
Eugene Yakubovich e1ea665eda Add support for DHCP static route options
This adds support for DHCP options 33 and 121: Static Route and
Classless Static Route. To enable this feature, set UseRoutes=true
in .network file. Returned routes are added to the routing table.
2014-06-29 15:18:21 +02:00
Tom Gundersen ed942a9eb2 networkd: merge DHCPv4 and DHCPv6 config
If there are v4 or v6 specific options we can keep those in separate sections,
but for the common options, we will use only one.

Moreovere only use DHCP=[yes/both|no/none|v4|v6] to enable or disable the clients.
2014-06-29 15:18:21 +02:00
Jan Engelhardt 45df8656eb doc: typographical improvements and choice of words 2014-06-28 00:06:31 -04:00
Jan Engelhardt 8d0e0ddda6 doc: grammatical corrections 2014-06-28 00:06:30 -04:00
Lennart Poettering 102bd40e1e man: split systemd.network(5) and related into various sections for better readability 2014-06-27 20:50:08 +02:00
Lennart Poettering 4bb278e51e man: document automatic networkd IP range allocation 2014-06-27 20:42:06 +02:00
Jan Engelhardt b8bde11658 doc: comma placement corrections and word order
Set commas where there should be some.
Some improvements to word order.
2014-05-07 20:13:27 -04:00
Jan Engelhardt 70a44afee3 doc: typographical fine tuning 2014-05-06 23:05:39 +02:00
Jan Engelhardt d28315e4af doc: use non-contracted forms in written documents 2014-05-06 23:05:09 +02:00
Umut Tezduyar Lindskog aba496a58a networkd: smooth transition from ipv4ll to dhcp address
Currently when both ipv4ll and dhcp are enabled, ipv4ll
address (if one has been claimed) is removed when dhcp
address is aquired. This is not the best thing to do
since there might be clients unaware of the removal
trying to communicate.

This patch provides a smooth transition between ipv4ll
and dhcp. If ipv4ll address was claimed [1] before dhcp,
address is marked as deprecated. Deprecated address is still
a valid address and packets can be received on it but address
cannot be selected as a source address. If dhcp lease cannot
be extended, then ipv4ll address is marked as valid again.

[1] If there is no collision, claiming IPv4LL takes between 4 to
7 seconds.
2014-04-03 16:00:25 +02:00
poma f47c5c47d1 man: networkd - additional examples related to bridging 2014-03-17 21:35:28 +01:00
Tom Gundersen cb44f25c12 man: network - clarify which options may be specified more than once. 2014-03-14 13:04:57 +01:00
Tom Gundersen 06f021a804 networkd: allow more than one static DNS server 2014-03-14 12:44:17 +01:00
Umut Tezduyar Lindskog 848e3e24b0 man: ipv4 link-local 2014-03-05 21:46:31 +01:00
Tom Gundersen fe6b2d55bc networkd: add basic support for MACVLANs 2014-02-25 21:19:08 +01:00
Tom Gundersen eac684ef1c man: split out systemd.net{work,dev}(5) from systemd-networkd(8) 2014-02-25 19:30:40 +01:00