qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] problems: running two instance of Qemu with same MAC address
@ 2004-05-19  8:32 Mulyadi Santosa
  2004-05-19  9:31 ` Rutger Nijlunsing
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Mulyadi Santosa @ 2004-05-19  8:32 UTC (permalink / raw)
  To: qemu-devel

hello all

I have problem about identical MAC address...here is the scenario

I run two instances of Qemu for full system emulation. I use Qemu 0.5.5
On both guest system, i can turn on the eth0 (NE 2000 card) . here is the 
dmesg content:

On guest 1 and 2:
NE*000 ethercard probe at 0x300: 52 54 00 12 34 56

Guest 1 IP on eth0 --> 192.168.1.21..attached to tun0 with IP -->192.168.1.11
Guest 2 IP on eth0 --> 192.168.1.22..attached to tun0 with IP --> 192.168.1.12

here is the routing table at the host system:
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.1.21    *               255.255.255.255 UH        0 0          0 tun0
192.168.1.22    *               255.255.255.255 UH        0 0          0 tun1
10.1.1.0        *                    255.255.255.0   U         0 0     0 eth0
127.0.0.0       *               255.0.0.0       U         0 0          0 lo

Both guests can ping the host and the host can ping to these guests. When I 
try to ping from  guest 1 to guest 2, it got no reply (i guess similar with 
dropped packet when u do DROP with iptables)

I realize the fact that both eth0 on the guests when I do tcpdump-ing. Ping 
from guest 1 yield arp broadcast, but never get arp-reply...So, what is the 
workaround for this double MAC address problem?

regards

Mulyadi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] problems: running two instance of Qemu with same MAC address
  2004-05-19  8:32 [Qemu-devel] problems: running two instance of Qemu with same MAC address Mulyadi Santosa
@ 2004-05-19  9:31 ` Rutger Nijlunsing
  2004-05-19  9:39   ` Mulyadi Santosa
  2004-05-19  9:38 ` Pavel Janík
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Rutger Nijlunsing @ 2004-05-19  9:31 UTC (permalink / raw)
  To: a_mulyadi, qemu-devel

On Wed, May 19, 2004 at 03:32:44PM +0700, Mulyadi Santosa wrote:
> hello all
> 
> I have problem about identical MAC address...here is the scenario
> 
> I run two instances of Qemu for full system emulation. I use Qemu 0.5.5
> On both guest system, i can turn on the eth0 (NE 2000 card) . here is the 
> dmesg content:
> 
> On guest 1 and 2:
> NE*000 ethercard probe at 0x300: 52 54 00 12 34 56
> 
> Guest 1 IP on eth0 --> 192.168.1.21..attached to tun0 with IP -->192.168.1.11
> Guest 2 IP on eth0 --> 192.168.1.22..attached to tun0 with IP --> 192.168.1.12
> 
> here is the routing table at the host system:
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
> 192.168.1.21    *               255.255.255.255 UH        0 0          0 tun0
> 192.168.1.22    *               255.255.255.255 UH        0 0          0 tun1
> 10.1.1.0        *                    255.255.255.0   U         0 0     0 eth0
> 127.0.0.0       *               255.0.0.0       U         0 0          0 lo
> 
> Both guests can ping the host and the host can ping to these guests. When I 
> try to ping from  guest 1 to guest 2, it got no reply (i guess similar with 
> dropped packet when u do DROP with iptables)
> 
> I realize the fact that both eth0 on the guests when I do tcpdump-ing. Ping 
> from guest 1 yield arp broadcast, but never get arp-reply...So, what is the 
> workaround for this double MAC address problem?

You've got forwarding or bridging enabled in the host?

-- 
Rutger Nijlunsing ---------------------------- rutger ed tux tmfweb nl
never attribute to a conspiracy which can be explained by incompetence
----------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] problems: running two instance of Qemu with same MAC address
  2004-05-19  8:32 [Qemu-devel] problems: running two instance of Qemu with same MAC address Mulyadi Santosa
  2004-05-19  9:31 ` Rutger Nijlunsing
@ 2004-05-19  9:38 ` Pavel Janík
  2004-05-19  9:45 ` Jean-Michel POURE
  2004-05-19 13:41 ` Mulyadi Santosa
  3 siblings, 0 replies; 6+ messages in thread
From: Pavel Janík @ 2004-05-19  9:38 UTC (permalink / raw)
  To: qemu-devel

   From: Mulyadi Santosa <a_mulyadi@softhome.net>
   Date: Wed, 19 May 2004 15:32:44 +0700

   > On guest 1 and 2:
   > NE*000 ethercard probe at 0x300: 52 54 00 12 34 56

You can use command line argument macaddr:

-macaddr addr   set the mac address of the first interface

-- 
Pavel Janík

...... is one of the good guys, even though his user interface could stand
improvement.
                  -- Larry McVoy in linux-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] problems: running two instance of Qemu with same MAC address
  2004-05-19  9:31 ` Rutger Nijlunsing
@ 2004-05-19  9:39   ` Mulyadi Santosa
  0 siblings, 0 replies; 6+ messages in thread
From: Mulyadi Santosa @ 2004-05-19  9:39 UTC (permalink / raw)
  To: qemu-devel; +Cc: rutger

hello

> You've got forwarding or bridging enabled in the host?

I am not what it is......can you please explain a bit about it and how to use 
it?

regards

Mulyadi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] problems: running two instance of Qemu with same MAC address
  2004-05-19  8:32 [Qemu-devel] problems: running two instance of Qemu with same MAC address Mulyadi Santosa
  2004-05-19  9:31 ` Rutger Nijlunsing
  2004-05-19  9:38 ` Pavel Janík
@ 2004-05-19  9:45 ` Jean-Michel POURE
  2004-05-19 13:41 ` Mulyadi Santosa
  3 siblings, 0 replies; 6+ messages in thread
From: Jean-Michel POURE @ 2004-05-19  9:45 UTC (permalink / raw)
  To: a_mulyadi, qemu-devel

> So, what is the
> workaround for this double MAC address problem?

Try setting the mac address at runtime:
qemu -macaddr add

Regards, Jean-Michel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: [Qemu-devel] problems: running two instance of Qemu with same MAC address
  2004-05-19  8:32 [Qemu-devel] problems: running two instance of Qemu with same MAC address Mulyadi Santosa
                   ` (2 preceding siblings ...)
  2004-05-19  9:45 ` Jean-Michel POURE
@ 2004-05-19 13:41 ` Mulyadi Santosa
  3 siblings, 0 replies; 6+ messages in thread
From: Mulyadi Santosa @ 2004-05-19 13:41 UTC (permalink / raw)
  To: qemu-devel

Hello all

After doing adventure, i got the answer. The key is using Ethernet Bridge 
method . You need to compile the kernel with Ethernet bridge module if u 
don't have it yet.

First install bridge-utils package ( if your distro doesn't include it, find 
it here http://www.math.leidenuniv.nl/~buytenh/bridge).On my RH 9, the bridge 
utils comes with short HOWTO, so you can learn more about it. Then modprobe 
bridge module.

The rest steps are:
1. create bridge interface, eg br0 --> brctl addbr br0
2. include tun0 and tun1 into br0 -- > brctl addif tun0 & brctl addif tun1
3. assign IP address into br0 and turn it on
4. for each guest, set the br0 IP as default gateway
5. On the host, add new routing toward these two guests using br0

read 

have fun and thanx for the all the help. Now I just need to figure out what is 
blocking process migration on my new virtual openMosix cluster :-))

regards

Mulyadi

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-05-19 16:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-19  8:32 [Qemu-devel] problems: running two instance of Qemu with same MAC address Mulyadi Santosa
2004-05-19  9:31 ` Rutger Nijlunsing
2004-05-19  9:39   ` Mulyadi Santosa
2004-05-19  9:38 ` Pavel Janík
2004-05-19  9:45 ` Jean-Michel POURE
2004-05-19 13:41 ` Mulyadi Santosa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).