qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Qemu networking with olive(Freebsd)


From: Nikolay Abromov
Subject: Re: [Qemu-discuss] Qemu networking with olive(Freebsd)
Date: Tue, 3 Apr 2012 09:06:06 +0100

Hi Mike, 

Thanks for commenting. I found the problem and were right about the vlans. The problem was that the -net,nic vlan_id must match the -net tap vlan_id (example below). 

Thank you once again for replying! 



qemu -m 512 -no-acpi -hda r1/Olive11.1R1.14.img  -nographic -daemonize -serial telnet::2001,server,nowait -localtime -net nic,vlan=11,macaddr=00:01:00:60:01:01,model=e1000 -net tap,vlan=11,ifname=tap0 -net nic,vlan=12,macaddr=00:01:10:60:01:02,model=e1000 -net tap,vlan=12,ifname=tap1 -net nic,vlan=13,macaddr=00:01:00:60:11:03,model=e1000 -net tap,vlan=13,ifname=tap2 -net nic,vlan=14,macaddr=00:01:00:70:01:04,model=e1000 -net tap,vlan=14,ifname=tap3

qemu -m 512 -no-acpi -hda r2/Olive11.1R2.14.img  -nographic -daemonize -serial telnet::2002,server,nowait -localtime -net nic,vlan=21,macaddr=00:01:03:61:01:01,model=e1000 -net tap,vlan=21,ifname=tap4 -net nic,vlan=22,macaddr=00:01:20:60:01:02,model=e1000 -net tap,vlan=22,ifname=tap5 -net nic,vlan=23,macaddr=00:01:00:60:21:03,model=e1000 -net tap,vlan=23,ifname=tap6 -net nic,vlan=24,macaddr=00:01:00:71:01:04,model=e1000 -net tap,vlan=24,ifname=tap7





On Mon, Apr 2, 2012 at 7:49 PM, Mike Lovell <address@hidden> wrote:
On 03/30/2012 02:39 AM, Nikolay Abromov wrote:
I am trying to configure few junos routers using Qemu (sorry if that's not the right place to ask) interconnecting them with tap/bridge interfaces on FreeBSD - unfortunately there is arp flood between the routers and I was wondering if any one had the similar issues and know how to solve it.

QEMU config:

qemu -m 512 -no-acpi -hda r1/Olive11.1R1.14.img -nographic -daemonize -serial telnet::2001,server,nowait -localtime -net nic,vlan=1,macaddr=00:01:00:60:01:01,model=i82557b -net tap,vlan=1,ifname=tap0, -net nic,vlan=1,macaddr=00:01:10:60:01:02,model=i82557b -net tap,vlan=1,ifname=tap1, -net nic,vlan=1,macaddr=00:01:00:60:11:03,model=i82557b -net tap,vlan=1,ifname=tap2, -net nic,vlan=1,macaddr=00:01:00:70:01:04,model=i82557b -net tap,vlan=1,ifname=tap3,

[snip]

i've never used junos or olive so i can't speak to the workings or configuration of those. but looking at your qemu command lines i noticed something odd. you have put all of the network interfaces on each guest in the same qemu 'vlan.'

short info session on qemu network config. inside the qemu process are several 'vlans.' these are *not* 8021q vlans but just an internal grouping of guest network interfaces (the nic the guest sees) and the qemu network backends (i.e. user, tap, socket, etc). there can be multiple guest network interfaces and multiple network backends in the same 'vlan' and each vlan acts basically as an ethernet hub where all packets from one device get delivered to all the others.

in your configuration, you have put all of the guest network interfaces, the '-net nic' options, and all of the network backends, the '-net tap' options, into the same qemu vlan, vlan 1. so basically all of your traffic is being bridged out to all interfaces.

i'm not sure if this is intentional given that i don't know about junos or olive. but i suspect that its not how you want things. you could try separating out the various guest network interfaces and qemu network backends and see if that helps. to do this, change the vlan=X options so that you have assigned the devices to different qemu vlans. for example, you could change your first guest to:

-net nic,vlan=1,macaddr=00:01:00:60:01:01,model=i82557b -net tap,vlan=1,ifname=tap0, -net nic,vlan=2,macaddr=00:01:10:60:01:02,model=i82557b -net tap,vlan=2,ifname=tap1, -net nic,vlan=3,macaddr=00:01:00:60:11:03,model=i82557b -net tap,vlan=3,ifname=tap2, -net nic,vlan=4,macaddr=00:01:00:70:01:04,model=i82557b -net tap,vlan=4,ifname=tap3,

you do not have to have unique vlan number across all qemu processes, just unique within the individual qemu processes. also, if you have access to the qemu monitor (ctrl-alt-2), you can see how the networking items are grouped by doing 'info network' in the monitor. if you do it with your existing configuration, you should see everything in vlan 1. after changing the configuration, you should see them be grouped into multiple vlans.

i hope that provides some useful information and possible fixes your problem. good luck.

mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]