ifconfig output: ============================================================================ ubuntu@juju-machine-4-lxd-3:/etc/network/interfaces.d$ ifconfig eth0 Link encap:Ethernet HWaddr 00:16:3e:84:70:09 inet addr:10.244.192.235 Bcast:10.244.255.255 Mask:255.255.192.0 inet6 addr: fe80::216:3eff:fe84:7009/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:393978 errors:0 dropped:0 overruns:0 frame:0 TX packets:3339 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:98808309 (98.8 MB) TX bytes:397911 (397.9 KB) eth1 Link encap:Ethernet HWaddr 00:16:3e:9e:20:7a inet addr:10.244.192.236 Bcast:0.0.0.0 Mask:255.255.192.0 inet6 addr: fe80::216:3eff:fe9e:207a/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:419383 errors:0 dropped:0 overruns:0 frame:0 TX packets:36828 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:53405834 (53.4 MB) TX bytes:8480222 (8.4 MB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) ============================================================================ config files: ============================================================================ ubuntu@juju-machine-4-lxd-3:/etc/network/interfaces.d$ cat * auto lo iface lo inet loopback auto eth0 iface eth0 inet manual dns-nameservers 10.244.192.10 dns-search oilstaging pre-up ip address add 10.244.192.235/18 dev eth0 || true up ip route replace 10.244.192.0/18 dev eth0 || true down ip route del 10.244.192.0/18 dev eth0 || true post-down address del 10.244.192.235/18 dev eth0 || true up ip route replace default via 10.244.192.1 || true down ip route del default via 10.244.192.1 || true auto eth1 iface eth1 inet manual pre-up ip address add 10.244.192.236/18 dev eth1 || true up ip route replace 10.244.192.0/18 dev eth1 || true down ip route del 10.244.192.0/18 dev eth1 || true post-down address del 10.244.192.236/18 dev eth1 || true ============================================================================ # The primary network interface auto eth0 iface eth0 inet dhcp route -n on the container: ============================================================================ ubuntu@juju-machine-4-lxd-3:/etc/network/interfaces.d$ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 10.244.192.1 0.0.0.0 UG 0 0 0 eth0 10.244.192.0 0.0.0.0 255.255.192.0 U 0 0 0 eth1 10.244.192.0 0.0.0.0 255.255.192.0 U 0 0 0 eth1 10.244.192.0 0.0.0.0 255.255.192.0 U 0 0 0 eth0 ============================================================================ and on the host: ============================================================================ ubuntu@puritanvm07:~$ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 10.244.192.1 0.0.0.0 UG 0 0 0 br-eth0 10.0.3.0 0.0.0.0 255.255.255.0 U 0 0 0 lxcbr0 10.0.4.0 0.0.0.0 255.255.255.0 U 0 0 0 lxdbr0 10.244.192.0 0.0.0.0 255.255.192.0 U 0 0 0 br-eth0 10.244.192.0 0.0.0.0 255.255.192.0 U 0 0 0 br-eth1 ============================================================================