Bridged networking fails to reconnect when cable unplugged and plugged back in (#15308)

Discussions related to using VirtualBox on Windows hosts.
LeonMF
Posts: 8
Joined: 8. Jul 2015, 15:39

Bridged networking fails to reconnect when cable unplugged and plugged back in (#15308)

Post by LeonMF »


[ModEdit; related ticket: #15308: guest does not regain network connectivity if cable unplugged for for 5+ secs]
Host: Windows 10
Guest: Windows 7 (plus many others. Linux not tested)
Machine: Dell Precision 7510
Network Adapter: Intel 1219-LM
VirtualBox Version: 5.0.X (don't remember when first observed) - 5.1.6

About a year ago, me and my colleagues started noticing a problem where a bridged network connection would work fine when a VM was started but unplugging the network cable and plugging it back in would result in VirtualBox never resuming the network connection on the guest.

* Changing to a different bridged adapter (such as wireless) or a NAT adapter and then back to the original bridged adapter is enough to restore connectivity.
* Powering down the VM and restarting it does not work.
* Rebooting the VM does not work. This leads me to believe the problem is on the host side and not the guest additions.

I'm surprised that I can't seem to find anything on this because all of my engineers who are running VirtualBox are experiencing this exact same problem.

Is there anything I can try or should I submit a bug report?
Last edited by socratis on 19. Apr 2018, 21:49, edited 1 time in total.
Reason: Added ticket related information.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Bridged networking fails to reconnect when cable unplugged and plugged back in

Post by socratis »

OK, there is definitely something funky going on, I'll agree with you. I believe that the problem is that the guest does not get a "cable connected/disconnected" notification forwarded from the host. I took an interest in this, because I had a somewhat similar problem 3 years ago with VirtualBox 4.3: NAT cable_connected ignored when router goes down.

I have a MacBookPro, with both wired and wireless connections in the 10.0.0.# range. I tried several scenarios, with three guests: OSX 10.9.5, Windows 7 x86 SP1 and Linux Mint 17.3 x64. They react almost exactly the same. Whenever there are differences, they will be noted.

Just so that we keep the terminology straight, "Pull/Plug the wire" refer to the physical connection. "Connect/Disconnect the wire" refer to the VirtualBox wire. All scenarios start with both of the host and the guest plugged/connected, with no problems in communicating with each other or the Internet.
    1. Pull the wire. Guests believe they still have an IP (not good), but can't communicate (confusing).
    2. Plug the wire. Guests communicate (good).
      This is the scenario that fails in your case, but not in mine, so I can't "confirm" your findings.
    1. Pull the wire. Guests believe they still have an IP (not good), but can't communicate (confusing).
    2. Disconnect the wire. Guests have no IP (good).
    3. Connect the wire. OSX, Windows get APIPA addresses (good). Linux get zilch (implementation specific?).
    4. Plug the wire. Guests get an IP address (good).
    1. Pull the wire. Guests believe they still have an IP (not good), but can't communicate (confusing).
    2. Disconnect the wire. Guests have no IP (good).
    3. Plug the wire. Guests have no IP (good).
    4. Connect the wire. Guests get an IP address (good).
    1. Disconnect the wire. Guests have no IP (good).
    2. Pull the wire. Guests have no IP (good).
    3. Connect the wire. OSX, Windows get APIPA addresses, eventually (good). Linux get zilch (implementation specific?).
    4. Plug the wire. Guests get an IP address, eventually (good).
So, in all cases, pulling the wire (i.e. physically disconnecting the host) does not notify the guest that the host network configuration has changed, leaving the guest in limbo. That could be confusing, because from the guest's side everything looks like it's connected, yet there is no connectivity.

I'll open a ticket (if not already there) and I'll update the thread, although it might not be the same case as yours.
LeonMF wrote:unplugging the network cable and plugging it back in would result in VirtualBox never resuming the network connection on the guest
Did you give it some time? It doesn't usually happen automatically as is the case usually with the host.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
LeonMF
Posts: 8
Joined: 8. Jul 2015, 15:39

Re: Bridged networking fails to reconnect when cable unplugged and plugged back in

Post by LeonMF »

socratis wrote:
LeonMF wrote:unplugging the network cable and plugging it back in would result in VirtualBox never resuming the network connection on the guest
Did you give it some time? It doesn't usually happen automatically as is the case usually with the host.
Even long periods of time (minutes) does not resolve the situation.

Thanks for investigating on your end!
LeonMF
Posts: 8
Joined: 8. Jul 2015, 15:39

Re: Bridged networking fails to reconnect when cable unplugged and plugged back in

Post by LeonMF »

Based on the investigation above I did a test where I did a pull/plug cycle. After re-plug, trying an ipconfig /release and /renew cycle resulted in the error:

"No operation can be performed on Local Area Connection while it has its media disconnected."

I take that to mean that, on Windows 10, my host is being notified of the pull event but not the plug event.
ranchu
Posts: 11
Joined: 22. Jan 2016, 08:39

Re: Bridged networking fails to reconnect when cable unplugged and plugged back in

Post by ranchu »

[deleted]
Last edited by ranchu on 4. Dec 2016, 14:36, edited 1 time in total.
theBastian
Posts: 3
Joined: 21. Nov 2016, 13:34

Re: Bridged networking fails to reconnect when cable unplugged and plugged back in

Post by theBastian »

Same problem here. And no solution ... :(

Seems to be a problem with the Ethernet adapter Intel I219 LM.

I've the same adapter and there is a ticket.

https://www.virtualbox.org/ticket/15308
ranchu
Posts: 11
Joined: 22. Jan 2016, 08:39

Re: Bridged networking fails to reconnect when cable unplugged and plugged back in

Post by ranchu »

[deleted]
Last edited by ranchu on 4. Dec 2016, 14:36, edited 2 times in total.
theBastian
Posts: 3
Joined: 21. Nov 2016, 13:34

Re: Bridged networking fails to reconnect when cable unplugged and plugged back in

Post by theBastian »

Thank you but this mean I've to connect a switch to my notebook. That's no solution for me. :(
Last edited by socratis on 4. Dec 2016, 12:36, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Bridged networking fails to reconnect when cable unplugged and plugged back in

Post by socratis »

ranchu wrote:connect to your device using a switch in between.
I'm not quite sure I understand the workaround. Could you elaborate a little bit more? If you could describe the setup that worked for you, it could help...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
ranchu
Posts: 11
Joined: 22. Jan 2016, 08:39

Re: Bridged networking fails to reconnect when cable unplugged and plugged back in

Post by ranchu »

[deleted]
Last edited by ranchu on 4. Dec 2016, 14:36, edited 2 times in total.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Bridged networking fails to reconnect when cable unplugged and plugged back in

Post by socratis »

That's not a workaround. That's like shutting down your internet provider. The problem is that VMs do not get a notification about the cable being unplugged. In your "workaround" you didn't unplug the cable. The problem never existed.


PS. I have already told you about duplicating posts. Please do not make me repeat myself thrice. You other duplicate post has been removed.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
theBastian
Posts: 3
Joined: 21. Nov 2016, 13:34

Re: Bridged networking fails to reconnect when cable unplugged and plugged back in

Post by theBastian »

Still doesn't work with the latest version 5.1.12.

Updated the ticket with a new log file.

https://www.virtualbox.org/ticket/15308
GilP
Posts: 1
Joined: 6. Oct 2019, 20:37

Re: Bridged networking fails to reconnect when cable unplugged and plugged back in (#15308)

Post by GilP »

Hi

I still encounter this issue in 6.0.10, has anyone found a solution for this issue?
My spec is Host Win10 1903 and guest CentOS 7.6.

Thanks!
Gil
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Bridged networking fails to reconnect when cable unplugged and plugged back in (#15308)

Post by socratis »

GilP wrote:has anyone found a solution for this issue?
Don't you think that someone would have posted the solution if the solution was found? I know I would have... ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
menacek04
Posts: 1
Joined: 12. Sep 2020, 20:22

Re: Bridged networking fails to reconnect when cable unplugged and plugged back in (#15308)

Post by menacek04 »

Please..... For the love of <whomever you worship>, does ANYONE have any fix or workaround for this?
Locked