From: 郭沐錫 <maxgreg13625@gmail.com>
To: Mulyadi Santosa <mulyadi.santosa@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Is there any approach to setup guest only network
Date: Tue, 16 Nov 2010 22:40:39 +0800 [thread overview]
Message-ID: <AANLkTimpCxrB6f-V2so7YnNAfwOdR1QiruETsdpUPOQf@mail.gmail.com> (raw)
In-Reply-To: <AANLkTikfy7fvONO02GFQAqwtY7GRQO9PkhqfGxB95Yvj@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2140 bytes --]
Dear all
I have set two directory for QEMU.
One of my qemu-ifup is as follow(the other ip address is different)
*#!/bin/sh*
*sudo modprobe tun*
*sudo /sbin/ifconfig $1 up 192.168.2.52 netmask 255.255.255.0 broadcast
192.168.2.255*
* *
*# IP masquerade*
*sudo echo "1" > /proc/sys/net/ipv4/ip_forward*
*sudo /sbin/iptables -N nat*
*sudo /sbin/iptables -t nat -F*
*sudo /sbin/iptables -t nat -A POSTROUTING -s 192.168.2.62 -j MASQUERADE*
*sudo /sbin/iptables -t nat -A POSTROUTING -d 192.168.2.62 -o $1*
As the QEMU start, I would key in two instructions
*ifconfig eth0 192.168.2.62*
*route add default gw 192.168.2.52*
In the case of mac address, I have found that two QEMU use the same mac
address.
However, when I try to assign another mac address to second QEMU.
*sudo /home/sn/qemu/qemu-0.12.5/install_gcc/bin/qemu-system-arm -M
versatilepb -monitor stdio -kernel vmlinuz-2.6.26-2-versatile -initrd
initrd.img-2.6.26-2-versatile -hda test.img -append "root=/dev/sda1" -net
nic,macaddr=52:54:00:12:34:57 -net tap,script=./qemu-ifup*
The eth0 will disappear like this
http://myweb.ncku.edu.tw/~p76991028/eth0.png
I can't realize why this would happen.
Please tell me where I was wrong.
2010/11/16 Mulyadi Santosa <mulyadi.santosa@gmail.com>
> On Tue, Nov 16, 2010 at 17:11, 郭沐錫 <maxgreg13625@gmail.com> wrote:
> > Dear all
> > I have run QEMU with debian
> > I can use TUN/TAP to connect the internet or host when single QEMU
> > However when I run two QEMU with two qemu-ifup and different address (on
> the
> > same host) at the same time, the second QEMU cannot connect to host...
> > Is there are any approach to setup guest only network.
> > Because I want to run ssh among the QEMUs on the same host.
>
> Try to paste your complete command together with the parameters you
> used in this list. Hopefully then we could analyze it.
>
> PS: have you assigned different mac address on both guests?
>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
>
[-- Attachment #2: Type: text/html, Size: 3381 bytes --]
next prev parent reply other threads:[~2010-11-16 14:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-16 10:11 [Qemu-devel] Is there any approach to setup guest only network 郭沐錫
2010-11-16 11:11 ` Mulyadi Santosa
2010-11-16 14:40 ` 郭沐錫 [this message]
2010-11-16 16:11 ` Mulyadi Santosa
2010-11-16 18:40 ` 郭沐錫
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTimpCxrB6f-V2so7YnNAfwOdR1QiruETsdpUPOQf@mail.gmail.com \
--to=maxgreg13625@gmail.com \
--cc=mulyadi.santosa@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).