Bug 81177 - RFE: systemd-networkd: implement setting tokens for .network
Summary: RFE: systemd-networkd: implement setting tokens for .network
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium enhancement
Assignee: Tom Gundersen
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-10 14:56 UTC by Fireball
Modified: 2016-06-07 10:24 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Fireball 2014-07-10 14:56:39 UTC
I'd like "ip token" functionality to be implemented for .netdev files.
Example of ip command:
# ip token set ::2/64 dev eth0

It allows for the host part of SLAAC-configured IPv6 address to be set explicitly, not generated from MAC address.
Comment 1 Tom Gundersen 2014-08-15 14:39:13 UTC
I'd be happy to take a patch for this.
Comment 2 Tom Gundersen 2015-02-09 11:19:25 UTC
This is now upstream. Please test and let me know in case it does not work as expected.
Comment 3 Fireball 2015-03-13 08:20:36 UTC
Hello again.
I'm setting token for two of my interfaces: eth0 and br0 (they are unrelated, br0 includes tap1 and veth0).
Setting the token works for eth0 always.

Recently it broke for br0.
So I set Environment=SYSTEMD_LOG_LEVEL=debug for networkd.

My br0.network:

[Match]
Name=br0

[Network]
Description=Network Bridge For VPN
IPv6Token=::32
IPForward=yes

A piece of log during boot (journalctl -b|grep networkd|grep br0):

 systemd-networkd[432]: br0             : loaded bridge
 systemd-networkd[432]: br0             : creating
 systemd-networkd[432]: br0             : flags change: +MULTICAST +BROADCAST
 systemd-networkd[432]: br0             : link 13 added
 systemd-networkd[432]: device 0x7f45925790d0 has devpath '/devices/virtual/net/br0'
 systemd-networkd[432]: br0             : udev initialized link
 systemd-networkd[432]: br0             : netdev has index 13
 systemd-networkd[432]: br0             : netdev ready
 systemd-networkd[432]: br0             : saved original MTU: 1500
 systemd-networkd[432]: br0             : created
 systemd-networkd[432]: br0             : link state is up-to-date
 systemd-networkd[432]: br0             : found matching network '/etc/systemd/network/br0.network'
 systemd-networkd[432]: br0             : bringing link up
 systemd-networkd[432]: br0             : link configured
 systemd-networkd[432]: veth0           : enslaving by 'br0'
 systemd-networkd[432]: br0             : enslaving link 'veth0'
 systemd-networkd[432]: br0             : flags change: +UP
 systemd-networkd[432]: br0             : br0             : could not bring up interface: Invalid argument
 systemd-networkd[432]: br0             : flags change: +LOWER_UP +RUNNING
 systemd-networkd[432]: br0             : gained carrier
 systemd-networkd[432]: br0             : Adding address: fe80::8cb7:3bff:fe38:1f40/64 (valid for ever)
 systemd-networkd[432]: br0             : Adding address: xxxx:xxxx:xxxx:xxxx:8cb7:3bff:fe38:1f40/64 (valid for 23h 59min 59s)

The token is not shown with "ip token get dev br0".
If I remove IPv6Token= the error "could not bring up interface: Invalid argument" is not shown anymore.
Comment 4 Lennart Poettering 2016-06-07 10:24:26 UTC
Hmm, if this issue persists, could you file a bug on systemd github? This bug report was the RFE originally, which was implemented. Let's track bugs in bug reports of their own.


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.