Page 1 of 1
Creating network with Host-only Adapter.
Posted: 29. Dec 2012, 11:40
by zsycho
Hii everyone, this is my first post here and hoping to get the resolution to the issue I am facing.
I created 2 ubuntu VMs on Win 7 host.
Adapter 1 as NAT
Adapter 2 as Host-only
I am able to connect to the internet on both VMs and also able to ping 192.168.56.1 (Windows host)
but when I try to ping my other VM, I receive duplicate (DUP!) ping response.
Code: Select all
root@xhase-VirtualBox:~# ping 192.168.56.143
PING 192.168.56.143 (192.168.56.143) 56(84) bytes of data.
64 bytes from 192.168.56.143: icmp_req=1 ttl=64 time=1.66 ms
64 bytes from 192.168.56.143: icmp_req=1 ttl=63 time=2.21 ms (DUP!)
From 192.168.56.1: icmp_seq=2 Redirect Network(New nexthop: 192.168.56.143)
64 bytes from 192.168.56.143: icmp_req=2 ttl=64 time=0.688 ms
64 bytes from 192.168.56.143: icmp_req=2 ttl=63 time=0.701 ms (DUP!)
64 bytes from 192.168.56.143: icmp_req=2 ttl=64 time=0.717 ms (DUP!)
64 bytes from 192.168.56.143: icmp_req=2 ttl=63 time=0.731 ms (DUP!)
Both the VMs are assigned static IP (192.168.56.101 and 192.168.56.143)
I am able to ssh the VM. Also I need to host apache webserver on one of the guest and access it from host.
Can someone help me with setting up my network? or let me know the cause of issue I am facing with duplicate pings?
Thanks in advance.
Re: Creating network with Host-only Adapter.
Posted: 29. Dec 2012, 12:46
by noteirak
Code: Select all
From 192.168.56.1: icmp_seq=2 Redirect Network(New nexthop: 192.168.56.143)
Your answer is here, the host is doing funny things and resending the packets.
You got something going on in your Windows 7.
What is your LAN address? Did you change anything into the windows 7 networking?
Re: Creating network with Host-only Adapter.
Posted: 30. Dec 2012, 17:26
by zsycho
I doubt if I did any networking changes on Win 7 other than enabling ping echo request which are disabled by default in windows vista / 7.
I tried disabling that , but no changes. still duplicates.
VirtualBox Host-Only Network IP address is: 192.168.56.1 with no default gw (as default)
LAN IP address is: 169.254.110.146
I connect to internet through PPPOE and get public address from there.
Is there something missing in the routing table of VMs?
Code: Select all
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.2.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
192.168.56.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth1
0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 eth0
Thanks!!
Re: Creating network with Host-only Adapter.
Posted: 30. Dec 2012, 18:47
by H.Z.
Stop the "Routing and Remote Access" service on your host if you don't need it!
(I've tried to start it, because I thought it will help to route packets from LAN to host only network, and I experienced same as you...)
Re: Creating network with Host-only Adapter.
Posted: 30. Dec 2012, 19:37
by zsycho
Sorry to say but that service was already disabled

.
Now what I am not able to understand is:
If both the systems are on same network (192.168.56.0), should the packet be sent to host(192.168.56.1) which then redirects to destination VM?
I think there is some problem with this route >>
Code: Select all
192.168.56.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
Re: Creating network with Host-only Adapter.
Posted: 30. Dec 2012, 23:29
by noteirak
I see two issues :
the 169.254.x.X ip address is only assigned if an interface is expected a DHCP but received no offer and thus no address
The 192.168.56.x ip address shouldn't be via the default gateway, since it should be an interface of your VM
You will need to setup properly your network before going further. If you are not able to do this on your own, you should seek local support, as only Virtualbox support is given on this forum.
Re: Creating network with Host-only Adapter.
Posted: 31. Dec 2012, 03:46
by BillG
I would not use Host Only for this. If you want the guests to communicate with each other I would put then in an internal network. They do not need to access the host through this interface.
The guests will use the NAT interface to access the physical network and the Internet but the internal network to communicate with each other. Just give them IP addresses in the same IP subnet on the internal interfaces.
Re: Creating network with Host-only Adapter.
Posted: 6. Jan 2013, 17:33
by zsycho
BillG wrote:I would not use Host Only for this. If you want the guests to communicate with each other I would put then in an internal network. They do not need to access the host through this interface.
The guests will use the NAT interface to access the physical network and the Internet but the internal network to communicate with each other. Just give them IP addresses in the same IP subnet on the internal interfaces.
Thanks for your suggestion, but still got 1 question. Will the guest be able to communicate with the host? coz I need to host apache webserver on one of the guest and access it via host.
I used Host-only because I read it somewhere that to able to communicate between host and the guest, Host-only adapter should be used.
Thanks for your responses !!
Re: Creating network with Host-only Adapter.
Posted: 6. Jan 2013, 17:41
by noteirak
If you need the guest and host to communicate directly, then NAT cannot be used.
Either use Host-only or Bridged
Re: Creating network with Host-only Adapter.
Posted: 6. Jan 2013, 19:08
by zsycho
noteirak wrote:If you need the guest and host to communicate directly, then NAT cannot be used.
Either use Host-only or Bridged
Shouldn't I need to use NAT as one of the guest interface to allow my guests to communicate with the external world (internet)?
Thanks!
Re: Creating network with Host-only Adapter.
Posted: 6. Jan 2013, 21:27
by noteirak
This can be done via Host-only (be requires routing on the host) or Bridged, so you're good.
For the exact details on how to setup your guests & hosts from the OS persepective, that is beyond the scope of this forum though.
Easiest mode for what you want : Bridged.
Re: Creating network with Host-only Adapter.
Posted: 7. Jan 2013, 13:25
by jorgensen
noteirak wrote:If you need the guest and host to communicate directly, then NAT cannot be used.
Either use Host-only or Bridged
Actually it is possible to reach the host from the guest with a standard NAT setting.