Description of problem: Now that nmstatectl is part of FCOS/RHCOS it should support the same features presented at FCOS network examples at documentation [1] Missing features: - dhcp-send-hostname - dhcp-hostname [1] https://docs.fedoraproject.org/en-US/fedora-coreos/sysconfig-network-configuration Version-Release number of selected component (if applicable): 2.x How reproducible: Always Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
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)
Hi Mingyu, please provide doc text. Thanks.