qemu-discuss
[Top][All Lists]
Advanced

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

Re: [Qemu-discuss] About how to connect from guest "10.0.2.15" to remote


From: qzhan15
Subject: Re: [Qemu-discuss] About how to connect from guest "10.0.2.15" to remote "192.168.1.xx"
Date: Wed, 15 Feb 2012 20:10:51 +0800

One missing part i forgot to mention is my host is a ubuntu server running as a 
guest on virtual box on a MAC OS (use bridge) 
so when I build a ubuntu server on a real machine, then start QEMU , it just 
works.


在 2012-2-15,下午1:00, Qi Zhang 写道:

> I have a web server on my host
> and I try  wget http://10.0.2.2, it works
> but if I try on the LAN interface wget http://192.168.1.10, it does
> not, I have already added the default router as 10.0.2.2
> 
> Could you help to figure out what's missing part on my kernel
> configure or QEMU command line?
> 
> Thanks
> 
> On Wed, Feb 15, 2012 at 8:56 AM, Mike Lovell <address@hidden> wrote:
>> it does match. i just now ran a test and i was able to ping 10.0.2.2 but not
>> able to ping anything else. despite not being able to ping outside the
>> 10.0.2.0/24 network, i was able to do the wget i listed before and
>> connectivity to the rest of the world works. don't expect ping to be a good
>> test when using user networking and talking to things outside of 10.0.2.2.
>> 
>> mike
>> 
>> 
>> On 02/14/2012 05:30 PM, Qi Zhang wrote:
>>> 
>>> Mike:
>>>        My guest can ping to host with the address 10.0.2.2 but just
>>> can't ping to host's LAN interface 192.168.1.10, does that match with
>>> your point?
>>> Thanks
>>> Zhang Qi
>>> 
>>> On Wed, Feb 15, 2012 at 1:33 AM, Mike Lovell<address@hidden>  wrote:
>>>> 
>>>> On 02/14/2012 02:21 AM, Qi Zhang wrote:
>>>>> 
>>>>> Hi There:
>>>>> 
>>>>>         I'm trying to use QEMU to emulate a simple Linux Guest for
>>>>> some specific task
>>>>>         I have download/compile the Linux 3.2.5 kernel and busybox
>>>>> 1.19.4 and successfully make the guest system running after some
>>>>> simple setup.
>>>>>         Also the guest system can mount host NFS after I set the eth0
>>>>> IP to 10.0.2.15.  (mount -t nfs 10.0.2.2:/xxx/xxx /tmp)
>>>>> 
>>>>>         Now the host system is also connect to a LAN (192.168.1.10),
>>>>> and there is application running on the guest system, who want to talk
>>>>> to another server on the LAN (192.168.1.8)
>>>>>         but guest (10.0.2.15) can't ping to the remote server
>>>>> (192.168.1.8),
>>>>>         I have manually add the default gateway as 10.0.2.2, that
>>>>> still not work.
>>>>>         Destination     Gateway         Genmask         Flags Metric
>>>>> Ref    Use Iface
>>>>>         0.0.0.0         10.0.2.2        0.0.0.0         UG    0      0
>>>>>        0 eth0
>>>>>         10.0.0.0        0.0.0.0         255.0.0.0       U     0      0
>>>>>        0 eth0
>>>>> 
>>>>>         Can anybody help me to figure it out?
>>>>>         Wish the solution is not about use the tap/bridge solution,
>>>>>         I was lack of related network knowledge and the only thing I
>>>>> know is use QEMU "user net" is something similar as "NAT" option in
>>>>> virtual box,
>>>>>         though when use NAT the host can't ping to guest, but the
>>>>> guest can ping to everywhere and there is no bridge I think
>>>>> 
>>>>>         BTW:
>>>>>         my host system is Ubuntu 11.10 and the command to start the QEMU
>>>>> is
>>>>>         "qemu-system-x86_64 -kernel arch/x86/boot/bzImage -boot d
>>>>> -append 'console=ttyS0, 115200' -nographic -net nic -net user"
>>>> 
>>>> 
>>>> if i remember correctly, the user networking doesn't support ping or
>>>> various
>>>> other ICMP messages. it uses a limited IP stack directly in the qemu
>>>> process
>>>> and doesn't support everything that the kernel's IP stack supports. after
>>>> you set the ip address and default gateway in the guest, try connecting
>>>> to
>>>> the service you want to talk to or try putting a web page through wget. i
>>>> frequently just use `wget http://google.com/` to test network
>>>> connectivity
>>>> when using user networking.
>>>> 
>>>> mike
>>>> 
>> 




reply via email to

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