Bridged network not working correctly

Discussions about using Windows guests in VirtualBox.

Bridged network not working correctly

Postby Elylia » 25. Jan 2022, 20:39

I run Win10 guest VMs. My host is Win10. I have been having issues pinging IP addresses on my bridged network. I need a solution that makes the bridged connection work 100% of the time like it did on my old Win7 VMs on my Win7 host.

Most of the posts on the forums speak of issues and solutions for pinging the host IP address <> guest IP addresses but I don't want to do that. The address I need to ping is on the same network as the host.

This happens in all my windows 10 VMs on this Laptop. I can sometimes get it to work if I reset my network adaptors over and over again in my host and/or my guest. The host never has an issue returning the ping. Sometimes it will work first try and then the issue only happens if I remove the Ethernet cable and try plugging it in again.

I never have to change the settings to get the guest to start working but I do have to restart the VM or disable/enable the network adaptors a bunch of times before it will start to work again. I have no issues when I use NAT and the internet but the bridged connections have been giving me no end of issues. Sometimes rebooting my entire laptop fixes the issue. Somedays the issue never even happens.

All the firewalls inside the VM are disabled.

I have tried on a bunch of networks and the issue is the same. I have even tried removing the network then putting it back no change.

When I run "ping 192.168.125.1 -t" in the host and guest at the same time and plug in the cable I see the host ping start to work almost right away but the guest ping just returns host unreachable.

Host IP address is 192.168.125.159
Host mask is 255.255.255.0
Wired connection

Guest IP address is 192.168.125.10
Guest mask is 255.255.255.0

The address of the device I ping is 192.168.125.1
They host has no issue pinging this address.

This is the WireShark log from guest while trying to ping 192.168.125.1
Code: Select all   Expand viewCollapse view
1   0.000000   PcsCompu_58:c4:30   Broadcast   ARP   42   Who has 192.168.125.1? Tell 192.168.125.10
2   0.870551   PcsCompu_58:c4:30   Broadcast   ARP   42   Who has 192.168.125.1? Tell 192.168.125.10
3   1.874551   PcsCompu_58:c4:30   Broadcast   ARP   42   Who has 192.168.125.1? Tell 192.168.125.10
4   2.860227   PcsCompu_58:c4:30   Broadcast   ARP   42   Who has 192.168.125.1? Tell 192.168.125.10
5   3.854184   PcsCompu_58:c4:30   Broadcast   ARP   42   Who has 192.168.125.1? Tell 192.168.125.10
6   4.891351   PcsCompu_58:c4:30   Broadcast   ARP   42   Who has 192.168.125.1? Tell 192.168.125.10
7   5.874348   PcsCompu_58:c4:30   Broadcast   ARP   42   Who has 192.168.125.1? Tell 192.168.125.10
8   6.866364   PcsCompu_58:c4:30   Broadcast   ARP   42   Who has 192.168.125.1? Tell 192.168.125.10
9   7.868987   PcsCompu_58:c4:30   Broadcast   ARP   42   Who has 192.168.125.1? Tell 192.168.125.10
10   8.865588   PcsCompu_58:c4:30   Broadcast   ARP   42   Who has 192.168.125.1? Tell 192.168.125.10
11   9.854070   PcsCompu_58:c4:30   Broadcast   ARP   42   Who has 192.168.125.1? Tell 192.168.125.10
12   10.865268   PcsCompu_58:c4:30   Broadcast   ARP   42   Who has 192.168.125.1? Tell 192.168.125.10


Here is the ipconfig /all from the guest
Code: Select all   Expand viewCollapse view
C:\Users\WIN10>ping 192.168.125.1

Pinging 192.168.125.1 with 32 bytes of data:
Reply from 192.168.125.10: Destination host unreachable.
Reply from 192.168.125.10: Destination host unreachable.
Reply from 192.168.125.10: Destination host unreachable.
Reply from 192.168.125.10: Destination host unreachable.

Ping statistics for 192.168.125.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

C:\Users\WIN10>ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : WIN10-ABB-VM
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Ethernet 3:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Desktop Adapter #3
   Physical Address. . . . . . . . . : 08-00-27-58-C4-30
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::7576:9093:f556:515b%16(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.125.10(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 268959783
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-29-81-E3-DF-08-00-27-2A-FE-77
   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1
   NetBIOS over Tcpip. . . . . . . . : Enabled


This is the ipconfig all of the host
Code: Select all   Expand viewCollapse view
Pinging 192.168.125.1 with 32 bytes of data:
Reply from 192.168.125.1: bytes=32 time<1ms TTL=64
Reply from 192.168.125.1: bytes=32 time<1ms TTL=64
Reply from 192.168.125.1: bytes=32 time<1ms TTL=64
Reply from 192.168.125.1: bytes=32 time<1ms TTL=64

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

C:\Users\NAME>ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : LAPTOP-2DBJJBS0
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

Mobile Broadband adapter Cellular:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Generic Mobile Broadband Adapter
   Physical Address. . . . . . . . . : REMOVED
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) Ethernet Connection (11) I219-LM
   Physical Address. . . . . . . . . : 54-05-DB REMOVED
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 192.168.125.159(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter VirtualBox Host-Only Network:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter
   Physical Address. . . . . . . . . : 0A-00-27-00-00-13
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::c52b:eba2:7e51:4d69%19(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.56.102(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : January 25, 2022 12:18:00 PM
   Lease Expires . . . . . . . . . . : January 25, 2022 1:02:59 PM
   Default Gateway . . . . . . . . . :
   DHCP Server . . . . . . . . . . . : 192.168.56.100
   DHCPv6 IAID . . . . . . . . . . . : 1007288359
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-27-88-1E-83-54-05-DB-3A-D6-9F
   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Wireless LAN adapter Local Area Connection* 1:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter
   Physical Address. . . . . . . . . : 98-8D-46-REMOVED
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Local Area Connection* 2:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter #2
   Physical Address. . . . . . . . . : 9A-8D-46-REMOVED
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Wi-Fi:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) Wi-Fi 6 AX201 160MHz
   Physical Address. . . . . . . . . : 98-8D-46-REMOVED
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 10.1.2.140(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Lease Obtained. . . . . . . . . . : January 24, 2022 8:44:18 AM
   Lease Expires . . . . . . . . . . : January 26, 2022 7:57:12 AM
   Default Gateway . . . . . . . . . : 10.1.1.1
   DHCP Server . . . . . . . . . . . : 10.1.1.1
   DNS Servers . . . . . . . . . . . : 10.1.1.11
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter Bluetooth Network Connection:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Bluetooth Device (Personal Area Network)
   Physical Address. . . . . . . . . : 98-8D-46-REMOVED
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes


This is my Host WireShark while running the ping on 192.168.125.1
Code: Select all   Expand viewCollapse view
1   0.000000   192.168.126.10   192.168.126.255   UDP   60   5513 → 5512 Len=13
3   0.015186   192.168.125.159   192.168.125.1   ICMP   74   Echo (ping) request  id=0x0001, seq=9635/41765, ttl=128 (reply in 4)
4   0.015800   192.168.125.1   192.168.125.159   ICMP   74   Echo (ping) reply    id=0x0001, seq=9635/41765, ttl=64 (request in 3)
5   1.017822   192.168.125.159   192.168.125.1   ICMP   74   Echo (ping) request  id=0x0001, seq=9636/42021, ttl=128 (reply in 6)
6   1.018674   192.168.125.1   192.168.125.159   ICMP   74   Echo (ping) reply    id=0x0001, seq=9636/42021, ttl=64 (request in 5)
7   2.023057   192.168.125.159   192.168.125.1   ICMP   74   Echo (ping) request  id=0x0001, seq=9637/42277, ttl=128 (reply in 8)
8   2.023937   192.168.125.1   192.168.125.159   ICMP   74   Echo (ping) reply    id=0x0001, seq=9637/42277, ttl=64 (request in 7)
9   2.484589   192.168.125.159   224.0.0.22   IGMPv3   54   Membership Report / Leave group 224.0.0.252
10   2.491774   192.168.125.159   224.0.0.22   IGMPv3   54   Membership Report / Join group 224.0.0.252 for any sources
11   2.491929   192.168.125.159   224.0.0.22   IGMPv3   54   Membership Report / Leave group 224.0.0.252
12   2.492028   192.168.125.159   224.0.0.22   IGMPv3   54   Membership Report / Join group 224.0.0.252 for any sources
13   2.492448   192.168.125.159   224.0.0.251   MDNS   81   Standard query 0x0000 ANY LAPTOP-2DBJJBS0.local, "QM" question
14   2.492908   192.168.125.159   224.0.0.251   MDNS   91   Standard query response 0x0000 A 192.168.125.159
15   2.493050   192.168.125.159   224.0.0.251   MDNS   81   Standard query 0x0000 ANY LAPTOP-2DBJJBS0.local, "QM" question
16   2.493383   192.168.125.159   224.0.0.252   LLMNR   75   Standard query 0x75cd ANY LAPTOP-2DBJJBS0
17   2.493681   192.168.125.159   224.0.0.251   MDNS   91   Standard query response 0x0000 A 192.168.125.159
18   2.586358   192.168.125.159   224.0.0.251   MDNS   108   Standard query response 0x0000 A, cache flush 192.168.125.159 NSEC, cache flush LAPTOP-2DBJJBS0.local
19   2.938126   192.168.125.159   224.0.0.22   IGMPv3   54   Membership Report / Join group 224.0.0.252 for any sources
20   3.030590   192.168.125.159   192.168.125.1   ICMP   74   Echo (ping) request  id=0x0001, seq=9638/42533, ttl=128 (reply in 21)
21   3.031431   192.168.125.1   192.168.125.159   ICMP   74   Echo (ping) reply    id=0x0001, seq=9638/42533, ttl=64 (request in 20)
22   4.266996   192.168.126.10   192.168.126.255   UDP   60   5513 → 5512 Len=13
24   8.534725   192.168.126.10   192.168.126.255   UDP   60   5513 → 5512 Len=13
26   12.803154   192.168.126.10   192.168.126.255   UDP   60   5513 → 5512 Len=13
28   17.070833   192.168.126.10   192.168.126.255   UDP   60   5513 → 5512 Len=13
30   21.339036   192.168.126.10   192.168.126.255   UDP   60   5513 → 5512 Len=13


This picture shows the network setup the VM is using.
Attachments
Capture1.PNG
VM Network Setup
Capture1.PNG (27.26 KiB) Viewed 2403 times
Elylia
 
Posts: 4
Joined: 25. Jan 2022, 19:31

Re: Bridged network not working correctly

Postby mpack » 26. Jan 2022, 10:19

Elylia wrote:Guest IP address is 192.168.125.10
...
The address of the device I ping is 192.168.125.1
...
Code: Select all   Expand viewCollapse view
C:\Users\WIN10>ping 192.168.125.1

Pinging 192.168.125.1 with 32 bytes of data:
Reply from 192.168.125.10: Destination host unreachable.
Reply from 192.168.125.10: Destination host unreachable.
Reply from 192.168.125.10: Destination host unreachable.
Reply from 192.168.125.10: Destination host unreachable.


It's odd that when you ping .1 you get a response saying that .10 is unreachable, .10 being the guest itself according to the above info.

As far as I'm aware, based on all the years I've been using VirtualBox, bridged networking is completely reliable if it works at all. I.e. either your host NIC allows bridging or it doesn't. If bridging is allowed then the bridged mode will work and and further problems you have are due to config errors in the guest.

And that's what it looks like here: at first glance it looks like you have configured the guest to be it's own gateway, which is unlikely to work.

Is there a DHCP server and a router on this host network?
mpack
Site Moderator
 
Posts: 36109
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Bridged network not working correctly

Postby Elylia » 26. Jan 2022, 20:48

mpack wrote:It's odd that when you ping .1 you get a response saying that .10 is unreachable, .10 being the guest itself according to the above info.

As far as I'm aware, based on all the years I've been using VirtualBox, bridged networking is completely reliable if it works at all. I.e. either your host NIC allows bridging or it doesn't. If bridging is allowed then the bridged mode will work and and further problems you have are due to config errors in the guest.

And that's what it looks like here: at first glance it looks like you have configured the guest to be it's own gateway, which is unlikely to work.

Is there are DHCP server and a router on this host network?


I think the static IP address is always the one that will give the return message if the item you Ping isn't reachable. I have no gateways configured in the Host or Guest.

No DHCP.

Bridging has never giving me issues ether in all the years I've used it. Bridging normally works quite nicely. It's only since I made all new Win10 VMs to replace my Win7 VMs and started using them daily that I have see this issue start to crop up.

After I posted I restarted my entire laptop again and it started working for the rest of the day. It seems like some how the bridging may be breaking at some point during my use. Sometimes when I disable and reenabled the network adaptors the issue goes away. If that fails a total reset normally gets it going again. I started it up this morning again with the same setup and it has been working fine with no issue. I have even unplugged the Ethernet cable a few times without issue. I will keep WireShark running each time I start the VM and maybe I can catch it in the act when it stops working.
Elylia
 
Posts: 4
Joined: 25. Jan 2022, 19:31

Re: Bridged network not working correctly

Postby mpack » 27. Jan 2022, 10:59

Elylia wrote:After I posted I restarted my entire laptop again and it started working for the rest of the day.

IMO that is a symptom of an address conflict. I.e. some other device using the same IP address or MAC.

I think you need to stop thinking "bridging bug!" and start thinking about the configuration of your network.
mpack
Site Moderator
 
Posts: 36109
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Bridged network not working correctly

Postby fth0 » 27. Jan 2022, 14:14

FWIW, some university and company networks allow only one MAC address per Ethernet port, and ignore Ethernet frames sent from a second Ethernet MAC address.

In your situation, that could be very well be the case, because the ARP requests are being ignored already. When pinging from the guest, use Wireshark on the host (!) to see if the ARP requests are sent and no ARP replies are received from the Ethernet.
fth0
Volunteer
 
Posts: 3254
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...

Re: Bridged network not working correctly

Postby mpack » 27. Jan 2022, 15:29

fth0 wrote:FWIW, some university and company networks allow only one MAC address per Ethernet port, and ignore Ethernet frames sent from a second Ethernet MAC address.

The Ethernet standard supports multidrop transmission lines, and that policy would also prevent the use of common Ethernet switches. That doesn't mean you're wrong, but I'd find it a surprising limitation. I don't know how an Ethernet port on a Uni server would even know how the adjoining LAN is cabled, unless you're saying that every MAC has to be whitelisted.

One MAC address per Wi-Fi connection, I could believe that.
mpack
Site Moderator
 
Posts: 36109
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Bridged network not working correctly

Postby fth0 » 28. Jan 2022, 00:48

There can be different reasons for the limitation. Two examples:

Security: In a large company with many small offices, you'll often find large central switches, Ethernet cables in/on the ceilings/walls, and one Ethernet socket for each device, especially if each employee is supposed to have only one PC. For security, you use whitelisting or 802.11x user authentication (*). Whitelisting can lead to higher maintenance costs if devices are often replaced, 802.11x if employees are often replaced. ;)

Bandwidth costs: Some universities provide their students with inexpensive Internet access in student residences under an agreement to only connect one device to the Ethernet socket, to prevent the students from sharing the Internet access (and costs) with their neighbors. Whitelisting is no option because of the maintenance burden, so they simply allow only one MAC address at a time.

On the technical side, most professional switches provide this functionality, usually under the term Port Security.

(*) BTW, whitelisting only stops novices and honest people. ;)
fth0
Volunteer
 
Posts: 3254
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...

Re: Bridged network not working correctly

Postby mpack » 28. Jan 2022, 11:06

fth0 wrote:On the technical side, most professional switches provide this functionality, usually under the term Port Security.

That still makes no sense to me. A switch that prevents the use of switches? Nope. Like I said above, I'm aware that whitelisting is a common security feature and I'm also pretty sure it's what "Port Security" means.
mpack
Site Moderator
 
Posts: 36109
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Bridged network not working correctly

Postby fth0 » 28. Jan 2022, 15:00

mpack wrote:I'm aware that whitelisting is a common security feature and I'm also pretty sure it's what "Port Security" means.

Whitelisting is one prominent aspect of Port Security. If you want to read about more details for yourself, google for "Configuring Port Security - Cisco". This document also details the variant of only limiting the number of MAC addresses for a switch port.
fth0
Volunteer
 
Posts: 3254
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...

Re: Bridged network not working correctly

Postby Elylia » 1. Feb 2022, 17:36

fth0 wrote:FWIW, some university and company networks allow only one MAC address per Ethernet port, and ignore Ethernet frames sent from a second Ethernet MAC address.

In your situation, that could be very well be the case, because the ARP requests are being ignored already. When pinging from the guest, use Wireshark on the host (!) to see if the ARP requests are sent and no ARP replies are received from the Ethernet.


All of my VM network adaptors have random and different MAC addresses from each other and the host.
Elylia
 
Posts: 4
Joined: 25. Jan 2022, 19:31

Re: Bridged network not working correctly

Postby scottgus1 » 1. Feb 2022, 18:19

Elylia wrote:All of my VM network adaptors have random and different MAC addresses from each other and the host.

Good. But what about the rest of the LAN? Is this your LAN in your house with your network router controlling it? Or is this a corporate or university LAN that you're connecting your host to?
scottgus1
Site Moderator
 
Posts: 15382
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Bridged network not working correctly

Postby Elylia » 7. Feb 2022, 18:53

scottgus1 wrote:
Elylia wrote:All of my VM network adaptors have random and different MAC addresses from each other and the host.

Good. But what about the rest of the LAN? Is this your LAN in your house with your network router controlling it? Or is this a corporate or university LAN that you're connecting your host to?


This LAN only has my laptop and the PLC or ROBOT on it. No routers and only unmanaged switches. Every device is static IP with unique MAC IDs.
Elylia
 
Posts: 4
Joined: 25. Jan 2022, 19:31


Return to Windows Guests

Who is online

Users browsing this forum: No registered users and 6 guests