qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Making qemu use 10.0.3.x not 10.0.2.x
@ 2008-02-05  0:24 Asheesh Laroia
  2008-02-05  0:44 ` Jonathan Kalbfeld
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Asheesh Laroia @ 2008-02-05  0:24 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1232 bytes --]

I'm running qemu (really, KVM) in a LAN that uses 10.0.2.x as the IP 
address block for workstations.  So naturally when I booted a guest, it 
couldn't access machines inside the LAN.

I tried the simplest thing that could possibly work:

 	paulproteus@sf:~/dnlds/qemu/qemu $ replace 10.0.2 10.0.3 -- `find -type f  | grep -v -i CVS `

Booting that resulted in a virtual machine that, as I had hoped, used 
10.0.3.15 and could therefore successfully talk to my 10.0.2.x IPs on the 
LAN.  I've attached a 'cvs diff' against HEAD that results from the above 
command.

Out of curiosity, are there plans to make the user-space networking stack 
IP range configurable at run-time rather than compile time?  I'm not 
suggesting that this patch I attached become part of CVS HEAD necessarily; 
what I do hope is that this will inspire someone else on the list to make 
the handling of this more flexible, knowing now that it's fairly easy to 
do. (-:

Even if not, this serves as a report to others that this trivial patch 
actually does what you'd hope/expect!

-- Asheesh.

-- 
It took me fifteen years to discover that I had no talent for writing,
but I couldn't give it up because by that time I was too famous.
 		-- Robert Benchley

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: TEXT/x-diff; name=ten-dot-three.patch, Size: 1881 bytes --]

Index: qemu-doc.texi
===================================================================
RCS file: /sources/qemu/qemu/qemu-doc.texi,v
retrieving revision 1.186
diff -r1.186 qemu-doc.texi
657c657
< usual 10.0.2.2.
---
> usual 10.0.3.2.
676c676
< 10.0.2.4 smbserver
---
> 10.0.3.4 smbserver
692c692
< is not specified, its value is 10.0.2.15 (default address given by the
---
> is not specified, its value is 10.0.3.15 (default address given by the
1497c1497
<                            |          (10.0.2.2)
---
>                            |          (10.0.3.2)
1499c1499
<                            ---->  DNS server (10.0.2.3)
---
>                            ---->  DNS server (10.0.3.3)
1501c1501
<                            ---->  SMB server (10.0.2.4)
---
>                            ---->  SMB server (10.0.3.4)
1507c1507
< to the hosts starting from 10.0.2.15.
---
> to the hosts starting from 10.0.3.15.
1510,1511c1510,1511
< the address 10.0.2.2 and verify that you got an address in the range
< 10.0.2.x from the QEMU virtual DHCP server.
---
> the address 10.0.3.2 and verify that you got an address in the range
> 10.0.3.x from the QEMU virtual DHCP server.
1515c1515
< router (10.0.2.2).
---
> router (10.0.3.2).
Index: vl.c
===================================================================
RCS file: /sources/qemu/qemu/vl.c,v
retrieving revision 1.403
diff -r1.403 vl.c
3773c3773
<         pstrcpy(buf, sizeof(buf), "10.0.2.15");
---
>         pstrcpy(buf, sizeof(buf), "10.0.3.15");
Index: slirp/ctl.h
===================================================================
RCS file: /sources/qemu/qemu/slirp/ctl.h,v
retrieving revision 1.1
diff -r1.1 ctl.h
6,7c6,7
< #define CTL_SPECIAL	"10.0.2.0"
< #define CTL_LOCAL	"10.0.2.15"
---
> #define CTL_SPECIAL	"10.0.3.0"
> #define CTL_LOCAL	"10.0.3.15"

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

end of thread, other threads:[~2008-02-06 16:38 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-05  0:24 [Qemu-devel] Making qemu use 10.0.3.x not 10.0.2.x Asheesh Laroia
2008-02-05  0:44 ` Jonathan Kalbfeld
2008-02-05  0:51 ` Samuel Thibault
2008-02-05 10:32   ` Andreas Schwab
2008-02-05 10:44     ` Samuel Thibault
2008-02-05 11:30     ` Ian Jackson
2008-02-05 12:58       ` Andreas Färber
2008-02-05 15:48         ` Warner Losh
2008-02-05 16:16           ` Eddie Kohler
2008-02-05 17:42           ` Ben Taylor
2008-02-05 19:06             ` Asheesh Laroia
2008-02-05 21:22               ` Ben Taylor
2008-02-05 21:29                 ` Paul Brook
2008-02-05 21:34                   ` Asheesh Laroia
2008-02-05 22:12                     ` Jernej Simončič
2008-02-05 22:24                       ` Asheesh Laroia
2008-02-06  1:40                   ` Jamie Lokier
2008-02-06  3:34                     ` Paul Brook
2008-02-06 10:40             ` Ian Jackson
2008-02-06 11:01               ` andrzej zaborowski
2008-02-06 16:36                 ` Ian Jackson
2008-02-06 12:39               ` Gerd Hoffmann
2008-02-05 20:09       ` andrzej zaborowski
2008-02-05 20:31         ` Blue Swirl
2008-02-05 21:46       ` Flavio Visentin
2008-02-05  0:56 ` Johannes Schindelin

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).