[lxc-users] reach the outside world

Guillaume VINCENT gvincent at oslab.fr
Fri Mar 13 13:20:16 UTC 2015


Thank you for your answers

I'm running ubuntu 14.04 on a dedicated server, lxc 0.3 and lxd 0.3

> auto lo
> iface lo inet loopback
> 
> # The primary network interface
> auto eth0
> iface eth0 inet dhcp

this configuration correspond to my default /etc/network/interfaces on a dedicated server, after a fresh install


@Serge Hallyn 
my lxcbr0 bridge was created by lxc itself, the only thing I'm trying do to is to connect this bridge to my eth0

so here my new /etc/network/interfaces (thank you, my eth0 should be set to manual, sorry)

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet manual

# LXC bridge
auto lxcbr0
iface lxcbr0 inet dhcp
        bridge_ports eth0


ifconfig -a

eth0      Link encap:Ethernet  HWaddr e8:9a:8f:50:90:87  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1917 errors:0 dropped:7 overruns:0 frame:0
          TX packets:724 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:167618 (167.6 KB)  TX bytes:79313 (79.3 KB)
          Interrupt:28 Memory:feae0000-feb00000 

...

lxcbr0    Link encap:Ethernet  HWaddr e8:9a:8f:50:90:87  
          inet addr:x.x.x.230  Bcast:195.154.5.255  Mask:255.255.255.0
          inet6 addr: xxxx::xxxx:xxxx:xxxx:xxxx/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1898 errors:0 dropped:0 overruns:0 frame:0
          TX packets:708 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:130809 (130.8 KB)  TX bytes:73009 (73.0 KB)


lxc list

root at oslab:~# lxc list
+--------------+---------+-----------+------+
|     NAME     |  STATE  |   IPV4    | IPV6 |
+--------------+---------+-----------+------+
| my_container | RUNNING | 127.0.0.1 | ::1  |
+--------------+---------+-----------+------+

I'm probably missing something

I'm playing with lxd
container are new for me


@Guido
"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?"
static configuration
 
other info for now /var/lib/lxd/lxc/my_container/ does not contain any config file or folder

root at oslab:~# ls /var/lib/lxd/lxc/my_container/
log  rootfs

is it normal ?

Thank you for your patience




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20150313/72300071/attachment.html>


More information about the lxc-users mailing list