Configurate a IPv6 only and IPv4 disabled networking by netplan

Bug #2070434 reported by Ruishuang Wang
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
netplan.io (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Hi all,

We want to set up an IPv6-only network in a lab, and some Ubuntu ( release >=18.04) needs to be configured according to the networking requirements. I found a Netplan doc about disabling ipv6 by editing the Netplan YAML file:
https://github.com/canonical/netplan/blob/main/doc/netplan-tutorial.md#editing-netplan-yaml-files-to-disable-ipv6
===
When you finish, the whole configuration in second-interface.yaml should look like this:

network:
  version: 2
  ethernets:
    enp6s0:
      dhcp4: true
      accept-ra: false
      link-local: []
===
 can I use the same way to disable IPv4? e.g.
network:
  version: 2
  ethernets:
    eth0:
      dhcp4: false
      dhcp6: true
      accept-ra: false
      link-local: [ipv6]

Or are there other ways to disable ipv4 on Ubuntu?

In addition, Ubuntu 18.04 uses ifupdown with /etc/network/interfaces to configure the networking
e.g.
===
iface lo inet loopback
auto lo

auto eth0
iface eth0 inet manual
iface eth0 inet6 dhcp
netmask 16
accept_ra 1
autoconf 1
===
Can I add 'iface eth0 inet manual' in this file to disable IPv4?
Thanks,

Thanks,

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in netplan.io (Ubuntu):
status: New → Confirmed
Revision history for this message
Lukas Märdian (slyon) wrote :
Revision history for this message
Lukas Märdian (slyon) wrote :

I'm closing this ticket in favour of the support request (question) linked from the comment above.

Changed in netplan.io (Ubuntu):
status: Confirmed → Invalid
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.