Internal network connection

Discussions about using Linux guests in VirtualBox.
Post Reply
amadeo
Posts: 5
Joined: 28. Apr 2016, 22:53

Internal network connection

Post by amadeo »

Hi!

I'm going through some weird (I think) problems at trying to mount a little virtual network with VB, hope you can help me.

What I'm trying to do has been widely discussed in this forum, but I'm not able to see where my mistake is. I have my host (Windows 10) with VB and I've installed two clone guests with Linux. As I want the network to be "host-only", firstly, I create a "Host-only network" (in "Preferences") with the configuration I want, a given IP and no DCHP. Secondly, I set the network configuration of the hosts to be "host only" too and then I start them. Finally, I assign them some IP in the same sub-network. I check the connection is OK between the guests with a ping test and Ok from the host to the guests too, but it's not from any guest to the host computer.

As I say, I don't know where could the mistake be, but, the point is that I've tried just the same configuration in some friend's computers and it worked absolutely fine. Don't know if it's my fault or something wrong in my computer

Thank you in advance
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Internal network connection

Post by Perryg »

Post the following from you Win host command window.
  • 1)VBoxManage list hostonlyifs
    2) post the results of ifconfig -a from each guest
    3) make sure you do not set a gateway for any guest that uses host-only. It will not work.
amadeo
Posts: 5
Joined: 28. Apr 2016, 22:53

Re: Internal network connection

Post by amadeo »

Perryg wrote:Post the following from you Win host command window.
  • 1)VBoxManage list hostonlyifs
    2) post the results of ifconfig -a from each guest
    3) make sure you do not set a gateway for any guest that uses host-only. It will not work.
thank you for answering! there you go:

1)

Ethernet VirtualBox Host-Only Network:
DNS Sufix for the connection. .. . . . . :

IPv6 local direction. . . . . . . . . .. . :
fe80::416b:a916:de2e:f0be%27

IPv4 direction. . . . . . . . . . . . . . :
192.168.100.222

netmask . . . . . . . . . . . . . . . . . :
255.255.255.0

Default gateway . . . . . . . . . . . . :


2) the linux guests are actually OS from a router so ifconfig is not available but, I post the equivalent one:

guest1

ip address print detail

address=192.168.100.1/24 network=192.168.100.0 interface=ether1

guest 2

ip address print detail

address=192.168.100.2/24 network=192.168.100.0 interface=ether1

3) I think,not sure, but I think I haven't, at least checking my configuration.

Thank you again, ask whatever what you need!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Internal network connection

Post by Perryg »

2) the linux guests are actually OS from a router so ifconfig is not available but, I post the equivalent one:
You will need to explain this in more detail. the host-only will never see a router nor will it obtain an address for one. They are not meant to.

You also need to make sure that you have not created a host-only network that uses the same subnet as the host.
amadeo
Posts: 5
Joined: 28. Apr 2016, 22:53

Re: Internal network connection

Post by amadeo »

Perryg wrote:
2) the linux guests are actually OS from a router so ifconfig is not available but, I post the equivalent one:
You will need to explain this in more detail. the host-only will never see a router nor will it obtain an address for one. They are not meant to.

You also need to make sure that you have not created a host-only network that uses the same subnet as the host.
Regarding the thing about routers, I know that this configuration doesn't make much sense if it's meant to act as a router, but by the moment I just want to establish a connection in the way I said, using an OS which turns out to be from a router. (However, if you could explain how could it be implemented it would be great, as I' ll have to do it later)

As for the subnet of the host, this confuses me quite a lot, I mean, I have the ethernet adapter I actually use with a different IP in a different subnet. Then, I have the host-only adapter of Virtualbox with the IP of the network I want to create assigned, so my intention is making a correct ping from the guest to that direction assigned to the VB adapter. is it correct?

Thank you for your patience, as you can see I'm quite green on this.
Last edited by amadeo on 29. Apr 2016, 01:08, edited 1 time in total.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Internal network connection

Post by Perryg »

run ipconfig /all on your host and send it to me using the PM ( private message ) so I can hopefully understand what is really going on.

Also what are these guests exactly and you say cloned. Did you make sure to re-initialize the MAC address on at least one of them?
amadeo
Posts: 5
Joined: 28. Apr 2016, 22:53

Re: Internal network connection

Post by amadeo »

Perryg wrote:run ipconfig /all on your host and send it to me using the PM ( private message ) so I can hopefully understand what is really going on.

Also what are these guests exactly and you say cloned. Did you make sure to re-initialize the MAC address on at least one of them?
All right, I'm sending you the ipconfig report.

About the guests, they are some free images which can be downloaded from the page of the manufacturer Mikrotik. So they are basically the OS running under a router of that trakemark. My first intention is running the network having connection between all points, and then, configure it so they can really act as routers.

by the way, I did, I re-initialized MAC directions in both guests.

EDIT: it looks like I'm not allowed to send MP...
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Internal network connection

Post by Perryg »

I guess you must have 5 posts to be able to send a PM. Anyway you must make sure that the host is not using the 192.168.100.* for its dedicated connection.

I also question the use of host-only for this kind of network test since routers really are gateways and host-only does not use it. The reason for host-only was to allow guest and host to communicate when no network is available and not intended to be used with a router.
amadeo
Posts: 5
Joined: 28. Apr 2016, 22:53

Re: Internal network connection

Post by amadeo »

When you say "dedicated connection" you mean the connection I normally use in the host to get to the network, don't you? If it's that, it's not in that subnet.

As I say, this is no more than a "connection test" which uses two routerOS, but not intended to act as a real routers. However, I have to do it too, so, how you think is the best way to do it for a real test? As bridge maybe?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Internal network connection

Post by Perryg »

Actually it would be better if they were isolated completely from you local LAN or you could have issues. I would use the internal ( intnet ) to connect the two guests and leave the host out of the equation. You could use Bridged but it will require you to know a lot more about networking than it appears you do.
Post Reply