From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=45469 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrA4P-0005ft-U7 for qemu-devel@nongnu.org; Sun, 20 Feb 2011 09:15:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PrA4I-00055f-AJ for qemu-devel@nongnu.org; Sun, 20 Feb 2011 09:15:26 -0500 Received: from fmmailgate01.web.de ([217.72.192.221]:57341) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PrA4H-00054x-DM for qemu-devel@nongnu.org; Sun, 20 Feb 2011 09:15:22 -0500 Message-ID: <4D6121F1.1080900@web.de> Date: Sun, 20 Feb 2011 15:15:13 +0100 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: Network bridging without adding bridge with brctl, possible? References: <4D60E26D.3060202@web.de> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig5AE76BC4CF939CD45CA44309" Sender: jan.kiszka@web.de List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerhard Wiesinger Cc: qemu-devel@nongnu.org, Arnd Bergmann This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5AE76BC4CF939CD45CA44309 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-02-20 13:49, Gerhard Wiesinger wrote: > On Sun, 20 Feb 2011, Jan Kiszka wrote: >=20 >> On 2011-02-19 20:32, Gerhard Wiesinger wrote: >>> Hello, >> http://virt.kernelnewbies.org/MacVTap >> >> ip link add link eth1 name macvtap0 type macvtap mode bridge >> ip link add link eth1 name macvlan0 type macvlan mode bridge >> ifconfig macvlan0 ... >=20 >=20 > Hello Jan, >=20 > iproute2 2.6.37 is needed! > http://devresources.linuxfoundation.org/dev/iproute2/download/iproute2-= 2.6.37.tar.bz2 >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D >=20 > 1.) Only macvtap interface used > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D >=20 > For me it was just unlogically to use a VLAN type interface. Therefore = I > tried the following which worked nearly: > /root/download/iproute2/iproute2-2.6.37/ip/ip link add link eth0 name > macvtap0 type macvtap mode bridge > /root/download/iproute2/iproute2-2.6.37/ip/ip link set macvtap0 address= > 1a:46:0b:ca:bc:7b up > ip link show macvtap0 > ls -l /dev/tap* > # crw-rw---- 1 root root 249, 8 Feb 20 13:07 /dev/tap8 > qemu-system-x86_64 ... some params ... -net > nic,model=3De1000,macaddr=3D1a:46:0b:ca:bc:7b -net tap,fd=3D3 3<>/dev/t= ap8 >=20 > Booting Knoppix 6.2 with ping is ok, MAC address is also correct on > second host. >=20 > Only problem is that from host to guest no networking is possible (only= > from guest to other host). >=20 > Any ideas? I guess some forwarding is missing? iptables forward missing= ? To my understanding macvlan(+macvtap) devices in bridge mode can only talk to the outer world via the physical device they are attached to or other macvlan nodes attached to that same device. Therefore... > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D >=20 > 2.) Only macvtap interface used > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D >=20 > /root/download/iproute2/iproute2-2.6.37/ip/ip link add link eth0 name > macvtap0 type macvtap mode bridge > /root/download/iproute2/iproute2-2.6.37/ip/ip link set macvtap0 address= > 1a:46:0b:ca:bc:7b up > #/root/download/iproute2/iproute2-2.6.37/ip/ip link add link eth0 name > macvlan0 type macvlan mode bridge > #/root/download/iproute2/iproute2-2.6.37/ip/ip link set macvlan0 addres= s =2E..the need for this additional macvlan device. You just have to set an= IP on macvlan0. Jan > 1a:46:0b:ca:bc:7c up > ip link show macvtap0 > ip link show macvlan0 > ls -l /dev/tap* > # crw-rw---- 1 root root 249, 8 Feb 20 13:07 /dev/tap8 > # No further TAP device created! (Reason why it doesn't work?) > # 7c MAC is used!? > qemu-system-x86_64 ... some params ... -net > nic,model=3De1000,macaddr=3D1a:46:0b:ca:bc:7c -net tap,fd=3D3 3<>/dev/t= ap8 >=20 > Booting Knoppix 6.2 without any networking, eth0 in guest has 7c MAC > address. >=20 > Any ideas? > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D >=20 >=20 > Thnx. >=20 > Ciao, > Gerhard >=20 > --=20 > http://www.wiesinger.com/ >=20 --------------enig5AE76BC4CF939CD45CA44309 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk1hIfcACgkQitSsb3rl5xQwPQCgyVocawB69QfAS3svBBZO1/Py 9xYAn014ib18hde05plrDZZwj1uLUUH8 =FpJg -----END PGP SIGNATURE----- --------------enig5AE76BC4CF939CD45CA44309--