Bug 90029 - RFE: networkd: Please add support for an [addrlabel] section
Summary: RFE: networkd: Please add support for an [addrlabel] section
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: Tom Gundersen
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-14 15:53 UTC by cb
Modified: 2017-09-14 12:50 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description cb 2015-04-14 15:53:20 UTC
I'm looking for a way to configure the following command line via systemd's networkd:

  ip addrlabel add prefix 2001:1111:0:222:33::/128 label 666
  ip addrlabel add prefix 2001:1111::/32           label 666

My suggestion would be the following addtion to /etc/systemd/network/foo.network
 
  ...
  [address]
  address = 2001:1111:0:111:44::/128

  [address]
  address = 2001:1111:0:222:33::/128

  [addrlabel]
  prefix = 2001:1111:0:222:33::/128
  label = 666

  [addrlabel]
  prefix = 2001:1111::/32
  prefix = 666

Background:
When searching for a source IP, the Kernel prefers those that have the same  label as the destination network. Packets to 2001:1111::/32, which is labeled with 666, would thus originate from 2001:1111:0:222:33::/128, which also has the label 666. All other IPv6 targets would have the default address label "0" and thus be originate with the address 2001:1111:0:111:44::/128 which also has the default label "0". This is useful to have a static IP for company internal targets and a temporary random address (-> IPv6 privacy extension) for everything else.

Current workaround:
Using a service unit that waits for the interface to come up and then executes /sbin/ip as suggested in http://lists.freedesktop.org/archives/systemd-devel/2015-April/030725.html
Comment 1 Lennart Poettering 2017-09-14 12:50:14 UTC
Supported since github PR 5529. Closing.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.