RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2165823 - [RFE] NMState to configure the ipv6.token
Summary: [RFE] NMState to configure the ipv6.token
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: nmstate
Version: 9.1
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: 9.2
Assignee: Gris Ge
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-31 08:25 UTC by Konstantinos
Modified: 2023-10-15 08:18 UTC (History)
6 users (show)

Fixed In Version: nmstate-2.2.5-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 07:32:13 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker NMT-221 0 None None None 2023-01-31 08:26:56 UTC
Red Hat Issue Tracker RHELPLAN-146996 0 None None None 2023-01-31 08:27:00 UTC
Red Hat Product Errata RHBA-2023:2190 0 None None None 2023-05-09 07:32:20 UTC

Description Konstantinos 2023-01-31 08:25:48 UTC
NMState to configure the ipv6.token

In IPv6 with SLAAC as address assignment there might be cases that you want to have a predictable autogenerated address which remains in case you change network adapter (the mac of the nic).


NMState being able to do
```
nmcli c mod enp4s0 ipv6.addr-gen-mode eui64
nmcli c mod enp4s0 ipv6.token ::deca:fbad:c0:ffee
```

Comment 2 Gris Ge 2023-01-31 08:52:15 UTC
Patch sent to upstream: https://github.com/nmstate/nmstate/pull/2209

Similar to `ip token set ::123/64 dev eth1` which setting the IPv6
address retried from IPv6 RA/autoconf to `<ra_prefix>::<token>`.

Example yaml:

```yml
---
interfaces:
- name: eth1
  state: up
  ipv6:
    token: ::fac1
    autoconf: true
    dhcp: true
    enabled: true
```

To remove the IPv6 token, you may set use:
 * Empty string: `token: ""`
 * Explicitly all zero: `token: "::"`

Due to kernel limitation, you cannot set IPv6 token to all zero.

You will get invalid argument error when:
 * Specified token not been started with 64 bits of 0.
 * Setting `autoconf: false` with non-empty token and non-all-zero token.

Comment 3 Gris Ge 2023-02-09 13:15:29 UTC
Got consent from report on changing this bug to RHEL 9.

Comment 8 Mingyu Shi 2023-02-23 04:25:21 UTC
Verified with:
nmstate-2.2.7-1.el9.x86_64
nispor-1.2.10-1.el9.x86_64
NetworkManager-1.42.0-1.el9.x86_64
openvswitch2.15-2.15.0-79.el9fdp.x86_64

Apply the YAML:
interfaces:
- name: ovsbr0
  type: ovs-bridge
  state: up
  bridge:
    port:
    - name: ovsbr0
    - name: ens3f0np0
    - name: veth0
- name: ovsbr0
  type: ovs-interface
  state: up
  ipv4:
    enabled: true
    dhcp: true
  ipv6:
    enabled: true
    dhcp: true
    autoconf: true
    token: ::fac1

get the result:
[12:23:29@dell-per740-68 ~]0# ip addr show ovsbr0
586: ovsbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether 0c:42:a1:5f:5c:58 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.79/22 brd 192.168.3.255 scope global dynamic noprefixroute ovsbr0
       valid_lft 7112sec preferred_lft 7112sec
    inet6 2001::ffa0/128 scope global dynamic noprefixroute 
       valid_lft 7114sec preferred_lft 7114sec
    inet6 2001::fac1/64 scope global dynamic noprefixroute 
       valid_lft 86356sec preferred_lft 14356sec
    inet6 192:168:199::fac1/64 scope global dynamic noprefixroute 
       valid_lft 1727914sec preferred_lft 1727914sec
    inet6 fe80::5cf7:27ff:fe1b:f96c/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
[12:23:56@dell-per740-68 ~]0# nmstatectl show ovsbr0
dns-resolver: {}
route-rules: {}
routes:
  running:
  - destination: 192:168:199::/64
    next-hop-interface: ovsbr0
    next-hop-address: '::'
    metric: 800
    table-id: 254
  - destination: 2001::/64
    next-hop-interface: ovsbr0
    next-hop-address: '::'
    metric: 800
    table-id: 254
  - destination: ::/0
    next-hop-interface: ovsbr0
    next-hop-address: fe80::1029:69ff:febf:d429
    metric: 800
    table-id: 254
interfaces:
- name: ovsbr0
  type: ovs-interface
  state: up
  mac-address: 0C:42:A1:5F:5C:58
  mtu: 1500
  min-mtu: 68
  max-mtu: 65535
  wait-ip: any
  ipv4:
    enabled: true
    dhcp: true
    dhcp-client-id: ll
    address:
    - ip: 192.168.2.79
      prefix-length: 22
    auto-dns: true
    auto-gateway: true
    auto-routes: true
    auto-route-table-id: 0
  ipv6:
    enabled: true
    dhcp: true
    autoconf: true
    dhcp-duid: ll
    address:
    - ip: 2001::ffa0
      prefix-length: 128
    - ip: 2001::fac1
      prefix-length: 64
    - ip: 192:168:199::fac1
      prefix-length: 64
    - ip: fe80::5cf7:27ff:fe1b:f96c
      prefix-length: 64
    auto-dns: true
    auto-gateway: true
    auto-routes: true
    auto-route-table-id: 0
    addr-gen-mode: eui64
    token: ::fac1
  mptcp:
    address-flags: []
  accept-all-mac-addresses: false
  lldp:
    enabled: false
  ethtool:
    feature:
      tx-udp_tnl-csum-segmentation: true
      tx-udp-segmentation: true
      tx-tcp-mangleid-segmentation: true
      tx-vlan-stag-hw-insert: true
      tx-gre-csum-segmentation: true
      tx-gso-list: true
      tx-gre-segmentation: true
      tx-scatter-gather-fraglist: true
      rx-gro: true
      rx-gro-list: false
      tx-ipxip4-segmentation: true
      highdma: true
      tx-sctp-segmentation: true
      tx-udp_tnl-segmentation: true
      tx-tcp-segmentation: true
      tx-ipxip6-segmentation: true
      tx-tcp6-segmentation: true
      tx-checksum-ip-generic: true
      tx-nocache-copy: false
      tx-vlan-hw-insert: true
      rx-udp-gro-forwarding: false
      tx-generic-segmentation: true
      tx-tcp-ecn-segmentation: true
- name: ovsbr0
  type: ovs-bridge
  state: up
  wait-ip: any
  ipv4:
    enabled: false
    dhcp: false
  ipv6:
    enabled: false
    dhcp: false
    autoconf: false
  ovs-db:
    external_ids: {}
    other_config: {}
  lldp:
    enabled: false
  bridge:
    options:
      stp: false
      rstp: false
      mcast-snooping-enable: false
      fail-mode: ''
      datapath: ''
    port:
    - name: ens3f0np0
    - name: ovsbr0
    - name: veth0

Comment 10 errata-xmlrpc 2023-05-09 07:32:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (nmstate bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2190


Note You need to log in before you can comment on or make changes to this bug.