Score:0

Help with adding secondary IPs to Netplan on Ubuntu 20.04 AWS EC2 instance

us flag

I have a Ubuntu 20.04 ec2 instance. I need to add three more persistent private IP addresses in addition to the primary. I'm familiar with the old way of doing this, but I have no experience with Netplan. Here is what I have (by default) in my 50-cloud-init.yaml file:

# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        eth0:
            dhcp4: true
            dhcp6: false
            match:
                macaddress: 02:63:b0:5e:8d:8d
            set-name: eth0
    version: 2

Does anyone have any suggestions as to how I can add three secondary addresses to this machine Thank you for your help!

chili555 avatar
cn flag
Please see: `cat /usr/share/doc/netplan/examples/static_multiaddress.yaml` Welcome to Ask Ubuntu.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.