0

I am new to LXD. I am running Ubuntu 16.04.1 I installed lxd. I initially did not install with the network with init lxd. I tried to setup the networking later. The containers are not showing any IP addresses. I do want the containers to have their own IP addresses. What I have I done incorrectly?

Here are some outputs:

/etc/network/interfaces:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
#auto enp0s25
#iface eth0 inet dhcp
#pre-up /sbin/ethtool -s eth0 speed 1000 duplex full
#iface enp0s25 inet static
auto br0
iface br0 inet static 
    address 128.194.145.15
    netmask 255.255.255.0
    gateway 128.194.145.1
    dns-search tamu.edu
    dns-nameservers 128.194.254.1 128.194.254.2
    bridge_ports enp0s25
    bridge_stp off
    bridge_maxwait 0
iface enp0s25 inet manual

I enabled packet forwarding:

I did edit /etc/sysctl.conf and uncommented the line net.ipv4.ip_forward=1 and sudo sysctl -p

sudo systemctl restart networking.service

lxc profile show default

config: {}
description: Default LXD profile
devices:
  eth0:
    name: eth0
    nictype: bridged
    parent: br0
    type: nic
name: default

lxc list shows the following:

+-----------+---------+------+------+------------+-----------+
|   NAME    |  STATE  | IPV4 | IPV6 |    TYPE    | SNAPSHOTS |
+-----------+---------+------+------+------------+-----------+
| appstack1 | RUNNING |      |      | PERSISTENT | 0         |
+-----------+---------+------+------+------------+-----------+
| kcxenial1 | RUNNING |      |      | PERSISTENT | 0         |
+-----------+---------+------+------+------------+-----------+

Heres is the output from ifconfig:

br0       Link encap:Ethernet  HWaddr 00:26:b9:7b:82:db  
          inet addr:128.194.145.15  Bcast:128.194.145.255  Mask:255.255.255.0
          inet6 addr: fe80::226:b9ff:fe7b:82db/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12126 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2413 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2438060 (2.4 MB)  TX bytes:341636 (341.6 KB)

enp0s25   Link encap:Ethernet  HWaddr 00:26:b9:7b:82:db  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:31738 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10498 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:9031992 (9.0 MB)  TX bytes:1616482 (1.6 MB)
          Interrupt:21 Memory:f7ae0000-f7b00000 

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:23 errors:0 dropped:0 overruns:0 frame:0
          TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:1910 (1.9 KB)  TX bytes:1910 (1.9 KB)

vethRLDAS7 Link encap:Ethernet  HWaddr fe:a7:58:6b:11:ea  
          inet6 addr: fe80::fca7:58ff:fe6b:11ea/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:30 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10988 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:8172 (8.1 KB)  TX bytes:1404949 (1.4 MB)

vethWXSA9S Link encap:Ethernet  HWaddr fe:17:94:89:8f:fe  
          inet6 addr: fe80::fc17:94ff:fe89:8ffe/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:36 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10932 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:10224 (10.2 KB)  TX bytes:1397627 (1.3 MB)
  • I have figured out what I have done incorrectly. My updates to /etc/sysctl was totally off. I am so sorry for asking such a dumb question. – agls72 Jan 27 '17 at 13:31
  • I am setting them up to get the first available IP from the subnet and they are NAT for now. Once I test out my software and snapshot then they will be going from my test server here over to the main host server and will have static IP's at that point. – agls72 Jan 27 '17 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.