problems: running two instance of Qemu with same MAC address
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
From: Mulyadi Santosa <[email protected]>
Date: Wed, 19 May 2004 15:32:44 +0700
Quoted 2 lines
On guest 1 and 2:
NE*000 ethercard probe at0x300: 52 54 00 12 34 56
You can use command line argument macaddr:
-macaddr addr set the mac address of the first interface
Signature · 5 lines
Pavel Janík
...... is one of the good guys, even though his user interface could stand
improvement.
-- Larry McVoy in linux-kernelQuoted 22 lines · Mulyadi Santosa
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 at0x300: 52 54 00 12 34 56Guest 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 tableDestination 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
Quoted 7 lines
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?
Signature · 3 lines
Rutger Nijlunsing ---------------------------- rutger ed tux tmfweb nl never attribute to a conspiracy which can be explained by incompetence ----------------------------------------------------------------------
hello
Quoted 1 line
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
Quoted 2 lines
So, what is the
workaround for this double MAC address problem?
Try setting the mac address at runtime:
qemu -macaddr add
Regards, Jean-Michel
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