IPv4 & IPv6 APIPA addresses generated
I'm deploying Photon 2.0, appliance, into a vSphere 6.7 environment. Although I only have static IPv4 defined afaik, I keep getting APIPA addresses (IPv4 & IPv6).
The static IPv4 file looks ok to me. And the assigned IPv4 address is not a duplicate.
Am I missing something?
root@photon [ ~ ]# networkctl status eth0
● 2: eth0
Link File: /usr/lib/systemd/network/99-default.link
Network File: /etc/systemd/network/10-static-en.network
Type: ether
State: routable (configured)
Path: pci-0000:0b:00.0
Driver: vmxnet3
HW Address: 00:50:56:9c:66:56 (VMware, Inc.)
Address: 192.168.1.91
169.254.118.213
fe80::250:56ff:fe9c:6656
Gateway: 192.168.1.254
DNS: 192.168.1.2
192.168.1.3
Search Domains: local.lab
NTP: 192.168.1.2
192.168.1.3
root@photon [ ~ ]# cat /etc/systemd/network/10-static-en.network
[Match]
Name=eth0
[Network]
Address=192.168.1.91/24
Gateway=192.168.1.254
DNS=192.168.1.2 192.168.1.3
Domains=local.lab
NTP=192.168.1.2 192.168.1.3
# Disable IPv6
LinkLocalAddressing=ipv4
IPv6AcceptRA=no
cant reproduce . only ipv4LL is there no IPv6LL
sus@Zeus systemd]$ systemctl --version
systemd 238
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid
[Match]
Name=veth-test
[Network]
Address=192.168.1.91/24
Gateway=192.168.1.254
DNS=192.168.1.2 192.168.1.3
Domains=local.lab
NTP=192.168.1.2 192.168.1.3
LinkLocalAddressing=ipv4
IPv6AcceptRA=no
Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_323 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=45 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
veth-test: Setting routes
veth-test: Routes set
IPV4ACD: Probing 169.254.226.111
IPV4ACD: Probing 169.254.226.111
test-peer: Adding address: fe80::b0c0:cdff:feaa:39a3/64 (valid forever)
test-peer: Gained IPv6LL
test-peer: Discovering IPv6 routers
NDISC: Started IPv6 Router Solicitation client
NDISC: Sent Router Solicitation, next solicitation in 3s
IPV4ACD: Probing 169.254.226.111
IPV4ACD: ANNOUNCE <==========================================
veth-test: IPv4 link-local claim 169.254.226.111
NDISC: Sent Router Solicitation, next solicitation in 8s
veth-test: Updating address: 169.254.226.111/16 (valid forever)
veth-test: Configured
Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_323 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=46 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
IPV4ACD: ANNOUNCE
NDISC: No RA received before link confirmation timeout
NDISC: Invoking callback for 't'.
test-peer: Configured
Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_322 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=47 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
NDISC: Sent Router Solicitation, next solicitation in 15s
ip a
valid_lft forever preferred_lft forever
23: veth-test@test-peer: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 8a:a6:1c:3f:a6:1a brd ff:ff:ff:ff:ff:ff
inet 169.254.226.111/16 brd 169.254.255.255 scope link veth-test
valid_lft forever preferred_lft forever
inet 192.168.1.91/24 brd 192.168.1.255 scope global veth-test
valid_lft forever preferred_lft forever
[sus@Zeus systemd]$ networkctl status veth-test
● 25: veth-test
Link File: n/a
Network File: /run/systemd/network/test-veth.network
Type: ether
State: routable (configured)
Driver: veth
HW Address: 8a:a6:1c:3f:a6:1a
Address: 192.168.1.91
169.254.226.111
Gateway: 192.168.1.254
DNS: 192.168.1.2
192.168.1.3
Search Domains: local.lab
NTP: 192.168.1.2
192.168.1.3
however for peer
● 26: test-peer
Link File: n/a
Network File: /run/systemd/network/test-peer.network
Type: ether
State: routable (configured)
Driver: veth
HW Address: b2:c0:cd:aa:39:a3
Address: 192.168.225.34
fe80::b0c0:cdff:feaa:39a3
which has the conf
[Match]
Name=test-peer
[Network]
Address=192.168.225.34/24
unable to reproduce
Hi, i have got the same problem an be able to reproduce.
My first goal was to disable ipv6 address from my network 10.0.0.0/8 and avoid DHCP lease. I was not able to find gai.conf so i had add this options to my /etc/systemd/network/10-static-en.network :
LinkLocalAddressing=ipv4 DHCP=no
root@photonos01 [ ~ ]# networkctl status eth0 ● 2: eth0 Link File: /usr/lib/systemd/network/99-default.link Network File: /etc/systemd/network/10-static-en.network Type: ether State: routable (configured) Path: pci-0000:0b:00.0 Driver: vmxnet3 Vendor: VMware Model: VMXNET3 Ethernet Controller HW Address: 00:0c:29:67:2a:b2 (VMware, Inc.) Address: 10.99.9.120 169.254.165.1 fe80::20c:29ff:fe67:2ab2 Gateway: 10.255.24.30 Search Domains: COL-xxxxxxxx.LOCAL NTP: 10.255.24.29 195.83.132.135
As you can see i have a ghost ip 169.254.165.1
Delete the 2 options, update and restart
root@photonos01 [ ~ ]# networkctl status eth0 ● 2: eth0 Link File: /usr/lib/systemd/network/99-default.link Network File: /etc/systemd/network/10-static-en.network Type: ether State: routable (configured) Path: pci-0000:0b:00.0 Driver: vmxnet3 Vendor: VMware Model: VMXNET3 Ethernet Controller HW Address: 00:0c:29:67:2a:b2 (VMware, Inc.) Address: 10.99.9.120 fe80::20c:29ff:fe67:2ab2 Gateway: 10.255.24.30 (VMware, Inc.) Search Domains: COL-xxxxxx.LOCAL NTP: 10.255.24.29 195.83.132.135
No more ghost ip !
Now with this temporary 10-static-en.network no more ghost ip. [Match] Name=eth0
[Network] IPv6AcceptRA=no Address=10.99.9.120/8 Gateway=10.255.24.30 Dns=10.255.24.29 Domains=COL-xxxxxxxxx.LOCAL NTP=10.255.24.29 195.83.132.135 #LinkLocalAddressing=ipv4 #DHCP=no
But i always have the ipv6 fe80::20c:29ff:fe67:2ab2 ....
Thanks
Please Pick https://github.com/systemd/systemd/commit/0e2fdb83bb5e22047e0c7cc058b415d0e93f02cf
Will do when I'm back on site
I see the same on photon 3. By enabling network debugging, it looks like the IP address is obtained by LLDP.
Apr 09 19:03:14 photon systemd-networkd[198]: LLDP: Started LLDP client Apr 09 19:03:14 photon systemd-networkd[198]: eth0: Started LLDP. Apr 09 19:03:14 photon systemd-networkd[198]: eth0: Gained carrier Apr 09 19:03:14 photon systemd-networkd[198]: eth0: Acquiring IPv4 link-local address Apr 09 19:03:14 photon systemd-networkd[198]: IPV4LL: Picked new IP address 169.254.193.10
Which corresponds with what I see later on
● 2: eth0 Link File: /usr/lib/systemd/network/99-default.link Network File: /etc/systemd/network/10-static-en.network Type: ether State: routable (configured) Path: pci-0000:0b:00.0 Driver: vmxnet3 Vendor: VMware Model: VMXNET3 Ethernet Controller HW Address: 00:50:56:b6:4b:f4 (VMware, Inc.) Address: 192.168.10.70 169.254.193.10 Gateway: 192.168.10.1 (VMware, Inc.) DNS: 192.168.10.2 192.168.10.3
Is there a way to disable this LLDP client?
IP addresses are not obtained by LLDP. In the network section LLDP=no
Ok, thanks. The LLDP client is gone.
I still see
Apr 09 21:04:55 photon systemd-networkd[194]: eth0: Gained carrier Apr 09 21:04:55 photon systemd-networkd[194]: eth0: Acquiring IPv4 link-local address Apr 09 21:04:55 photon systemd-networkd[194]: IPV4LL: Picked new IP address 169.254.146.239.
Where is this coming from? And can I avoid it?
Finally found the answer.
The presence of the IPV4LL and IPV6LL is controlled through the LinkLocalAddressing entry in the [Network] section. To have no APIPA address for LL, just set
[Network]
LinkLocalAddressing=no