Re: Qemu Network with two virtual boxes

2007-05-11 Thread P.U.Kruppa

On Thu, 10 May 2007, Toni Schmidbauer wrote:


At Sat, 5 May 2007 08:21:47 +0200 (CEST),
P.U.Kruppa wrote:

___ _|_
Real LAN |---|  192.168.10.1 |
---|   FreeBSD 6.2 |
   || ||
   |  __|_____|__  |
   | | 192.168.10.5|  | 192.168.10.6 | |
   | |   Win2k on  |  |  FreeBSD on  | |
   | | Qemu|  | Qemu | |
   |  ---  |
---

My real LAN uses 192.168.10.1 as gateway to the Internet.

For now I can only connect one of the two virtual boxes to my real
network, but not both. This is how I do it:

# kldload aio kqemu if_tap bridge
# sysctl net.link.ether.bridge_cfg=rl0,tap0
# sysctl net.link.ether.bridge.enable=1
# qemu-system-x86_64 -hda Win2k.img -m 512 -localtime \
  -net tap -net nic

When now I try to connect the second virtual box, it will steal the
first box's network connection.


i think you need two seperate tap interfaces:

qemu -hda Win2k.img ... -net tap,ifname=tap0

and

qemu -hda freebsd.img ... -net tap,ifname=tap1

but i'm not sure about the bridge configuration. my guess is you need
two seperate clusters (see bridge(4))

sysctl net.link.ether.bridge_cfg=rl0:1,tap0:1,rl0:2,tap1:2

No success yet :(
Only one of the two machines will be connected correctly.

Thanks anyway,

Uli.



toni
--
If you understand what you're doing, you're | toni at stderror dot at
not learning anything.  | Toni Schmidbauer
-- Anonymous|





Peter Ulrich Kruppa
Wuppertal
Germany

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Qemu Network with two virtual boxes

2007-05-10 Thread Toni Schmidbauer
At Sat, 5 May 2007 08:21:47 +0200 (CEST),
P.U.Kruppa wrote:
 ___ _|_
 Real LAN |---|  192.168.10.1 |
 ---|   FreeBSD 6.2 |
|| ||
  |  __|_____|__  |
| | 192.168.10.5|  | 192.168.10.6 | |
| |   Win2k on  |  |  FreeBSD on  | |
| | Qemu|  | Qemu | |
|  ---  |
 ---
 
 My real LAN uses 192.168.10.1 as gateway to the Internet.
 
 For now I can only connect one of the two virtual boxes to my real
 network, but not both. This is how I do it:
 
 # kldload aio kqemu if_tap bridge
 # sysctl net.link.ether.bridge_cfg=rl0,tap0
 # sysctl net.link.ether.bridge.enable=1
 # qemu-system-x86_64 -hda Win2k.img -m 512 -localtime \
   -net tap -net nic
 
 When now I try to connect the second virtual box, it will steal the
 first box's network connection.

i think you need two seperate tap interfaces:

qemu -hda Win2k.img ... -net tap,ifname=tap0

and

qemu -hda freebsd.img ... -net tap,ifname=tap1

but i'm not sure about the bridge configuration. my guess is you need
two seperate clusters (see bridge(4))

sysctl net.link.ether.bridge_cfg=rl0:1,tap0:1,rl0:2,tap1:2

toni
-- 
If you understand what you're doing, you're | toni at stderror dot at
not learning anything.  | Toni Schmidbauer
-- Anonymous|
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Qemu Network with two virtual boxes

2007-05-07 Thread Lowell Gilbert
P.U.Kruppa [EMAIL PROTECTED] writes:

 Hi!

 I am trying to connect two virtual Qemu boxes to my real
 network. This is what I would like to set up:


   | DSL Bridge to Internet|
  ---
  |
 ___ _|_
 Real LAN |---|  192.168.10.1 |
 ---|   FreeBSD 6.2 |
|| ||
  |  __|_____|__  |
| | 192.168.10.5|  | 192.168.10.6 | |
| |   Win2k on  |  |  FreeBSD on  | |
| | Qemu|  | Qemu | |
|  ---  |
 ---

 My real LAN uses 192.168.10.1 as gateway to the Internet.

 For now I can only connect one of the two virtual boxes to my real
 network, but not both. This is how I do it:

 # kldload aio kqemu if_tap bridge
 # sysctl net.link.ether.bridge_cfg=rl0,tap0
 # sysctl net.link.ether.bridge.enable=1
 # qemu-system-x86_64 -hda Win2k.img -m 512 -localtime \
   -net tap -net nic

 When now I try to connect the second virtual box, it will steal the
 first box's network connection.

 Ah, yes: This is my /etc/qemu-ifup
   #!/bin/sh
   ifconfig ${1} 0.0.0.0

 Thanks for your help,

Connect the interfaces to a bridge interface, and connect that to the
external interface you want.  Sorry I can't give a full formula, but 
my lab configuration is down for, um, corporate restructuring.

-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
http://be-well.ilk.org/~lowell/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]