> On Jun 13, 2015, at 2:33, joerg.syst...@higgsboson.tk > <mailto:joerg.syst...@higgsboson.tk> wrote: > > 13. Juni 2015 02:32 Uhr, "Johannes Ernst" <johannes.er...@gmail.com > <mailto:johannes.er...@gmail.com>> schrieb: > >> My host obtains an IP address and DNS server via DHCP from upstream via >> Ethernet like this (systemd >> 219, Arch Linux) >> >> [Match] >> Name=en* >> >> [Network] >> DHCP=ipv4 >> >> It has the resolv.conf symlink to /run/systemd/resolve/resolv.conf, and the >> DNS server from DHCP >> shows up there. >> >> It also has this test.network file: >> >> [Match] >> Name=ve-* >> >> [Network] >> Address=0.0.0.0/28 >> IPMasquerade=yes >> IPv4LL=yes >> DHCPServer=yes >> IPForward=yes >> >> My host runs a container like this: (systemd 219, UBOS (just like Arch >> Linux)) >> >> systemd-nspawn -b -D test -n >> >> The container does not have any networkd configuration. It has the >> resolv.conf symlink, and runs >> systemd-networkd >> >> I was expecting: >> * container gets an IP address from host in some new subnet: WORKS, e.g >> 10.0.0.2 >> * container can route to upstream via IPMasquerade: WORKS, after manual >> 'modprobe iptable_nat' >> * container gets the DNS server from the host: FAILS: /etc/resolv.conf >> points to Google name >> servers instead (8.8.8.8 etc) >> * host and container can ping test (if test is the name of the container >> machine per machinectl): >> FAILS, neither can >> >> What am I misunderstanding or doing wrong? If somebody educates me, I’ll put >> the insights on a wiki >> somewhere (e.g. Arch) > > Hi, you need to configure the networkd inside your container to issue > DHCP-Request on its own > interface, > like you did on the host: > > [Match] > Type=ethernet > > [Network] > DHCP=ipv4
I did. No change. I do receive the IP address (so DHCP IP assignment is working) but I do not receive the DNS server.
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel