Quoting Nirmal Guhan (vavat...@gmail.com): > On Tue, Oct 19, 2010 at 3:03 PM, Serge E. Hallyn > <serge.hal...@canonical.com> wrote: > > Quoting Serge E. Hallyn (serge.hal...@canonical.com): > >> Quoting Nirmal Guhan (vavat...@gmail.com): > >> > Hi, > >> > > >> > I have a requirement to create two virtual interfaces (eth0, eth1) in > >> > a linux container and separate traffic between the two based on ip > >> > route. Basically eth0 (or eth1) should be used for external world and > >> > eth1 for communication terminating at host. How do I go about doing > >> > this? > >> > > >> > I created two interfaces in the config and can see both of them in the > >> > container. > >> > > >> > lxc.network.type = veth > >> > lxc.network.link = br0 > >> > lxc.network.ipv4 = 128.107.159.183/22 > >> > lxc.network.name = eth0 > >> > lxc.network.flags = up > >> > lxc.network.mtu = 1500 > >> > lxc.network.type = veth > >> > lxc.network.link = br0 > >> > >> If you want eth1 to be connected internally only, then shouldn't > >> you create a bridge br1, and use that here? Don't connect br1 > >> to the physical nic, and you'll have your host-only bridge. > > Ok. This is what I did. > #brctl addbr br1 > > Modified above config to lxc.network.link=br1 for eth1 and removed > eth0 so there is only one i/f. Since br1 is not attached to nic, how > do I now test host<->guest communication.Obviously I can't reach eth0 > ip from lxc.
Easiest and most telling wrt whether your setup will work, would be to create a second container the same way, and try to ping or nc to each other. -serge ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev _______________________________________________ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users