From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KB6e5-0001lu-2J for qemu-devel@nongnu.org; Tue, 24 Jun 2008 07:25:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KB6e3-0001ht-0i for qemu-devel@nongnu.org; Tue, 24 Jun 2008 07:25:08 -0400 Received: from [199.232.76.173] (port=53520 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KB6e2-0001hX-M4 for qemu-devel@nongnu.org; Tue, 24 Jun 2008 07:25:06 -0400 Received: from ecfrec.frec.bull.fr ([129.183.4.8]:39401) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KB6e1-0001DJ-1h for qemu-devel@nongnu.org; Tue, 24 Jun 2008 07:25:06 -0400 Received: from localhost (localhost [127.0.0.1]) by ecfrec.frec.bull.fr (Postfix) with ESMTP id 5F16E19D93A for ; Tue, 24 Jun 2008 13:25:04 +0200 (CEST) Received: from ecfrec.frec.bull.fr ([127.0.0.1]) by localhost (ecfrec.frec.bull.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12872-08 for ; Tue, 24 Jun 2008 13:25:00 +0200 (CEST) Received: from cyclope.frec.bull.fr (cyclope.frec.bull.fr [129.183.4.9]) by ecfrec.frec.bull.fr (Postfix) with ESMTP id 5DC8519D927 for ; Tue, 24 Jun 2008 13:25:00 +0200 (CEST) Received: from [129.183.101.63] (frecb007144.frec.bull.fr [129.183.101.63]) by cyclope.frec.bull.fr (Postfix) with ESMTP id C4A1B27291 for ; Tue, 24 Jun 2008 13:24:56 +0200 (CEST) Subject: Re: [Qemu-devel] Assigning Real Network IP Address to Guest OS From: Laurent Vivier In-Reply-To: <87ej6nccil.fsf@alamut.mobiliz.com.tr> References: <87ej6nccil.fsf@alamut.mobiliz.com.tr> Content-Type: text/plain; charset=utf-8 Date: Tue, 24 Jun 2008 13:24:27 +0200 Message-Id: <1214306667.3846.14.camel@frecb07144> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Le mardi 24 juin 2008 =C3=A0 14:12 +0300, Volkan YAZICI a =C3=A9crit : > Hi, >=20 > Finally I managed to install Windows Server 2003 on a Debian > GNU/Linux. Just with below configurations, network works without a touc= h > in the guest OS. >=20 > host> cat /etc/network/interfaces > # The loopback network interface > auto lo > iface lo inet loopback > =20 > # The bridge network interface(s) > auto br0 > iface br0 inet static > address 192.168.1.10 > network 192.168.1.0 > netmask 255.255.255.0 > broadcast 192.168.1.255 > gateway 192.168.1.1 > bridge_ports eth0 > bridge_fd 9 > bridge_hello 2 > bridge_maxage 12 > bridge_stp off >=20 > host> > br0 Link encap:Ethernet HWaddr 00:1A:64:C1:94:3C > inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.2= 55.0 > inet6 addr: fe80::21a:64ff:fec1:943c/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:1376286 errors:0 dropped:0 overruns:0 frame:0 > TX packets:689106 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:83136118 (79.2 MiB) TX bytes:864192345 (824.1 MiB= ) > =20 > eth0 Link encap:Ethernet HWaddr 00:1A:64:C1:94:3C > inet6 addr: fe80::21a:64ff:fec1:943c/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:1686146 errors:0 dropped:0 overruns:0 frame:0 > TX packets:1074092 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:169127408 (161.2 MiB) TX bytes:890492221 (849.2 M= iB) > Interrupt:106 Memory:ce000000-ce011100 > =20 > eth1 Link encap:Ethernet HWaddr 00:1A:64:C1:94:3E > BROADCAST MULTICAST MTU:1500 Metric:1 > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) > Interrupt:169 Memory:ca000000-ca011100 >=20 > guest> ipconfig > ... > Connection-specific DNS Suffix . : > IP Address ..................... : 10.0.2.15 > Subnet Mask .................... : 255.255.255.0 > Default Gateway ................ : 10.0.2.2 > ... >=20 > I can make any sort of network operation on the guest OS. But what I > really want to do is to assign a static IP to the guest OS in the > 192.168.1.0/24 network, to be able to access to guest OS through > machines in the same network. For this purpose, what kind of > configuration should I follow? I such an adjustment possible via > brdiging configuration? If not, I have a second NIC in the host OS > (eth1), can I use that interface for that? >=20 I use this kind of configuration on a debian etch (host) with winxp (guest). on your host, you must have an /etc/qemu-ifup like this: #!/bin/sh sudo /sbin/ifconfig $1 0.0.0.0 promisc up sudo /usr/sbin/brctl addif br0 $1 And in your guest configure it using a valid IP address for your host network (I use DHCP), something like 192.168.1.11. You must also configure guest route to use real gateway. then remember to start qemu with "-net nic -net tap". > I couldn't find any solutions on the qemu wiki and google. Any kind of > help will be appreciated. (Documentation pointers are welcome as well.) Regards, Laurent --=20 ------------- Laurent.Vivier@bull.net --------------- "The best way to predict the future is to invent it." - Alan Kay