No network access on single-NIC IPv6-only EC2 instance

Bug #2069066 reported by James Falcon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)
Invalid
Undecided
Unassigned
Focal
New
Undecided
Unassigned

Bug Description

When launching a Focal instance on an single-NIC IPv6 EC2 instance and a subnet that only allows IPv6, the instance does not bring up networking. When connecting via the serial console, I find that the interface has no IP address.

I checked back to 23.4 and this problem is still present there, so this isn't a recent regression.

Launched with:
aws ec2 run-instances --image-id ami-0e99f6d19f9c4276c --count 1 --instance-type t3.small --subnet-id <v6-only-subnet> --key-name <my-key> --ipv6-address-count 1 --security-group-ids <open-permissions-sg> --metadata-options "HttpEndpoint=enabled,HttpProtocolIpv6=enabled"

The rendered netplan config looks like this:
network:
    ethernets:
        ens5:
            dhcp4: true
            dhcp6: true
            match:
                macaddress: 0a:36:7f:80:92:57
            set-name: ens5
    version: 2

I remove the "dhcp4: true" line, network is then able to come up successfully.

Note that this only happens on Jammy. Comparing Focal and Jammy, the rendered netplan configurations look exactly the same as well as the rendered networkd configurations.

I turned on debug logging for networkd, and see different logs in the journal.

Focal journal logs:
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Acquiring DHCPv4 lease
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: DHCP CLIENT (0xaf38d5c6): STARTED on ifindex 2
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Discovering IPv6 routers
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: NDISC: Started IPv6 Router Solicitation client
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: State changed: pending -> configuring
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: DHCP CLIENT (0xaf38d5c6): DISCOVER
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Forgetting route: dst: n/a, src: n/a, gw: fe80::800:b7ff:fecb:6a7b, prefsrc: n/a, scope: global, table: ma
in, proto: ra, type: unicast
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: DHCP CLIENT (0xaf38d5c6): OFFER
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-timesyncd[345]: Network configuration changed, trying to establish connection.
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: DHCP CLIENT (0xaf38d5c6): REQUEST (requesting)
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: DHCP CLIENT (0xaf38d5c6): ACK
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: DHCP CLIENT (0xaf38d5c6): lease expires in 59min 59s
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: DHCP CLIENT (0xaf38d5c6): T2 expires in 52min 29s
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: DHCP CLIENT (0xaf38d5c6): T1 expires in 29min 59s
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: DHCPv4 address 169.254.100.42/32
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Setting MTU: 9001
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: Setting transient hostname: 'i-0f33f70c994b93ce6'
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: Not connected to system bus, setting hostname later.
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-timesyncd[345]: Network configuration changed, trying to establish connection.
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Setting MTU done.
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Remembering updated address: 169.254.100.42/32 (valid for 1h)
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Remembering route: dst: 169.254.100.42/32, src: n/a, gw: n/a, prefsrc: 169.254.100.42, scope: host, table: local, proto: kernel, type: local
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-timesyncd[345]: Network configuration changed, trying to establish connection.
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Configuring route: dst: 169.254.169.253/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.100.42, scope: global, table: main, proto: dhcp, type: unicast
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Configuring route: dst: 169.254.169.254/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.100.42, scope: global, table: main, proto: dhcp, type: unicast
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Configuring route: dst: 169.254.169.123/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.100.42, scope: global, table: main, proto: dhcp, type: unicast
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Configuring route: dst: 169.254.169.250/31, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.100.42, scope: global, table: main, proto: dhcp, type: unicast
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Configuring route: dst: 169.254.169.249/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.100.42, scope: global, table: main, proto: dhcp, type: unicast
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: DHCP: No gateway received from DHCP server.
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Could not set DHCPv4 route, retrying later: Nexthop has invalid gateway. Network is unreachable
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Could not set DHCPv4 route, retrying later: Nexthop has invalid gateway. Network is unreachable
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Could not set DHCPv4 route, retrying later: Nexthop has invalid gateway. Network is unreachable
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Could not set DHCPv4 route, retrying later: Nexthop has invalid gateway. Network is unreachable
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Could not set DHCPv4 route, retrying later: Nexthop has invalid gateway. Network is unreachable
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Removing route: dst: 169.254.169.253/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.100.42, scope: global, table: main, proto: 0, type: unicast
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Removing route: dst: 169.254.169.254/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.100.42, scope: global, table: main, proto: 0, type: unicast
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Removing route: dst: 169.254.169.123/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.100.42, scope: global, table: main, proto: 0, type: unicast
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Removing route: dst: 169.254.169.250/31, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.100.42, scope: global, table: main, proto: 0, type: unicast
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Removing route: dst: 169.254.169.249/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.100.42, scope: global, table: main, proto: 0, type: unicast
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: DHCP: No gateway received from DHCP server.
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Removing address 169.254.100.42
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Forgetting address: 169.254.100.42/32 (valid for 1h)
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-timesyncd[345]: Network configuration changed, trying to establish connection.
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Forgetting route: dst: 169.254.100.42/32, src: n/a, gw: n/a, prefsrc: 169.254.100.42, scope: host, table: local, proto: kernel, type: local
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-timesyncd[345]: Network configuration changed, trying to establish connection.
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Remembering updated address: 169.254.100.42/32 (valid for 1h)
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Remembering route: dst: 169.254.100.42/32, src: n/a, gw: n/a, prefsrc: 169.254.100.42, scope: host, table: local, proto: kernel, type: local
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Configuring route: dst: 169.254.169.253/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.100.42, scope: global, table: main, proto: dhcp, type: unicast
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Configuring route: dst: 169.254.169.254/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.100.42, scope: global, table: main, proto: dhcp, type: unicast
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-timesyncd[345]: Network configuration changed, trying to establish connection.
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Configuring route: dst: 169.254.169.123/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.100.42, scope: global, table: main, proto: dhcp, type: unicast
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Configuring route: dst: 169.254.169.250/31, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.100.42, scope: global, table: main, proto: dhcp, type: unicast
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Configuring route: dst: 169.254.169.249/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.100.42, scope: global, table: main, proto: dhcp, type: unicast
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: DHCP: No gateway received from DHCP server.
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Could not set DHCPv4 route: Nexthop has invalid gateway. Network is unreachable
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: Failed
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: ens5: State changed: configuring -> failed
Jun 11 15:37:58 i-0f33f70c994b93ce6 systemd-networkd[423]: DHCP CLIENT (0xaf38d5c6): STOPPED

Jammy journal logs:
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: DHCPv4 address 169.254.248.181/32
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Requesting address: 169.254.248.181/32 (valid for 1h, preferred for 1h), flags: n/a
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Requesting route: dst: 169.254.0.1/32, src: n/a, gw: n/a, prefsrc: 169.254.248.181, scope: link, table: main(254), proto: dhc>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Requesting route: dst: 169.254.169.253/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.248.181, scope: global, table: main(25>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Requesting route: dst: 169.254.0.1/32, src: n/a, gw: n/a, prefsrc: 169.254.248.181, scope: link, table: main(254), proto: dhc>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Requesting route: dst: 169.254.169.254/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.248.181, scope: global, table: main(25>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Requesting route: dst: 169.254.0.1/32, src: n/a, gw: n/a, prefsrc: 169.254.248.181, scope: link, table: main(254), proto: dhc>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Requesting route: dst: 169.254.169.123/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.248.181, scope: global, table: main(25>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Requesting route: dst: 169.254.0.1/32, src: n/a, gw: n/a, prefsrc: 169.254.248.181, scope: link, table: main(254), proto: dhc>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Requesting route: dst: 169.254.169.250/31, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.248.181, scope: global, table: main(25>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Requesting route: dst: 169.254.0.1/32, src: n/a, gw: n/a, prefsrc: 169.254.248.181, scope: link, table: main(254), proto: dhc>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Requesting route: dst: 169.254.169.249/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.248.181, scope: global, table: main(25>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: DHCP: requested route destination 169.254.169.253/32 is not in the assigned network 169.254.248.181/32, but no gateway is spe>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Requesting route: dst: 169.254.169.253/32, src: n/a, gw: n/a, prefsrc: 169.254.248.181, scope: link, table: main(254), proto:>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: link_check_ready(): link layer is configuring.
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: lo: Link state is up-to-date
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: lo: State changed: initialized -> unmanaged
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_31 interface=org.freedesktop.DBus.Properti>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Forgetting route: dst: 169.254.0.1/32, src: n/a, gw: n/a, prefsrc: 169.254.248.181, scope: link, table: main(254), proto: dhc>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Forgetting route: dst: n/a, src: n/a, gw: fe80::800:b7ff:fecb:6a7b, prefsrc: n/a, scope: global, table: main(254), proto: ra,>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Forgetting route: dst: 169.254.169.253/32, src: n/a, gw: n/a, prefsrc: 169.254.248.181, scope: link, table: main(254), proto:>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Forgetting route: dst: 169.254.169.123/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.248.181, scope: global, table: main(25>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Forgetting route: dst: 169.254.169.254/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.248.181, scope: global, table: main(25>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Forgetting route: dst: 169.254.169.253/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.248.181, scope: global, table: main(25>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Forgetting route: dst: 2600:1f16:fe:9301::/64, src: n/a, gw: n/a, prefsrc: n/a, scope: global, table: main(254), proto: ra, t>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Forgetting route: dst: 169.254.169.250/31, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.248.181, scope: global, table: main(25>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Forgetting route: dst: 169.254.169.249/32, src: n/a, gw: 169.254.0.1, prefsrc: 169.254.248.181, scope: global, table: main(25>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Forgetting address: 169.254.248.181/32 (valid for 55min 7s, preferred for 55min 7s), flags: n/a
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properti>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1 interface=org.freedesktop.DBus.Properties member>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Forgetting route: dst: 169.254.248.181/32, src: n/a, gw: n/a, prefsrc: 169.254.248.181, scope: host, table: local(255), proto>
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: rtnl: received non-static neighbor, ignoring.
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: IPv6LL address generation mode set.
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: master interface set.
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: link_check_ready(): link is not activated.
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: Bringing link up
Jun 11 14:57:43 i-0b74a29276ca3fc37 systemd-networkd[1541]: ens5: link_check_ready(): DHCP4, DHCP6 or IPv4LL is enabled but no dynamic address is assigned yet.

James Falcon (falcojr)
Changed in cloud-init (Ubuntu):
status: New → Invalid
description: updated
James Falcon (falcojr)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.