Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...



default config


Code Block
titlecode
collapsetrue
ubuntu@ip-10-0-11-132:~$ more /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# 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:
    version: 2
    ethernets:
        eth0:
            dhcp4: true
            match:
                macaddress: 0a:0a:b0:22:e4:a8
            set-name: eth0


changes


Code Block
titlechange netplan
ubuntu@ip-10-0-11-132:~$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 0a:0a:b0:22:e4:a8 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 0a:fe:87:e3:4c:de brd ff:ff:ff:ff:ff:ff

>>>> New interface and Mac@: 0a:fe:87:e3:4c:de 

network:
    version: 2
    ethernets:
        eth0:
            dhcp4: true
            match:
                macaddress: 0a:0a:b0:22:e4:a8
            set-name: eth0
        eth1:
            dhcp4: true
            match:
                macaddress: 0a:fe:87:e3:4c:de
            set-name: eth1


apply changes
sudo netplan try

...