Hello all,

I'm playing with systemd-container and I don't understand why the NSS
module won't return an IPV4 address:

Host config:

/etc/systemd/network# cat 80-container-ve.network
[Match]
Name=ve-*
Driver=veth

[Network]
# Default to using a /28 prefix, giving up to 13 addresses per container.
Address=0.0.0.0/24
#LinkLocalAddressing=ipv4-fallback
DHCPServer=yes
IPMasquerade=no
IPForward=no
#LLDP=yes
#EmitLLDP=customer-bridge

[IPv6PrefixDelegation]
Managed=false
OtherInformation=false


Container config:

/etc/systemd/network# cat 80-container-host0.network
[Match]
Virtualization=container
Name=host0

[Network]
DHCP=ipv4
LinkLocalAddressing=ipv4-fallback
#LLDP=yes
#EmitLLDP=customer-bridge

[DHCP]
UseTimezone=yes


If I'm correct, I have an IPv4 address properly set up.

however, if I do the below command to find the IPv4 address I only get
an IPv6 one:


$ getent hosts <CONTAINER-NAME>


Am I missing something, or is this a bug of 'NSS Machine' (1)?


1)  https://www.freedesktop.org/software/systemd/man/nss-mymachines.html

--
John Doe

Reply via email to