By default, LXC sets up dnsmasq to issue a lease expiration of 1 hour. Thus if you suspend and resume your laptop after more than an hour has passed, your containers will lose their hostnames and can no longer communicate with one another by host name, as dnsmasq has forgotten about them.
To fix the issue for Ubuntu 14.04, edit /etc/default/lxc-net
. Find the line:
LXC_DHCP_RANGE="10.0.3.2,10.0.3.254"
and change it to
LXC_DHCP_RANGE="10.0.3.2,10.0.3.254,72h"