From: Daniel Lezcano <daniel.lezcano-GANU6spQydw@public.gmane.org>
To: Whit Blauvelt <whit-M6G8SDWvnhfby3iVrkZq2A@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: How do containers tie to multiple IP's on a NIC?
Date: Sun, 04 Jul 2010 21:49:31 +0200 [thread overview]
Message-ID: <4C30E5CB.1080902@free.fr> (raw)
In-Reply-To: <20100704191841.GA31425-M6G8SDWvnhfby3iVrkZq2A@public.gmane.org>
On 07/04/2010 09:18 PM, Whit Blauvelt wrote:
> On Sun, Jul 04, 2010 at 06:51:34PM +0200, Daniel Lezcano wrote:
>
>
>> What container userspace command are you using ? libvirt ? liblxc ?
>> unshare --net ?
>>
> Which one do you recommend, considering what I'm trying to do with multiple
> IPs on a NIC? I haven't committed to one yet. Which utility do you expect
> future development will favor most? I'll be happy to use any tool which gets
> the job done, preferably one that has a future.
>
Well ... please don't consider what I will suggest as "preaching for
its parish" ;)
(not sure it is a correct expression. It is a direct translation from
French)
I would recommend to use the lxc tools, preferably the 0.7.1 version.
These tools allow to do what you are expecting that is assign several Ip
addresses to the same virtual nic.
They are available at:
http://lxc.sourceforge.net/download/lxc/lxc-0.7.1.tar.gz
an older version is certainly available on your distro.
As a quick start:
write a configuration file (eg. lxc.conf)
lxc.network.type=macvlan
lxc.network.link=eth0
lxc.network.flags=up
lxc.network.ipv4=1.2.3.4/24
lxc.network.ipv4=192.168.1.123/24
lxc.network.ipv4=10.0.0.23
lxc.network.ipv4=172.2.1.3
And then lxc-execute -n foo -f lxc.conf /bin/bash
In your shell you should have a new network with one interface and
several IP addresses.
You can create much more complex configuration but I let you check if
these tools fit your needs.
Thanks
-- Daniel
next prev parent reply other threads:[~2010-07-04 19:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-04 3:40 How do containers tie to multiple IP's on a NIC? Whit Blauvelt
[not found] ` <20100704034023.GA29753-M6G8SDWvnhfby3iVrkZq2A@public.gmane.org>
2010-07-04 16:51 ` Daniel Lezcano
[not found] ` <4C30BC16.9090802-GANU6spQydw@public.gmane.org>
2010-07-04 19:18 ` Whit Blauvelt
[not found] ` <20100704191841.GA31425-M6G8SDWvnhfby3iVrkZq2A@public.gmane.org>
2010-07-04 19:49 ` Daniel Lezcano [this message]
[not found] ` <4C30E5CB.1080902-GANU6spQydw@public.gmane.org>
2010-07-04 23:08 ` Whit Blauvelt
[not found] ` <20100704230827.GA1066-M6G8SDWvnhfby3iVrkZq2A@public.gmane.org>
2010-07-05 9:50 ` Pavel Labushev
[not found] ` <4C31AAEE.5010201-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-07-05 14:07 ` Whit Blauvelt
[not found] ` <20100705140750.GA3113-M6G8SDWvnhfby3iVrkZq2A@public.gmane.org>
2010-07-05 21:13 ` Daniel Lezcano
[not found] ` <4C324AFE.8000801-GANU6spQydw@public.gmane.org>
2010-07-05 22:04 ` Whit Blauvelt
2010-07-06 15:00 ` Pavel Labushev
[not found] ` <4C334523.2080503-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-07-06 15:04 ` Pavel Labushev
2010-07-07 12:55 ` Eric W. Biederman
[not found] ` <m1sk3vjvt1.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2010-07-07 13:22 ` Whit Blauvelt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C30E5CB.1080902@free.fr \
--to=daniel.lezcano-ganu6spqydw@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=whit-M6G8SDWvnhfby3iVrkZq2A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.