[Lxc-users] Dual NIC support

Daniel Lezcano dlezcano at fr.ibm.com
Wed Jul 21 09:15:37 UTC 2010


On 07/21/2010 10:05 AM, Matt Rechenburg wrote:
> Hi,
>
> On 07/21/2010 09:57 AM, Daniel Lezcano wrote:
>> On 07/21/2010 03:03 AM, Nirmal Guhan wrote:
>>
>>> Assuming I have a two NIC system, is it possible to assign a NIC
>>> exclusively per container  ? Traffic to NIC 1 get routed to container
>>> 1 and NIC 2 to container 2 ? Please let me know.
>>>
>>>
>> Yes, it is possible but with a 2.6.35 kernel.
>>
>> The configuration is:
>>
>>        lxc.network.type=phys
>>        lxc.network.link=eth1
>>        lxc.network.name=eth1
>>
>
> Cool!
>
> Maybe a stupid question but is it also possible to have 2 (or more) nics
> within a container connected to different bridges ?
>   From the naming convention of the lxc.* parameters I for now thought
> each container supports just one nic.

Yes, you can repeat the configuration lines:

lxc.network.type=veth
lxc.network.link=br0
lxc.network.flags=up
lxc.network.ipv4=1.2.3.4/24

lxc.network.type=veth
lxc.network.link=br1
lxc.network.flags=up
lxc.network.ipv4=4.3.2.1/24

etc ...

You can create more network interfaces than you have on your host and 
you can mix the configurations like in the lxc-complex.conf 
configuration example.

If the lxc.network.name is not specified, the interfaces will be created 
in the reverse order they were specified, it's a bug and will be fixed 
very soon.

Thanks
   -- Daniel


> Many thanks + have a great day,
>
> Matt
> ... likes lxc
>
>> the latter line will be optional in a few commits.
>>
>>      -- Daniel
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Sprint
>> What will you do first with EVO, the first 4G phone?
>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>> _______________________________________________
>> Lxc-users mailing list
>> Lxc-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/lxc-users
>>
>
>


-- 






















































Sauf indication contraire ci-dessus:
Compagnie IBM France
Siège Social : Tour Descartes, 2, avenue Gambetta, La Défense 5, 92400
Courbevoie
RCS Nanterre 552 118 465
Forme Sociale : S.A.S.
Capital Social : 542.737.118 ?
SIREN/SIRET : 552 118 465 02430




More information about the lxc-users mailing list