<div dir="ltr">Hey,<div><br></div><div>what do u mean standard configuration ?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-08-13 9:58 GMT+02:00 Tamas Papp <span dir="ltr"><<a href="mailto:tompos@martos.bme.hu" target="_blank">tompos@martos.bme.hu</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div><div class="h5">
    <br>
    <div>On 08/13/2014 09:47 AM, bryn1u85 .
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hey everyone,
        <div><br>
        </div>
        <div>I've been trying to configure Ubuntu LXC with 2 ip failover
          from OVH but i failed :(</div>
        <div>I've been reading many howto's and still nothing. I have
          found on this list same cool tutorial which has written by
          Olivier. There is a link: <a href="https://lists.linuxcontainers.org/pipermail/lxc-users/2011-May/001980.html" target="_blank">https://lists.linuxcontainers.org/pipermail/lxc-users/2011-May/001980.html</a></div>

        <div><br>
        </div>
        <div>I don't know why i still can't get access to internet from
          LXC.</div>
        <div><br>
        </div>
        <div>My host ip: <span style="color:rgb(116,116,116);font-family:OpenSans;font-size:14px;line-height:20px;background-color:rgb(245,245,245)">94.23.237.216</span></div>
        <div>My ip fail over ip 1: <span style="color:rgb(116,116,116);font-family:OpenSans;font-size:14px;line-height:20px;background-color:rgb(245,245,245)">91.121.239.228</span></div>
        <div><br>
        </div>
        <div>I'll focus on one failover ip. </div>
        <div>I did as Olivier has subscribed.</div>
        <div><br>
        </div>
        <div>Host:</div>
        <div>root@ns321124:~# cat /etc/network/interface</div>
        <div># The loopback network interface</div>
        <div>auto lo</div>
        <div>iface lo inet loopback</div>
        <div>auto eth0</div>
        <div>        iface eth0 inet static</div>
        <div><br>
        </div>
        <div>auto br0</div>
        <div>        iface br0 inet static</div>
        <div>        bridge_ports eth0</div>
        <div>        bridge_stp off</div>
        <div>        bridge_maxwait 0</div>
        <div>        bridge_fd 0</div>
        <div>        address 94.23.237.216</div>
        <div>        netmask 255.255.255.0</div>
        <div>        network 94.23.237.0</div>
        <div>        broadcast 94.23.237.255</div>
        <div>        gateway 94.23.237.254</div>
        <div>        </div>
        <div>post-up /sbin/ifconfig br0:0 91.121.239.228 netmask
          255.255.255.255 broadcast 91.121.239.228</div>
        <div>post-down /sbin/ifconfig br0:0 down<br>
        </div>
      </div>
    </blockquote>
    <br></div></div>
    Use either post-up and /sbin/ip or 'iface br0:0 inet static.....'.<div class=""><br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div>root@ns321124:~# cat /var/lib/lxc/Oksymoron/config</div>
          <div># Template used to create this container:
            /usr/share/lxc/templates/lxc-ubuntu<br>
          </div>
          <div># Parameters passed to the template:</div>
          <div># For additional config options, please look at
            lxc.container.conf(5)</div>
          <div>
            <br>
          </div>
          <div># Common configuration</div>
          <div>lxc.include = /usr/share/lxc/config/ubuntu.common.conf</div>
          <div><br>
          </div>
          <div># Container specific configuration</div>
          <div>lxc.rootfs = /var/lib/lxc/Oksymoron/rootfs</div>
          <div>lxc.mount = /var/lib/lxc/Oksymoron/fstab</div>
          <div>lxc.utsname = Oksymoron</div>
          <div>lxc.arch = amd64</div>
          <div><br>
          </div>
          <div># Network configuration</div>
          <div>lxc.network.type = veth</div>
          <div>lxc.network.flags = up</div>
          <div>lxc.network.link = br0</div>
          <div><a href="http://lxc.network.name" target="_blank">lxc.network.name</a>
            = eth0</div>
          <div>lxc.network.ipv4 = 91.121.239.228</div>
        </div>
      </div>
    </blockquote>
    <br></div>
    Use this IP either here or on the bridge iface, but not at both
    places.<div class=""><br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">root@ns321124:~# cat
        /var/lib/lxc/Oksymoron/rootfs/etc/network/interfaces<br>
        <div>
          <div># The loopback network interface</div>
          <div>auto lo</div>
          <div>iface lo inet loopback</div>
          <div><br>
          </div>
          <div>auto eth0</div>
          <div>iface eth0 inet static</div>
          <div>        adress 91.121.239.228</div>
          <div>        netmask 255.255.255.255</div>
          <div>        broadcast 91.121.239.228</div>
        </div>
      </div>
    </blockquote>
    <br></div>
    Define your network either in container:/etc/network/interfaces or
    in lxc config file, but not at both places.<div class=""><br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div><br>
          </div>
          <div>        post-up route add 94.23.237.254 dev eth0</div>
          <div>        post-up route add default gw 94.23.237.254</div>
          <div>        post-down route del 94.23.237.254 dev eth0</div>
          <div>        post-down route del default gw 94.23.237.254</div>
        </div>
      </div>
    </blockquote>
    <br></div>
    Why not the standard 'gateway .....' configuration?<div><div class="h5"><br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
        </div>
        <div><br>
        </div>
        <div>For sure i did reboot and lunch lxc.</div>
        <div><br>
        </div>
        <div>Checking ifconfig in LXC called Oksymoron</div>
        <div><br>
        </div>
        <div>
          <div>root@Oksymoron:/home/ubuntu# ifconfig</div>
          <div>eth0      Link encap:Ethernet  HWaddr 00:16:3e:3e:35:9e</div>
          <div>          inet addr:91.121.239.228  Bcast:255.255.255.255
             Mask:0.0.0.0</div>
          <div>          inet6 addr: fe80::216:3eff:fe3e:359e/64
            Scope:Link</div>
          <div>          UP BROADCAST RUNNING MULTICAST  MTU:1500
             Metric:1</div>
          <div>          RX packets:109 errors:0 dropped:0 overruns:0
            frame:0</div>
          <div>          TX packets:8 errors:0 dropped:0 overruns:0
            carrier:0</div>
          <div>          collisions:0 txqueuelen:1000</div>
          <div>          RX bytes:9448 (9.4 KB)  TX bytes:648 (648.0 B)</div>
          <div><br>
          </div>
          <div>lo        Link encap:Local Loopback</div>
          <div>          inet addr:127.0.0.1  Mask:255.0.0.0</div>
          <div>          inet6 addr: ::1/128 Scope:Host</div>
          <div>          UP LOOPBACK RUNNING  MTU:65536  Metric:1</div>
          <div>          RX packets:16 errors:0 dropped:0 overruns:0
            frame:0</div>
          <div>          TX packets:16 errors:0 dropped:0 overruns:0
            carrier:0</div>
          <div>          collisions:0 txqueuelen:0</div>
          <div>          RX bytes:1248 (1.2 KB)  TX bytes:1248 (1.2 KB)</div>
          <div><br>
          </div>
        </div>
        <div>Now try update.</div>
        <div>
          <div>root@Oksymoron:/home/ubuntu# apt-get update</div>
          <div>Err <a href="http://archive.ubuntu.com" target="_blank">http://archive.ubuntu.com</a>
            trusty InRelease</div>
          <div><br>
          </div>
          <div>
            Err <a href="http://archive.ubuntu.com" target="_blank">http://archive.ubuntu.com</a>
            trusty-updates InRelease</div>
          <div><br>
          </div>
          <div>Err <a href="http://security.ubuntu.com" target="_blank">http://security.ubuntu.com</a>
            trusty-security InRelease</div>
          <div><br>
          </div>
          <div>Err <a href="http://security.ubuntu.com" target="_blank">http://security.ubuntu.com</a>
            trusty-security Release.gpg</div>
          <div>  Could not resolve '<a href="http://security.ubuntu.com" target="_blank">security.ubuntu.com</a>'</div>
          <div>Err <a href="http://archive.ubuntu.com" target="_blank">http://archive.ubuntu.com</a>
            trusty Release.gpg</div>
          <div>  Could not resolve '<a href="http://archive.ubuntu.com" target="_blank">archive.ubuntu.com</a>'</div>
          <div>Err <a href="http://archive.ubuntu.com" target="_blank">http://archive.ubuntu.com</a>
            trusty-updates Release.gpg</div>
          <div>  Could not resolve '<a href="http://archive.ubuntu.com" target="_blank">archive.ubuntu.com</a>'</div>
          <div>Reading package lists... Done</div>
          <div>W: Failed to fetch <a href="http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease" target="_blank">http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease</a></div>
          <div><br>
          </div>
          <div>W: Failed to fetch <a href="http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease" target="_blank">http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease</a></div>
          <div><br>
          </div>
          <div>W: Failed to fetch <a href="http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease" target="_blank">http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease</a></div>
          <div><br>
          </div>
          <div>W: Failed to fetch <a href="http://archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg" target="_blank">http://archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg</a>
             Could not resolve '<a href="http://archive.ubuntu.com" target="_blank">archive.ubuntu.com</a>'</div>
          <div><br>
          </div>
          <div>W: Failed to fetch <a href="http://archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg" target="_blank">http://archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg</a>
             Could not resolve '<a href="http://archive.ubuntu.com" target="_blank">archive.ubuntu.com</a>'</div>
          <div><br>
          </div>
          <div>W: Failed to fetch <a href="http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg" target="_blank">http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg</a>
             Could not resolve '<a href="http://security.ubuntu.com" target="_blank">security.ubuntu.com</a>'</div>
        </div>
      </div>
    </blockquote>
    <br></div></div>
    This is a dns resolving issue.<span class="HOEnZb"><font color="#888888"><br>
    <br>
    t<br>
  </font></span></div>

<br>_______________________________________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a><br></blockquote></div><br></div>