Skip to content

net: fix ipv6_dhcpv6_stateful configuration for rhel#4329

Closed
ani-sinha wants to merge 1 commit into
canonical:mainfrom
ani-sinha:fix-2227767
Closed

net: fix ipv6_dhcpv6_stateful configuration for rhel#4329
ani-sinha wants to merge 1 commit into
canonical:mainfrom
ani-sinha:fix-2227767

Conversation

@ani-sinha
Copy link
Copy Markdown
Contributor

When network type is ipv6_dhcpv6-stateful, cloud-init seems to enable dhcp for both ipv4 and ipv6. Network manager prefers dhcp over ipv4 and hence dhcp6 is not used to obtain the IP address. This is incorrect. For ipv6_dhcpv6-stateful networks, we should set:

ipv4.method = disabled // disables all ipv4 dhcp
ipv6.method = dhcp
ipv6.may-fail = no // dhcp6 must succeed.

For ifcfg files (sysconfig renderer), the corresponding changes should be:

BOOTPROTO = none // instead of dhcp so that dhcp4 is disabled. 
IPV6_FAILURE_FATAL = yes // so that dhcp6 should succeed.

This patch fixes this. This patch has been tested by Red Hat QE and it seems to fix the above issue.

RHBZ: 2227767
fixes: f550c87 ("Adding BOOTPROTO = dhcp to render sysconfig dhcp6 stateful on RHEL (#685)")

When network type is ipv6_dhcpv6-stateful, cloud-init seems to enable dhcp for
both ipv4 and ipv6. Network manager prefers dhcp over ipv4 and hence dhcp6 is
not used to obtain the IP address. This is incorrect. For ipv6_dhcpv6-stateful
networks, we should set:

ipv4.method = disabled // disables all ipv4 dhcp
ipv6.method = dhcp
ipv6.may-fail = no // dhcp6 must succeed.

For ifcfg files (sysconfig renderer), the corresponding changes should be:

BOOTPROTO = none // instead of dhcp so that dhcp4 is disabled.
IPV6_FAILURE_FATAL = yes // so that dhcp6 should succeed.

This patch fixes this. This patch has been tested by Red Hat QE and it seems
to fix the above issue.

RHBZ: 2227767
fixes: f550c87 ("Adding BOOTPROTO = dhcp to render sysconfig dhcp6 stateful on RHEL (canonical#685)")

Signed-off-by: Ani Sinha <anisinha@redhat.com>
@ani-sinha
Copy link
Copy Markdown
Contributor Author

Seems we have not considered a scenario where both ipv6-stateful and ipv4 dhcp is enabled. Will need to fix it. Closing.

@ani-sinha ani-sinha closed this Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant