Visit Our UNIX and Linux User Community


Unable to connect guest VM to internet (QEMU via both 'User-mode networking' and 'TUN/TAP')


 
Thread Tools Search this Thread
Operating Systems Linux Unable to connect guest VM to internet (QEMU via both 'User-mode networking' and 'TUN/TAP')
# 1  
Old 09-21-2016
Network Unable to connect guest VM to internet (QEMU via both 'User-mode networking' and 'TUN/TAP')

Hello, I installed FreeBSD 10.3 on AQEMU. I can't connect to internet in none
of the modes of "Default, User-Mode Networking" and "TUN/TAP Networking".

I am able to ping my host in the TAP networking mode (192.168.1.33 which is my
IP addr in guest), but getting 'no route to host' for any outside address and
the fetch utility (similar to wget) does not work. I have done instructions in
below web link for TAP networking:
Quote:
blog.elastocloud.org/2015/07/qemukvm-bridged-network-with-tap.html
I am also able to ping 10.0.2.15 and 192.168.1.255 in the default User mode
networking.

For me, no matter which method I use. But I will happy if it done via default
mode (User mode network stack).

Thanks for the guidance.

##########
* System:
Debian 8.4 on x86-64 machine

* qemu-system-x86_64 -version:
QEMU emulator version 2.1.2

* AQEMU Version:
0.8.2 of 2011.07.27

##########
**On Linux**

This is for when I dont using TAP:
Code:
$ /sbin/ifconfig 

eth0      Link encap:Ethernet  HWaddr (removed by me)
          UP 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:1
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Memory:febc0000-fec00000 

eth1      Link encap:Ethernet  HWaddr (removed by me)  
          inet addr:192.168.1.33  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: (removed by me) Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11233 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11381 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:10980966 (10.4 MiB)  TX bytes:1684350 (1.6 MiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  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:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

==========
Code:
$ ip route
default via 192.168.1.1 dev eth1  proto static  metric 1024 
192.168.1.0/24 dev eth1  proto kernel  scope link  src 192.168.1.33

##########
**Configuration of my modem**

LAN > Router Local IP >

IP Address : 192.168.1.1
Subnet Mask : 255.255.255.0
* Dynamic Route : RIP2-B
* Direction : NONE
* Multicast : Disabled
* IGMP Snoop : Disabled
DHCP Server : Enabled
DHCP, Starting IP Address : 192.168.1.33

WAN >

* ISP : PPPoA/PPPoE
* Encapsulation : PPPoE LLC
* Half Bridge : Deactivated
* NAT : Enable
* Default Route : Yes
* Dynamic Route : RIP1
* Direction : both
* Multicast : Disabled

##########
**On FreeBSD, The guest VM**

* DHCP is enable
* Broadcast : 10.0.2.255
* Status : active

##########
AQEMU Network options:

NIC model : Default
VLAN : 0 (in both mentioned modes)

##########

Last edited by temp-usr; 09-23-2016 at 06:57 AM.. Reason: change icon
# 2  
Old 09-23-2016
Lightbulb

I installed Oracle VirtualBox v4.3.36 and only ticked "NAT Networks" which is default mode from:

File Menu -> Preferences -> Network

then installed FreeBSD on it and it can connected to internet without any problem, altough it has some limitation which of cource these limitations normally don't affect normal network use:
Thanks to SUN Microsystems and Oracle Corporation.

---------- Post updated at 06:53 AM ---------- Previous update was at 03:51 AM ----------

I changed "DNS nameserver" on FreeBSD from:

#bsdconfig
-> Networking Management -> DNS nameservers

and changed it from 127.0.0.1 to 10.0.2.3

problem solved! on VirtualBox I did not have to deal with this problem. I think this problem was created by me, because several times when my modem was turned off I configured ethernet interface on FreeBSD with enabling and disabling DHCP, I'm not sure, just likely.
This User Gave Thanks to temp-usr For This Post:

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

KVM/Qemu allocated memory not showing in guest

So we have a RHEL 7.6 workstation with 128 gigs of ram. The OS sees all the ram and 80 cors (40 HT) We have 1 guest with 8 CPUs and 32gigs of ram running RHEL 7.6 workstation as well. We are trying to create another guest with 64 CPUs and 80 gigs of ram. We setup the system using... (0 Replies)
Discussion started by: joeg1484
0 Replies

2. Linux

Best tuning for qemu windows guest(windows 7)

In your opinion,which is the best tuning for windows 7 guest? I use cpu: host mem: at least 2G,better 4G disk: this is the most important,without "unsafe" cache is really slow and apply a 1G "service pack" can take 3 hours,with unsafe is really fast,actually I use cache=unsafe... (1 Reply)
Discussion started by: Linusolaradm1
1 Replies

3. Red Hat

Unable to connect to internet

Hello, I just installed CentOS 7 (Server with GUI) and guess what I could install Virtual Box Guest additions without installing any extra package/software which is great news ! Now bad news or not so great news. My Host OS is Windows 10, Virtual Box is the virtualization software. CentOS7-1... (0 Replies)
Discussion started by: bluemind2005
0 Replies

4. IP Networking

Unable to connect to internet on slackware 14.1 (hathway connection)

Hi, I have a wired internet connection of hathway provider. I would like to use the connection on my desktop as well as my laptop. My desktop pc has windows 7 and yesterday I installed slackware 14.1 (full installation) on my lenovo 3000 n100 laptop. Previously I had slacko puppy 5.7... (7 Replies)
Discussion started by: pinakbheed
7 Replies

5. UNIX for Dummies Questions & Answers

Qemu Problems: OpenBSD(host) Kali Linux(guest)

As the title suggests I ran into a little problem trying to create a virtual machine of Kali Linux usign Qemu inside OpenBSD. I edited the example Kali Linux gave on their website here to the following for BSD: qemu-system-i386 -hda ./kali.qcow2 -boot d -cdrom ./kali-linux-1.0.5-i386.iso -m... (0 Replies)
Discussion started by: Azrael
0 Replies

6. Virtualization and Cloud Computing

unable to connect internet on virtual machine

I have installed Oracle VM virtual box on Windows 7 and using LINUX (backtrack 5) as my virtual OS. The problem is i'm unable to connect to internet from my virtual OS. i'm using USB dongle (mobile broad band) to connect to internet from my host OS windows 7. I tried setting NAT in VM settings... (0 Replies)
Discussion started by: Arun_Linux
0 Replies

7. Emergency UNIX and Linux Support

Sharing internet from host os to guest os

I have a host os Windows 7 ultimate in place where virtual box is installed. Now in virtual box I have installed solaris 10. There is internet connection present in host windows 7 still I am not able to access internet in solaris 10. Please help to configure solaris so that internet can be... (12 Replies)
Discussion started by: hiten.r.chauhan
12 Replies

8. Solaris

Unable to connect to Internet

Hi friends recently i have installed SXDE 1/08 into my machine,and i installed wifi driver also its working fine,Recently i was unable to connect to Internet,I have not changed any configurations and any installations,thing is that i got my iwk0 interface is UP and IP address also and i can... (6 Replies)
Discussion started by: srinivas2828
6 Replies

9. UNIX for Advanced & Expert Users

Unable to connect to INTERNET using BSNL Broad band connection on Solaris-x86

Hi, Iam using BSNL broad band connection and i have installed two OS Xp & Sun solaris -x86 on my machine.Iam able to use INTERNET on windows Xp but not able to do it on solaris x86. I have tried using DHCP concept as well as sys-unconfig command in solaris but no results. When i use... (5 Replies)
Discussion started by: jayaprakash
5 Replies

10. Solaris

unable to connect to solaris guest in vmware

hi All, I require your help and suggestion in this. I have a solaris 10 (guest) installed on a vmware and my host OS is windows 2003 server. i am trying to conenct to the solaris 10 from my local Pc through putty, but unable to connect. please advice what setup or prerequitsites are required to... (4 Replies)
Discussion started by: bathija
4 Replies

Featured Tech Videos