You can set the ip of the container to whichever domain you want.
There are two ways to do it.

Bridging it to default gateway br0 or you can set it to public network using Macvlan. This link might help you: https://docs.oracle.com/cd/E37670_01/E37355/html/ol_config_os_containers.html#ol_modmacv_lxc

Thanks & Regards
Ashish Bunkar
Contact No.- +91-7259183696

On 03/13/2015 12:29 PM, Guido Jäkel wrote:
Dear Guillaume,

from the output
| my_container | RUNNING | 127.0.0.1 | ::1  |
I would say that the container don't have an adequate IP. And maybe no default 
route to your gateway x.x.x.1, too. Should this be set by DHCP or by static 
configuration?

Guido


On 12.03.2015 23:54, Guillaume VINCENT wrote:
Hello list,

I'm learning how to use lxd and play with my container.

For know I can download images, launch some container.

But I can't get my container reaching the outside world.

My host /etc/network/interfaces :

auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

auto lxcbr0
iface lxcbr0 inet static
     address x.x.x.230
     netmask 255.255.255.0
     network x.x.x.0
     broadcast x.x.x.255
     gateway x.x.x.1
     bridge_ports eth0
     bridge_stp off
     bridge_fd 0

brctl show

bridge name     bridge id               STP enabled     interfaces
lxcbr0          8000.e89a8f509087       no              eth0

lxc list

+--------------+---------+-----------+------+
|     NAME     |  STATE  |   IPV4    | IPV6 |
+--------------+---------+-----------+------+
| my_container | RUNNING | 127.0.0.1 | ::1  |
+--------------+---------+-----------+------+


lxc config show my_container

Profiles: default

lxc config profile edit default

name: default
config: {}
devices:
   eth0:
     nictype: bridged
     parent: lxcbr0
     type: nic


lxc exec my_container -- ping 8.8.8.8

connect: Network is unreachable


Any idea ? Any ressource I can read ?

I've read lxc bridge setup post on the mailing list without any success

Thank you
_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to