Networking modes

Discussions related to using VirtualBox on Windows hosts.
Post Reply
itbookham
Posts: 23
Joined: 15. Apr 2011, 21:00
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: XP/Windows 7

Networking modes

Post by itbookham »

I have set up two VMs (both running XP Pro) using 'Bridged adapters' and connected with a crossover cable. If I assign a static address of 192.168.0.1 (255.255.255.0) to one guest and assign 10.0.0.1 (255.0.0.0) to the other guest how come they can both reply to the ping command? This just isn't logical. Is it that Virtualbox just doesn't worry about the subnet masks or ip addresses?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Networking modes

Post by Perryg »

What makes you think that they should be able to see each other without a router telling them where the other one is?
itbookham
Posts: 23
Joined: 15. Apr 2011, 21:00
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: XP/Windows 7

Re: Networking modes

Post by itbookham »

They shouldn't be able to see each other but I cannot understand why they reply to the Ping command. I have been attempting to set up two subnets, and with this in mind I thought about setting up two VMs connected with a crossover cable. The VMs would be assigned IP addresses using subnetting 10.0.0.0./9 (10.0.0.0 and 10.128.0.0) and modifying the Routing table on each VM. Having set up the VMs I decided to check the connectivity using two different Class addresses just to make sure that they wouldn't see each other when subnetting. The problem is even with different Class addresses they respond to the Ping command, so it is pointless going any further with the test.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Networking modes

Post by Perryg »

Post the results of ipconfig /all from both guests
itbookham
Posts: 23
Joined: 15. Apr 2011, 21:00
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: XP/Windows 7

Re: Networking modes

Post by itbookham »

1.
Guest 1 (IP Address 10.0.0.2 / 255.0.0.0):

C:\Documents and Settings\mark>ping 192.168.0.2

Pinging 192.168.0.2 with 32 bytes of data:

Reply from 192.168.0.2: bytes=32 time<1ms TTL=128
Reply from 192.168.0.2: bytes=32 time<1ms TTL=128
Reply from 192.168.0.2: bytes=32 time<1ms TTL=128
Reply from 192.168.0.2: bytes=32 time<1ms TTL=128

Ping statistics for 192.168.0.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Documents and Settings\mark>ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : XP01
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection 2:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : AMD PCNET Family PCI Ethernet Adapte
r #2
Physical Address. . . . . . . . . : 08-00-27-6A-1F-48
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 10.0.0.2
Subnet Mask . . . . . . . . . . . : 255.0.0.0
Default Gateway . . . . . . . . . : 10.0.0.2

C:\Documents and Settings\mark>

2.
Guest 2 (IP Address 192.168.0.2 / 255.255.255.0):

C:\Documents and Settings\mark>ping 10.0.0.2

Pinging 10.0.0.2 with 32 bytes of data:

Reply from 10.0.0.2: bytes=32 time=2ms TTL=128
Reply from 10.0.0.2: bytes=32 time<1ms TTL=128
Reply from 10.0.0.2: bytes=32 time=1ms TTL=128
Reply from 10.0.0.2: bytes=32 time=1ms TTL=128

Ping statistics for 10.0.0.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 2ms, Average = 1ms

C:\Documents and Settings\mark>ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : xp2
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : AMD PCNET Family
r
Physical Address. . . . . . . . . : 08-00-27-6F-9A-27
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.2
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.2

Tunnel adapter Teredo Tunneling Pseudo-Interface:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Teredo Tunneling
Physical Address. . . . . . . . . : FF-FF-FF-FF-FF-FF
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : fe80::5445:5245:4
Default Gateway . . . . . . . . . :
NetBIOS over Tcpip. . . . . . . . : Disabled

Tunnel adapter Automatic Tunneling Pseudo-Interface:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Automatic Tunneli

Physical Address. . . . . . . . . : C0-A8-00-02
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : fe80::5efe:192.16
Default Gateway . . . . . . . . . :
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%
fec0:0:0:ffff::2%
fec0:0:0:ffff::3%
NetBIOS over Tcpip. . . . . . . . : Disabled

C:\Documents and Settings\mark>
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Networking modes

Post by Perryg »

Are these guests both on the same host, and if so why the crossover cable?
itbookham
Posts: 23
Joined: 15. Apr 2011, 21:00
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: XP/Windows 7

Re: Networking modes

Post by itbookham »

Yes the guests are on the same host. Is a crossover cable not necessary then to connect the guests?
itbookham
Posts: 23
Joined: 15. Apr 2011, 21:00
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: XP/Windows 7

Re: Networking modes

Post by itbookham »

I removed the crossover cable and changed Guest 2's ip address from 192.168.02 to 10.0.0.5. From Guest 2, I then pinged Guest 1 (10.0.0.2) 'request timed out'.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Networking modes

Post by Perryg »

Well I suspect a loopback in play here. Normally if I want to test subnetting I use the Internal adapter and separate the subnets that way and then another guest as a router, or routing in the guests.
itbookham
Posts: 23
Joined: 15. Apr 2011, 21:00
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: XP/Windows 7

Re: Networking modes

Post by itbookham »

Hello,

Thank you for your advice.

Is the possible loopback problem to do with the VB software or my system?

When you say that you use the internal adapter for testing subnetting do you mean setting the network mode to 'internal networking'?

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

Re: Networking modes

Post by Perryg »

Hard to say but very strange. The way VBox and others work is to use a device driver that hooks to the hosts nic. So somewhere it is being routed and to tell the truth I have never seen it, but I don't connect the two host nics together with a crossover either.

Yes the guests network settings and select Internal. You name one something like int1 and the other int2. Then you have two separate lans on different (virtual switches) or use the same name for both and do your routing.
itbookham
Posts: 23
Joined: 15. Apr 2011, 21:00
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: XP/Windows 7

Re: Networking modes

Post by itbookham »

Hello,

Thanks for the comments. I will think through your suggestion.

As a by the way, I have just tried connecting the two VMs using a straight through cable and now I have connectivity between (10.0.0.2) and (10.0.0.5). So far, so good. I will now use different Class addresses and hopefully there should be no connectivity. If this is the case I will revert to my original plan of modifying the Routing tables on both VMs in order to test subnetting.

Many thanks,
Mark
itbookham
Posts: 23
Joined: 15. Apr 2011, 21:00
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: XP/Windows 7

Re: Networking modes

Post by itbookham »

Hi,

Even with both VMs set to 'Internal networking', different Class addresses assigned to each VM can still communicate using the Ping command. I think I will have to abandon VB and just use a crossover cable to connect two host computers.

Many thanks,
Mark
Post Reply