Network SetupI have a server which I am trying to set up LXCs onI am using LXD which forces me to use DHCPDHCP is working fine alreadydue to my setup I need to be able to access the containers using their hostnamesthis works now using the .local TLDProblemThe problem now is that I need to access the containers using their hostnames from the host too which does not receive it's configuration from the DHCP server. Currently this does not work.EditThis does work when I set the DNS server of the host interface to it's own ip. I still cannot ping the host from anywhere.WorkaroundI could just put the host with it's ip in the host's /etc/hosts file, but I am not sure if this is the right way to do it.Host SetupThe host is running Gentoo GNU/Linux 4.1.5 (OpenRC)./etc/conf.d/net looks as follows:dns_servers=8.8.8.8 8.8.4.4config_eth0=<static IP>routes_eth0=default via <static gateway>fallback_eth0=dhcprc_net_lxcbr0_provide=!netconfig_lxcbr0=10.2.0.1/24brctl_lxcbr0=setfd 0sethello 10stp offbridge_lxcbr0=dns_domain_lxcbr0=localdns_servers_lxcbr0=10.2.0.1 8.8.8.8 8.8.4.4dnsmasq is configured like this (comments removed):local=/local/interface=lxcbr0listen-address=10.2.0.1expand-hostsdomain=local,10.2.0.0/24dhcp-range=10.2.0.2,10.2.0.128,255.255.255.0,12hdhcp-range=<static ip range>, 12henable-raContainer SetupThe containers just run their DHCP client.HostnamesLet's just assume those:hostcont1cont2PingsThe upper row shows who is pinged.The left column shows who is pinging.Pings are run in the form ping <machine>.local e.g.: ping host.local.+-------+-------+-------+-------+|       | host  | cont1 | cont2 |+-------+-------+-------+-------+| host  |  no   |  yes  |  yes  |+-------+-------+-------+-------+| cont1 |  no   |  yes  |  yes  |+-------+-------+-------+-------+| cont2 |  no   |  yes  |  yes  |+-------+-------+-------+-------+
DHCP server with static IP not resolving hostnames (clients do)
linux;networking;dns;gentoo;dhcp