Page 1 of 1

Networking

Posted: 28. Apr 2009, 15:31
by Runaway1956
Networking has always been a headache to me. Someday, I should just sit down with a pile of books, and study for a year or six......

Specifically, in VirtualBox, I want my VM's to be accessible from my internal network. The VM's are on my gateway machine, so I have one NIC for internet access, and another that provides internet access for all other machine in the house. That NIC's address is 192.168.0.1 for (easy) compatibility with the Microsoft machines.

eth1 connects to my router/modem
eth3 provides access to the network (Please, don't ask why I don't have eth0 and eth1 - already said that networks are a headache ;) )

Vbox currently has my Windows XP VM set up to use PCnet-FAST III (Bridged network, eth3) and the machine is invisible to the rest of the network. If I should change the bridge to NAT, I still can't see the rest of the machines on the network, nor can they see the VM. Of course, when I choose NAT, it no longer specifies whether it is using eth1 or eth3 - but since I have internet access, I presume that it is using eth1.

Using Host Only network, of course, will only allow the VM to see the shares presented by the host machine.

When I select the internal network, I lose the internet, and I'm still unable to see the other machines on the LAN.

In the Virtual Network Editor, I find that the address assigned is 192.168.170.0 Changing that address to 192.168.0.134, I would expect to see the LAN network - but I still don't see it. Incidentally, this change causes loud squawking noises from the son's room, due to his loss of internet access. :)

The goal here, is to have access to both the LAN and the internet, but I haven't figured it out yet. Any ideas would be very welcome here.

Re: Networking

Posted: 28. Apr 2009, 15:35
by Sasquatch
You run it on your router, where you have two NICs. So it's best to give the VM the same amount. One with NAT for internet, the other with Bridged for your internal LAN. Networking isn't that hard, you just have to know how to troubleshoot it and know how your own is set up :).

Re: Networking

Posted: 28. Apr 2009, 15:51
by Runaway1956
That was exactly the hint I needed, Sasquatch. Obviously, if it takes two adapters to create a gateway, and I want to see both sides of the gateway, then I need two virtual adapters. In retrospect, I gotta say, "DUHHH".

Many thanks!!

Re: Networking

Posted: 28. Apr 2009, 16:51
by Debianuser
Hi,

Sorry to ask but there are some point I don't understand :?: .

Why did he need to set up two network cards ? Guest in bridge mode is see as a machine with a network card (for a logical point of view as a real machine connected on the same physical network than the card chosen) ?
it looks to the host system as though the
guest were physically connected to the interface using a network cable: the host can
send data to the guest through that interface and receive data from it. This means that
you can set up routing or bridging between the guest and the rest of your network.
I will only set up one card to belong to the network and put as gateway the gateway like son's machine. I'm wrong to think that ?

As he say setting 192.168.0.134 make his son complain, probably mean that he use the same IP. So it explain why he still don't see the network because network can manage the delivery (think of a postman delivering a paquet for 192.168.0.134, oups error who's who ! Me Mr Postman have two differents persons for same address).

This setting should work, something like 192.168.0.y with y not equal to existant IP (not 192.168.0.1 yuor gateway and not 192.168.0.134 the son's machine) and correct (not 0 or 255) for ip.
Ip : 192.168.0.2 (for example if not already in use)
mask : 255.255.255.0
gateway : 192.168.0.1 (probably, check the setting on son's machine and put same value).
Dns : again check the setting on son's machine and put same value.

With that, guest should be able to go on internet and see other machine of your network. Beaware that guest have no direct access to internet, it need the gateway like other machine of your network. So, it have same right, security than other.

If I ask why he need to setup two network card, one for internet, one for home network, it 's because I think this break the security set on the gateway.

For me, but I must be wrong, the second card set for internet access, give to the guest direct access to the web, with it's virus, crack and more ugly thing without security that can be set on the gateway (firewall, antivirus, proxy, ...).

The guest is see as a software asking to his host's OS (gateway is this case) to go out (because this network card is set in Nat mode). But, the security should be change to take this in account (depend on how it's manage). And thing go worse if the network card is set in bridge mode, the guest appear to be a machine on the internet side (between gateway and the router). I don't know how virtual filter work, and if security rules can be applied before the paquet go to the guest.

The first card connect the guest to the home network, it give access for the guest to the other machine. Virus on the guest can probably come to home network easy. Guest use eth3 (if the gateway is a linux OS, search for udev how to it 's what define the link between material and symbolic file like ethx) only the virtual brigde filter is between, so again there is probably no more security (depend of user's paranoia level).

I really want to know more about this matter, so help me to understand, please.

Ps: Runaway1956, you understand pretty much on network thing. So don't give up and enjoy. 8)

Debianuser

Re: Networking

Posted: 28. Apr 2009, 17:29
by Runaway1956
Debianuser -

I read your reply, and began with an answer, but had to stop and test things first.

Without altering the settings in VirtualBox, I went into the WinXP Virtual Machine, and disabled the AMD PCnet adapter. When I fired up Firefox, it connected to the iternet, by way of 192.168.0.1

It seems that you may be right - when I chose an arbitrary address for the adapter, that address was already in use. That, of course, knocked the son off the internet, and blocked me as well.

When I set up the second adapter, I chose the IntelPro/1000 desktop bridged to eth3 I don't have any idea what difference the choice of adapter makes, but it seems to be working here. More importantly, it seems, is that the VM is getting it's IP address from the DHCP server on the host machine.

Hope that helps some - it seems that you are right, anyway.



quick edit:
before disabling that adapter in Windows, ipconfig gives me this:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\User>ipconfig

Windows IP Configuration


Ethernet adapter Local Area Connection 3:

Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 10.0.2.15
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.0.2.2

Ethernet adapter Local Area Connection 4:

Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.0.117
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1

C:\Documents and Settings\User>


After disabling, I get this:


C:\Documents and Settings\User>ipconfig

Windows IP Configuration


Ethernet adapter Local Area Connection 4:

Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.0.117
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1

C:\Documents and Settings\User>


So, I'm still rather lost on why it works now, but didn't work before.

Re: Networking

Posted: 29. Apr 2009, 08:59
by Debianuser
Hi,

Thanks for your answer and your time.

IP Address. . . . . . : 10.0.2.15 come from the NAT mode. In this mode, VirtualBox act as a dhcp server for his virtualguest (NAT don't do dhcp thing normaly).

Choice of adapter have no impact if the guest OS have drive for it. It's why Intel/1000 was add in VirtualBox because MS Vista OS didn't support the AMD card.

Sometime, particulary true with MS product, thing don't work for very dark reason (probably one but what one ?).

Thanks again for your answer, Today have learn at least one thing, it 's a good day :)

Debianuser