Bug 2187622
| Summary: | RFE: Support missing features from fedora coreos examples at documentation | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Quique Llorente <ellorent> |
| Component: | nmstate | Assignee: | Gris Ge <fge> |
| Status: | CLOSED ERRATA | QA Contact: | Mingyu Shi <mshi> |
| Severity: | medium | Docs Contact: | Mayur Patil <maypatil> |
| Priority: | unspecified | ||
| Version: | 9.2 | CC: | ferferna, fge, jiji, jishi, maypatil, network-qe, sfaye, till |
| Target Milestone: | rc | Keywords: | FutureFeature, Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: |
.The `nmstate` API support available for `dhcp-send-hostname` and `dhcp-custom-hostname` DHCP options
With this enhancement, the `nmstate` utility supports configuration of the following two DHCP options in the connection file:
* `dhcp-send-hostname`: `true` or `false` value. If a DHCP request needs the hostname or fully qualified domain name (FQDN) option, the hostname from that option is set. The default is `true`.
* `dhcp-custom-hostname`: <string>. Use this option to configure the hostname or FQDN option in a DHCP request, value type is string.
For DHCPv4 network protocols ::
* If the hostname is FQDN, see the `Fully Qualified Domain Name (FQDN)`, option (81) in RFC 4702.
* If the hostname is not FQDN, see the `Host Name`, option (12) in RFC 2132.
For DHCPv6 network protocols::
[.text-left]
Supports custom string, empty domain name, overrides the hostname for a DHCP request. See the `Fully Qualified Domain Name (FQDN)`, option (29) in RFC 4704.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-11-07 08:24:03 UTC | Type: | Feature Request |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Quique Llorente
2023-04-18 08:11:50 UTC
Patch sent to upstream: https://github.com/nmstate/nmstate/pull/2315 Introducing these two DHCP options: * `dhcp-send-hostname`: true of false, whether DHCP request should contain hostname/FQDN option. Default is true. * `dhcp-custom-hostname`: String. Customer hostname/FQDN in DHCP request. For DHCPv4, if the hostname is FQDN, the 'Fully Qualified Domain Name (FQDN)' option(81) defined in RFC 4702 will be used. If the hostname is not FQDN, the 'Host Name' option(12) defined in RFC 2132 will be used. For DHCPv6, custom string to override hostname used for DHCP request in `Fully Qualified Domain Name (FQDN)` option(29) defined in RFC 4704 as RFC 4704 allows empty domain name. Example YAML: ```yml --- interfaces: - name: eth1 type: ethernet state: up mtu: 1500 ipv4: dhcp: true dhcp-client-id: iaid+duid enabled: true dhcp-send-hostname: true dhcp-custom-hostname: c9.example.org ipv6: dhcp: true autoconf: true enabled: true dhcp-send-hostname: true dhcp-custom-hostname: c9.example.net ``` Do we cover the fcos examples with this ? https://docs.fedoraproject.org/en-US/fedora-coreos/sysconfig-network-configuration/#_configuring_a_static_ip Yes. For `ip=10.10.10.10::10.10.10.1:255.255.255.0:myhostname:ens2:none:8.8.8.8`, nmstate YAML is:
```yml
---
hostname:
config: myhostname
dns-resolver:
config:
server:
- 8.8.8.8
routes:
config:
- destination: 0.0.0.0/0
next-hop-address: 10.10.10.1
next-hop-interface: ens2
interfaces:
- name: ens2
type: ethernet
state: up
ipv4:
address:
- ip: 10.10.10.1
prefix-length: 24
dhcp: false
enabled: true
ipv6:
enabled: false
```
Verified with:
nmstate-2.2.10-3.el9.x86_64
nispor-1.2.10-1.el9.x86_64
NetworkManager-1.43.8-1.el9.x86_64
DISTRO=RHEL-9.3.0-updates-20230520.44
[17:26:27@dell-per730-20 ~]0# nms set dhcp-send.yaml
/tmp/nmstatelog/2023-05-21-17:27:21-038936344.log
dns-resolver: {}
route-rules: {}
routes: {}
interfaces:
- name: veth0
type: ethernet
state: up
mtu: 1500
ipv4:
enabled: true
dhcp: true
dhcp-client-id: iaid+duid
dhcp-send-hostname: true
dhcp-custom-hostname: c9.example.org
ipv6:
enabled: true
dhcp: true
autoconf: true
dhcp-send-hostname: true
dhcp-custom-hostname: c9.example.net
veth:
peer: veth0_p
ovs-db: {}
/tmp/nmstatelog/2023-05-21-17:27:21-038936344.0.log nmstatectl set dhcp-send.yaml return 0
[17:27:23@dell-per730-20 ~]0# nmcli con show veth0 | grep -i dhcp
ipv4.dhcp-client-id: duid
ipv4.dhcp-iaid: --
ipv4.dhcp-timeout: 2147483647 (infinity)
ipv4.dhcp-send-hostname: yes
ipv4.dhcp-hostname: --
ipv4.dhcp-fqdn: c9.example.org
ipv4.dhcp-hostname-flags: 0x0 (none)
ipv4.dhcp-vendor-class-identifier: --
ipv4.dhcp-reject-servers: --
ipv6.dhcp-pd-hint: --
ipv6.dhcp-duid: ll
ipv6.dhcp-iaid: mac
ipv6.dhcp-timeout: 2147483647 (infinity)
ipv6.dhcp-send-hostname: yes
ipv6.dhcp-hostname: c9.example.net
ipv6.dhcp-hostname-flags: 0x0 (none)
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:6323 |