LXC networking configuration help

Hello guys.

I am trying to setup LXC containers on one of the computers at home. The creation of containers is going well, but I am failing miserably in configuring the networking of each container. The LXC documentation says that you can setup a bridged adapter br0 for eth0. So basically my configuration looks like this:

root@[~Kerrigan~]:[/] $ cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto br0
iface br0 inet static
  bridge_ports eth0
  bridge_fd 0
  bridge_maxwait 0
  address 192.168.0.100
  netmask 255.255.255.0
  gateway 192.168.0.1
  allow-hotplug eth0

I have setup the networking configuration on one LXC like this:

root@[~Kerrigan~]:[/] $ cat /var/lib/lxc/new1234/config
# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template:
# For additional config options, please look at lxc.container.conf(5)

# Distribution configuration
lxc.include = /usr/share/lxc/config/ubuntu.common.conf
lxc.arch = x86_64

# Container specific configuration
lxc.rootfs = /var/lib/lxc/new1234/rootfs
lxc.utsname = new1234

# Network configuration
lxc.network.type=veth
lxc.network.link=br0
lxc.network.flags=up
lxc.network.hwaddr=02:2d:48:b8:a2:16
lxc.network.ipv4=192.168.0.110/24
lxc.network.ipv4.gateway = 192.168.0.1

Also IP4 forwarding is activated:

root@[~Kerrigan~]:[/] $ sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1

And the container’s network interface setup:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 192.168.0.126
        netmask 255.255.255.0
        gateway 192.168.0.1
        dns-nameservers 8.8.8.8 8.8.4.4

The problem is that the guest OS cannot access the outside world. It’s able to ping the HOST IP address, not other IP addresses in the home network or outside world.

Does anyone have a suggestion?

I believe U must have the host bridge ip as the gateway for the container, ie 192.168.0.100. Then container must connect to external world. Also what is tracepath/mtr telling when you ping to external network.