Connection issue

Discussions related to using VirtualBox on Windows hosts.
HuaMin
Posts: 239
Joined: 17. Jan 2012, 07:01
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Oracle linux

Connection issue

Post by HuaMin »

Hi,
It is not able to get proper IP through Bridged connection on Virtual machine. What to adjust below?
1e.png
1e.png (26.89 KiB) Viewed 3565 times
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Connection issue

Post by BillG »

How is the host machine networked? Is it on a LAN and does it connect to the Internet through a NAT router? If it does, the vm should get its network config from that same router and connect just like the host does when set to bridged. If it is not on a LAN with its own DHCP server, bridged mode will not work.

If you cannot work out what is happening, post the output of an ipconfig command for both host and guest.
Bill
HuaMin
Posts: 239
Joined: 17. Jan 2012, 07:01
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Oracle linux

Re: Connection issue

Post by HuaMin »

See details below from Host

Windows IP Configuration


Ethernet adapter VirtualBox Host-Only Network:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::1da9:7a9f:922e:5111%17
IPv4 Address. . . . . . . . . . . : 192.168.56.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :

Wireless LAN adapter Local Area Connection* 4:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Wireless LAN adapter Local Area Connection* 5:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Ethernet adapter Ethernet:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::7414:51fd:9f7d:8473%14
IPv4 Address. . . . . . . . . . . : 2?.??.?
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 223.???

Wireless LAN adapter Wi-Fi:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Ethernet adapter Bluetooth Network Connection 2:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

and detais below from VM

Windows IP Configuration


Ethernet adapter Ethernet 2:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::200f:9c03:7f71:3d95%5
Autoconfiguration IPv4 Address. . : 169.254.61.149
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :

Ethernet adapter Ethernet:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::8d27:1d8e:8661:9033%3
Autoconfiguration IPv4 Address. . : 169.254.144.51
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :

Tunnel adapter isatap.{47D3EB4E-500E-4379-B92D-6D966E9BC87A}:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Tunnel adapter isatap.{9BC088E2-E629-480C-8E57-822D45E9D1E7}:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Last edited by HuaMin on 13. Aug 2021, 15:39, edited 3 times in total.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Connection issue

Post by mpack »

Is there a router with DHCP server on the physical network you bridged to? I think not, because the VM has not been assigned an IP address: it is using the Windows fallback "auto" address of 169.254.xxx.yyy.

If there was a router with DHCP server in charge of the physical network then I'd expect to see the host and VM both being assigned addresses in the same range, e.g. 192.168.xxx.yyy, also the default gateway would not be blank (no gateway = no way to reach the Internet).

Also, the VM seems to have two Ethernet cards. Can you explain what the intention is with that?
HuaMin
Posts: 239
Joined: 17. Jan 2012, 07:01
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Oracle linux

Re: Connection issue

Post by HuaMin »

Hi,
There is cable line upgraded. Before this, VM is fine to get proper IP (real IP).

Issue is that no proper IP (real IP) can be assigned to VM. Vendor who did the upgrade said that all service is the same.

I now have only one Ethernet to VM below.

C:\Users\James>ipconfig

Windows IP Configuration


Ethernet adapter Ethernet:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::8d27:1d8e:8661:9033%3
Autoconfiguration IPv4 Address. . : 169.254.144.51
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :

Tunnel adapter isatap.{9BC088E2-E629-480C-8E57-822D45E9D1E7}:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Connection issue

Post by mpack »

This does not address any of the issues I raised. You can see the "169.254.xxx" address yourself. This has only one cause - no DHCP, as I said before.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Connection issue

Post by fth0 »

The host has a public IP address. You could ask your vendor how to connect more than one PC to the cable line (if you use Bridged Networking mode, you can pretend the virtual machine to be another physical PC).

As an alternative, you can use NAT or NAT Network mode.
HuaMin
Posts: 239
Joined: 17. Jan 2012, 07:01
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Oracle linux

Re: Connection issue

Post by HuaMin »

Before upgrade, it is fine to get similar IP like 2?.?.? (that is the one host is getting). Now it is not getting well allocated correct IP.

Yes, using NAT, it is fine to connect to Internet within VM.

Any change is needed on Vbox, due to this issue, regarding bridged connection, as I need IP like 2?.?.?, being assigned well to VM?
Last edited by HuaMin on 13. Aug 2021, 15:40, edited 1 time in total.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Connection issue

Post by fth0 »

Can you describe the setup without VirtualBox (Host PC <-> Cable modem <-> Cable provider <-> Internet)? How does the host PC get its IPv4 address (223.18.19.x)? Do you get one IPv4 address or an IPv4 address range from your provider?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Connection issue

Post by mpack »

If the previous cable modem worked in the exact same scenario (i.e. a VM using bridged networking), then the previous cable modem must have provided a DHCP function.

If the new cable modem is not working, but the provider says it is functionally the same, then perhaps the DHCP function simply needs to be turned on.

Question: does the cable modem have a network presence itself, or is it purely a modem?

Let's assume worst case: it's a pure modem with no routing functions (in particular, no DHCP), the host PC is configured with a static IP address given by the Internet provider. In that case IMO the most convenient solution would be to add a simple router (with DHCP server) to the network. If it was me I would get a Raspberry Pi and perhaps a simple 8 port switch. Hook the cable modem to the Raspberry Pi and assign the provided static IP to the Pi. The appropriate router software would need to be installed on the Pi, e.g. https://www.zahradnik.io/raspberry-pi-as-a-home-router.
HuaMin
Posts: 239
Joined: 17. Jan 2012, 07:01
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Oracle linux

Re: Connection issue

Post by HuaMin »

Vendor of this mentioned it (including relevant modem) is working in the same way like the past.

Using NAT, it is fine to work with other Virtualbox VM within host. Is there any other setting (related to DHCP) in Vbox to change, that I can ensure guest VM can get IP like 223.?.? ?
Last edited by HuaMin on 28. Jul 2021, 10:33, edited 1 time in total.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Connection issue

Post by scottgus1 »

HuaMin wrote:Is there any other setting (related to DHCP) in Vbox to change, that I can ensure guest VM can get IP like 223.18.?.? ?
No. On Bridged, the VM depends entirely on the physical LAN's network capabilities, not on any settings in Virtualbox.

223.18.#.# is not a private IP address, so the IP address going to your host PC is only able to go to one PC or one router. You may have had more public IPs set up in the old device, which the VM was able to access.

This is a problem with the new device, not with Virtualbox. If you can get the vendor to go through the settings one at a time between the old and new devices, they might be able to see what the new device is missing. Note the above on other public IP addresses, also Mpack's suggestion to look at DHCP in the new device.

Otherwise, the easiest solution, which will also give your LAN a lot more capability and maybe security, is to put a network router between the ISP's device and the rest of your network. Your PC and LAN will switch to private IP addresses like 192.168.1.x, and then Bridged should work just fine.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Connection issue

Post by mpack »

I'm beginning to doubt that this setup ever supported bridged networking. Surely the IT provider would know if a feature as important as routing capability had been dropped from their updated cable modem.

I think it's more likely that the OP was not using Bridged Networking in the past, so the lack of a physical DHCP server was never previously an issue.
HuaMin
Posts: 239
Joined: 17. Jan 2012, 07:01
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Oracle linux

Re: Connection issue

Post by HuaMin »

DHCP is currently supported on the modem. Can there be other reason on Win 10 host or Virtuabox?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Connection issue

Post by mpack »

The facts have already been explained above: the VM does not see any DHCP server or Internet gateway, and that is why it is currently using an autoconfig address and has no Internet access. With these facts you should be able to correctly configure the modem, and your local LAN (which includes the VM).

P.s. It is likely that your host PC is not correctly configured either. As Scott points out, it should be using a private IP address too, usually something in the 192.168.xxx.yyy range. Instead it is using a 213.xxx address which is probably the public IP address assigned to you by the Internet Provider. So it's likely that the host is also not using DHCP, it is statically assigning itself that 213.xxx address.

Finally: if the modem has a DHCP server then that means it must have a network presence too - there's no other way for the DHCP server to be discoverable. In that case I would have expected the cable modem to use the 213.xxx address to talk to the Internet, while it serves up 192.168.xxx.yyy local addresses to your LAN.

In that case, if both the host PC and the cable modem are using the assigned 213.xxx address then there's no way any of this will work.

It sounds like your setup is all messed up. I don't see how even the host can have Internet access if the network has the errors I suspect.
Post Reply