Score:0

Blocking automatic setting of APIPA IP on the network interface

cy flag

I have a VM (on ESXi) with Jammy installed; The second interface takes Apipa in Ubuntu:

# /etc/netplan/00-installer-config.yaml
ens192           UP             169.254.158.255/16 metric 2048

I have removed the interface, then attached a new one, but it again gets the same APIPA IP on ens192! I also removed that IP by the command IP a d 169.254.158.255/16 dev ens192, but after a reboot, it came back! How can I get rid of the APIPA IP?

$ ip -c -br a
lo               UNKNOWN        127.0.0.1/8
ens160           UP             172.17.240.2/24 metric 100
ens192           UP             169.254.90.187/16 metric 2048

My case: DHCP enabled (true) for ens160, and intentionally no IP for ens192

Even If I set static IP on ens192:

ip -c -br a
lo               UNKNOWN        127.0.0.1/8
ens160           UP             172.17.238.45/24 metric 100
ens192           UP             169.254.90.187/16 metric 2048 10.0.0.11/24

My netplan config file:

network:
  ethernets:
    ens160:
      link-local: [ ipv4 ]
      dhcp4: true
      dhcp-identifier: mac
    ens192:
      link-local: [ ipv4 ]
      dhcp4: false
      #addresses:
        #- 10.0.0.11/24

I'm wondering why it gets APIP?!

lnee avatar
td flag
maby it's related to the mac address
Moha avatar
cy flag
MAC? DHCP is off and I have deleted network interfaces and added them newly!
Score:0
us flag

You are specifying link-local: [ ipv4 ] in your config and that is what an APIPA address is. If you don't want this, you can specify link-local: [] instead.

I sit in a Tesla and translated this thread with Ai:

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.