On Sun, Jun 21, 2020, 8:51 PM Nicholas Geovanis <nickgeova...@gmail.com>
wrote:

> It's a guess, but I would not use that 0.0.0.0 address. Pick one in the
> private IP ranges, 10.0.0.0 or 192.168.0.0.
>
> On Sun, Jun 21, 2020, 2:09 PM john doe <johndoe65...@mail.com> wrote:
>
>> 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