Page 1 of 1

Could I build this kind of network?

Posted: 28. May 2009, 04:51
by LinHz
I installed the VB and install the xp into the guest while the host is Xp too.
And now I want to accomplish this goal which the guest can connect to the Internet and the host can surf the internet through the guest...
So which kind of Network should I set?
Is NAT or Bridged or Host-interface or internal?
Thanks for ur help.

Re: Could I build this kind of network?

Posted: 28. May 2009, 05:44
by LinHz
Or in another words,while the host / guest can surf the internet , the guest / host can also surf it .....

Re: Could I build this kind of network?

Posted: 28. May 2009, 10:48
by Sasquatch
Get some howto on how to set up a router system. There are some really easy ones. But why do you want to do this? Are you installing the Guest as a proxy to filter certain traffic?
Anyway, the setup you need is Bridged. You set the Host to use the Guest IP as gateway, the Guest is self explaining ;).

Re: Could I build this kind of network?

Posted: 28. May 2009, 15:48
by LinHz
Sasquatch wrote:Get some howto on how to set up a router system. There are some really easy ones. But why do you want to do this? Are you installing the Guest as a proxy to filter certain traffic?
Anyway, the setup you need is Bridged. You set the Host to use the Guest IP as gateway, the Guest is self explaining ;).
Because in my environment of the network, we should run a software to connect the serve at first. Then the serve opens the port or the net(In my observation) to surf the internet.
So I wanna that the guest runs the software to let the serve open the net,and the host can surf and run the proxy for others in the LAN.
I tried the NAT mode.In this mode, when the host runs the software, both the host and the guest can surf internet. But while the guest runs the software, only the guest can connect to internet.
And in the same time, while the host run the software ,though the guest can surf the internet, the guest cannot provide the proxy serve.

Errr...Maybe I made a mistake in this step:
While I using the Bridged, I set the host and guest DHCP.So they get the IP from the DHCP serve separately.And at that time ,they have the different IP,which makes them cannot be considered as one.

Is it right?
Thanks for ur help.

Re: Could I build this kind of network?

Posted: 28. May 2009, 17:10
by LinHz
Two way to solve the problem,but failed.....
Way A:
the guest network mode is PCnet-FAST III( Briadged adapter , the local Ethernet Adapter) ,and use the DHCP mode to get the IP address.
Then ipconfig of the guest is:

Code: Select all

Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 172.17.41.35
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.17.41.254
DHCP Server . . . . . . . . . . . : 172.17.41.254
DNS Servers . . . . . . . . . . . : 172.18.7.2
                                            172.18.2.11
                                            61.153.177.198
the host's the local Ethernet Adapter set the TCP/IP protocol as :

Code: Select all

Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 172.17.41.34
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.17.41.35
DNS Servers . . . . . . . . . . . : 172.18.7.2
                                            172.18.2.11
                                            61.153.177.198
The host failed to connect the internet as result.....

Way B:
Bridging the VirtualBox Host-Only Network and the Local Ethernet Adapter as the MAC (Micro-bridge port)
The guest's setting is:

Code: Select all

Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 172.17.41.35
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.17.41.254
DHCP Server . . . . . . . . . . . : 172.17.41.254
DNS Servers . . . . . . . . . . . : 172.18.7.2
                                            172.18.2.11
                                            61.153.177.198
And the Briage of the host is set as follow:

Code: Select all

Description . . . . . . . . . . . : MAC ?????
Physical Address. . . . . . . . . : 0A-00-27-00-34-A3
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 172.17.41.44
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.17.41.35
DNS Servers . . . . . . . . . . . : 172.18.7.2
                                            172.18.2.11
                                            61.153.177.198
The host also failed to connect the internet as result.....

Is there any mistake in my configuration?

Re: Could I build this kind of network?

Posted: 28. May 2009, 23:40
by Sasquatch
There are plenty of mistakes, because you don't know how to set up a network properly. Or how it all works.
Your first error is not to have the Host use DHCP, and set the Guest as the gateway, while the real gateway on the same network range. You didn't set the Guest to act as gateway.

You said that using NAT, the Guest and Host can connect to the internet at the same time, so why not stick with that?

Re: Could I build this kind of network?

Posted: 29. May 2009, 02:17
by LinHz
Sasquatch wrote:You said that using NAT, the Guest and Host can connect to the internet at the same time, so why not stick with that?
Because in my environment of the network, we should run a software to connect the serve at first. Then the serve opens the port or the net(In my observation) to surf the internet.
So I wanna that the guest runs the software to let the serve open the net,and the host can surf and run the proxy for others in the LAN.
I tried the NAT mode.In this mode, when the host runs the software, both the host and the guest can surf internet. But while the guest runs the software, only the guest can connect to internet.
And in the same time, while the host run the software ,though the guest can surf the internet, the guest cannot provide the proxy serve.
Your first error is not to have the Host use DHCP, and set the Guest as the gateway, while the real gateway on the same network range. You didn't set the Guest to act as gateway.
Is that means I should have the Host use DHCP, and then set the Host as the gateway for Guest?

Re: Could I build this kind of network?

Posted: 31. May 2009, 00:45
by Sasquatch
Ok, this is what you need to do:
In the Guest settings, have it attached to two adapters, one is Bridged, the other is either Host-Only, or bridged as well (I will focus on Bridged). The reason for the second bridge is for the gateway part.
Set one NIC with DHCP, so it can connect to the internet using the application you need. In the Network Connections window, right click on the internet NIC and select properties. Now go to the last tab and select Internet Connection Sharing. This will give the second NIC the static IP of 192.168.0.1. This will be the gateway for the rest of the network.

On the Host, you can either use DHCP or static for the NIC. It's best to use Static, because that way you are certain that you connect through the Guest, and not obtain an IP from the modem/router. Use 192.168.0.2 - 254, gateway and DNS set to 192.168.0.1. The DNS can also be set to the ISP or modem/router.
Do the same for the rest of the network, and all traffic should go through the Guest when accessing internet.

If you want, you can install more advanced software so it will function more like a router with firewall and all, but that's outside the scope of this forum.

Re: Could I build this kind of network?

Posted: 9. Jun 2009, 16:17
by LinHz
Sasquatch wrote:Ok, this is what you need to do:
In the Guest settings, have it attached to two adapters, one is Bridged, the other is either Host-Only, or bridged as well (I will focus on Bridged). The reason for the second bridge is for the gateway part.
Set one NIC with DHCP, so it can connect to the internet using the application you need. In the Network Connections window, right click on the internet NIC and select properties. Now go to the last tab and select Internet Connection Sharing. This will give the second NIC the static IP of 192.168.0.1. This will be the gateway for the rest of the network.

On the Host, you can either use DHCP or static for the NIC. It's best to use Static, because that way you are certain that you connect through the Guest, and not obtain an IP from the modem/router. Use 192.168.0.2 - 254, gateway and DNS set to 192.168.0.1. The DNS can also be set to the ISP or modem/router.
Do the same for the rest of the network, and all traffic should go through the Guest when accessing internet.

If you want, you can install more advanced software so it will function more like a router with firewall and all, but that's outside the scope of this forum.
Thanks very much..