[WorksForMe] Bridged Connection not working for PCI-e ethernet port

Discussions about using Linux guests in VirtualBox.
Post Reply
petrock
Posts: 7
Joined: 9. Oct 2018, 23:37

[WorksForMe] Bridged Connection not working for PCI-e ethernet port

Post by petrock »

Hi,

I'm using a Windows 10 host, using Virtualbox (ver 5.2.18 r124319) to run a linux guest (both 64-bit) for GNS3. I managed to get a bridged connection going with the built-in Ethernet adapter (Intel(R) 82579LM Gigabit Network Connection) on my Windows 10 computer.
Vboxadapter1.PNG
Vboxadapter1.PNG (86.94 KiB) Viewed 4764 times
However, I tried to set up a second bridged connection with a PCI-e Ethernet adapter (TP-Link Gigabit PCI Express Adapter) following the same steps, but this one can't connect the same way.
Vboxadapter2.PNG
Vboxadapter2.PNG (87.87 KiB) Viewed 4764 times
Note that on my Windows 10 host I was able to use that Ethernet adapter to ping things, but on the linux guest it can't. When I use the ifconfig command on the VM, it shows that the adapter is not up and running.
ifconfig.PNG
ifconfig.PNG (14.78 KiB) Viewed 4764 times
Let me know if there's any other useful information to post.
Last edited by socratis on 15. Oct 2018, 16:17, edited 1 time in total.
Reason: Marked as [WorksForMe].
socratis
Site Moderator
Posts: 27329
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 Connection not working for PCI-e ethernet port

Post by socratis »

From the host's Network and Sharing Center, Change Adapter Settings, pick the TP-Link Gigabit PCI Express Adapter, right-click, Properties. Do you see the "VirtualBox NDIS6 Bridged Networking Driver" there? Is it enabled?
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.
petrock
Posts: 7
Joined: 9. Oct 2018, 23:37

Re: Bridged Connection not working for PCI-e ethernet port

Post by petrock »

Hi,

Thanks for the reply. I did have it enabled. Tried disabling then enabling too, though it didn't help.
winadapter.PNG
winadapter.PNG (19.12 KiB) Viewed 4758 times
All the other checkboxes seem identical to that of the adapter that I do have working.
socratis
Site Moderator
Posts: 27329
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 Connection not working for PCI-e ethernet port

Post by socratis »

  1. Uninstall VirtualBox. Your VMs are going to be untouched. Reboot.
  2. You may want to clean up your registry and/or filesystem at this point. CCleaner is a freeware utility that could help you. Mind the installation, it comes with "offers" from 3rd parties, known as "bundleware". Also, check out Device Cleanup program that helps you to remove any unused devices from your computer, mainly multiple "Host-Only Adapter #n".
  3. Download (if you haven't already) the latest VirtualBox and its matching ExtPack. Store them in a common location, i.e. not on "Desktop", or "Documents", but to "Public/Downloads" for example.
  4. Uninstall (don't simply disable) all 3rd party antivirus. If you're afraid about your computer being vulnerable, pull the Ethernet plug, disconnect your WiFi, don't go browsing around.
  5. Locate the downloaded file in Windows Explorer. Right-click on the installer and select "Run-as-Administrator", even if you are the administrator. At the end of the installation, choose to "Start Oracle VM VirtualBox". Do not worry if your VMs do not show up.
  6. If you're going to install the ExtPack, go to File » Preferences » Extensions. Click on the icon with the orange, down-pointing arrow on the right. Select the ExtPack from the previous steps.
  7. Quit VirtualBox. Re-start VirtualBox as you would normally, i.e. from the Desktop shortcut or the Start menu.
  8. Update the Guest Additions (GAs) in your guest(s), if the GAs are available for a specific guest.
Please pay special attention to steps #4, 5.
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.
petrock
Posts: 7
Joined: 9. Oct 2018, 23:37

Re: Bridged Connection not working for PCI-e ethernet port

Post by petrock »

Hi,

Thanks. Unfortunately, it didn't seem to make a difference. Note that I didn't do anything with the registry / file cleanup, and I don't have any 3rd party antivirus.

I'm kind of new to this stuff, so maybe I'm completely wrong, but is it possible for the adapter type (Intel PRO / 1000 MT Desktop) to not work with the network adapter (TP Link)? I noticed that the adapter that does work happens to be an Intel Ethernet Adapter, so I wasn't sure if it was coincidence or not that it happened to work while the TP Link one does not.
socratis
Site Moderator
Posts: 27329
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 Connection not working for PCI-e ethernet port

Post by socratis »

petrock wrote:is it possible for the adapter type (Intel PRO / 1000 MT Desktop) to not work with the network adapter (TP Link)?
No, nothing to do with the underlying hardware, VirtualBox doesn't deal at the low-level that differentiates the hardware.

I'm thinking guest configuration. Here's what I want you to do; shutdown the VM. Switch adapter #3 from the Intel card to the TPLink one. Disable the 4th adapter. See what happens...
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.
petrock
Posts: 7
Joined: 9. Oct 2018, 23:37

Re: Bridged Connection not working for PCI-e ethernet port

Post by petrock »

Thanks, seems that you're right. Switching the adapters has the TP-Link one able to connect while the Intel one cannot.
socratis
Site Moderator
Posts: 27329
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 Connection not working for PCI-e ethernet port

Post by socratis »

Then I'd switch the focus from VirtualBox to your guest's configuration. A LOT of OSes (and don't ask me why, I have no clue) have to be specifically told to activate a network connection. They come up as deactivated by default...
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.
petrock
Posts: 7
Joined: 9. Oct 2018, 23:37

Re: Bridged Connection not working for PCI-e ethernet port

Post by petrock »

Thanks, using the command "sudo ifconfig eth3 up" seemed to get it up and running.

Do you happen to know if there's a way to save it in some settings or something like that? The GNS3 software that uses the VM seems to automatically open/close it without the state saved from what I can tell. So right now every time it boots up I have to run that command.
socratis
Site Moderator
Posts: 27329
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 Connection not working for PCI-e ethernet port

Post by socratis »

petrock wrote:Do you happen to know if there's a way to save it in some settings or something like that?
Not from the command line, no, sorry. But I'm sure a quick search will show you the way... ;)
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.
petrock
Posts: 7
Joined: 9. Oct 2018, 23:37

Re: Bridged Connection not working for PCI-e ethernet port

Post by petrock »

Sorry, I looked around a bit but so far couldn't find something, though I admit I'm a newbie when it comes to Virtualbox and command line stuff, especially Linux ones, so I might have just messed something up. I'm basically trying to run automated scripts using the command line once the VM is set up, so solutions that have any sort of UI don't work how I'd like. For example, I tried making a script that would use plink to ssh into the VM, but I think it messes up due to the UI (on my command prompt a bunch of weird symbols show up).

From what I've seen, the Virtualbox GUI didn't seem to have any options for this. With the Cisco router I've been testing with help from the VM, I can do the command 'copy running-config startup-config' once, and after that it always starts up the same way with things like IP addresses configured and everything up and running, but I'm not sure if a similar command exists for Virtualbox/Linux?

My issue so far is that GNS3 automatically opens / closes the VM when it starts/ends, so some of the commands I've been looking at might have issues if they need the VM offline, and I can't manually choose the option to save state. I'm also not entirely sure if it would be best for me to be somehow automatically saving the VM's state (so once I manually set them up I don't have to type those commands again), or if it would be better to have a script of some sort that would automatically run and modify the VM when it starts.

Thanks, and sorry for the trouble.
socratis
Site Moderator
Posts: 27329
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 Connection not working for PCI-e ethernet port

Post by socratis »

VirtualBox (and it relevant command line options) control the hardware. You have a software configuration problem with your Linux guest, not a VirtualBox problem. Treat it a such.

From the GUI it looks like that: https://askubuntu.com/questions/516406/ ... fter-login . You got to find the relevant command line option and/or config file changes that correspond to these settings.
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.
petrock
Posts: 7
Joined: 9. Oct 2018, 23:37

Re: Bridged Connection not working for PCI-e ethernet port

Post by petrock »

Oops, sorry. For some reason I thought Virtualbox was closing things / not remembering settings when in reality it's just that 'ifconfig up' doesn't persist after shutdown. https://ubuntuforums.org/showthread.php?t=1275766

I was able to get it working by modifying things in etc/network/interfaces like mentioned in the link.
socratis
Site Moderator
Posts: 27329
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 Connection not working for PCI-e ethernet port

Post by socratis »

petrock wrote:For some reason I thought Virtualbox was closing things / not remembering settings
You're not alone, everybody and their siblings thinks that it's VirtualBox's fault! It's always VirtualBox's fault! :D
petrock wrote:I was able to get it working
Glad you got it going. Marking as [WorksForMe].
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.
Post Reply