What does "Cable connected" checkbox change?

Discussions about using Linux guests in VirtualBox.
Post Reply
whit
Posts: 27
Joined: 20. Mar 2010, 20:39
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 10.04

What does "Cable connected" checkbox change?

Post by whit »

Running Ubuntu 10.04 as a guest on Windows 7 Starter, it's mostly looking very good (after a patch to build the modules, and some xorg.conf stuff). But the networking still has a glitch or two. From trial and error here's where I am:

The host is a netbook connected by wireless. Setting the guest to NAT largely worked, except that some specific web pages will not load. The sites generally are fine, it's specific to certain locations within them. Maybe it's some sort of problem because the LAN itself is within another NAT? Anyway, that problem doesn't occur if I go to Bridged Adapter but

The "Bridged Adapter" setup only works if "Cable connected" is checked. Otherwise DHCP doesn't do its tricks, whether invoked by dhclient or by

Code: Select all

auto eth1
iface eth1 inet dhcp
in /etc/network/interfaces and then, as is occasionally required, "ifdown eth1;ifup eth1" to restore the leased connection. That's required when moving to a different wireless router, or after system inactivity, or when it's just gone away - which happens once in a while for some reason. (Why?)

What I haven't found documented is what that "Cable connected" checkbox is actually changing - what's the back-end behavior it switches? In my instance it needs to be checked in order for DHCP to work, and for the guest to connect in bridged mode, even though it's a wireless connection (no cable). On the other hand, the adapter being used is "Atheros AR2427 Wireless Network Adapter," so this is a checkbox that can be applied or not when VB knows the connection is wireless.

What is it supposed to do? If I'm using it wrong - as the best way I've found to get things to work - is there a right way I haven't found yet?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: What does "Cable connected" checkbox change?

Post by vbox4me2 »

Exactly what the option implies, LAN cable connected or not.
whit
Posts: 27
Joined: 20. Mar 2010, 20:39
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 10.04

Re: What does "Cable connected" checkbox change?

Post by whit »

vbox4me2 wrote:Exactly what the option implies, LAN cable connected or not.
Right. That's the obvious assumption. But then why does it need to be checked, when the connection is wireless (no LAN cable), in order for DHCP to work? Does a wireless connection, in this context, count as a sort of "cable"? If a wireless connection is also a "cable," the option's label isn't a clear as it might be.

And please, what exactly does the "Cable connected" checkbox change in terms of what is turned off and on in the settings within VB itself? What exactly should behave differently? Given the "Internal Network," and "Host-only Adapter" settings - which are appropriate for communications from the guest being limited so as not to go out over a cable (or wireless adapter) - is there a setup for which the preferred solution is to have "Bridged Adapter" with an unchecked "Cable connected"? Or is it just a legacy from before the other options were added?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: What does "Cable connected" checkbox change?

Post by vbox4me2 »

You are confusing yourself with the LAN connection on the Host and a Guest, they are not the same, a Guest LAN is emulated with also a emulated connected cable. What is really connected on the Host side is something a Guest will never see, wireless or otherwise.
whit
Posts: 27
Joined: 20. Mar 2010, 20:39
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 10.04

Re: What does "Cable connected" checkbox change?

Post by whit »

vbox4me2 wrote:You are confusing yourself with the LAN connection on the Host and a Guest, they are not the same, a Guest LAN is emulated with also a emulated connected cable. What is really connected on the Host side is something a Guest will never see, wireless or otherwise.
Beg to differ I'm not confusing myself. The words next to the checkbox are what are confusing. When the guest's interface is in bridged mode what it is bridged to is the actual adapter. It acquires its MAC address, with its own IP on the machine's physical interface. What's confusing you is you're thinking in a NAT context. With bridging, it's the real thing - whatever code VB is interposing notwithstanding. From the arp table from my Linux router:

Code: Select all

192.168.2.85             ether   00:25:d3:d5:72:c4   C                     eth0
192.168.2.84             ether   00:25:d3:d5:72:c4   C                     eth0
That first IP is the guest, the second is the host, and both are just as real in terms of the NIC and routing. This is not merely some internal emulation on the host. It's fully real on the network level.

Getting back to the question: If the point of the checkbox is to be able to emulate unplugging a cable (and with a wireless connection evidently counting somewhat nonsensically as a "cable" here), then what is the utility of emulating a bridged interface with the cable unplugged? If you don't know, that's fine. Hopefully someone who does can address this.
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: What does "Cable connected" checkbox change?

Post by vbox4me2 »

When you bridge wifi, does the Guest see a wifi adapter? nope it doesn't, so you not 'as fully' connected as you think.
rgfuller
Posts: 1
Joined: 21. Nov 2013, 00:01

Re: What does "Cable connected" checkbox change?

Post by rgfuller »

I would really appreciate a more detailed answer to wits question. I have to check this box to get NAT to even connect, even when the host is wireless only. What does this box do? Why do I need to check it to get NAT to connect when my host is wireless?
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: What does "Cable connected" checkbox change?

Post by socratis »

Cable-connected means that you enable/disable the "physical" connection, be it wired or wireless. Like connecting/disconnecting a physical cable on a NIC card, or pulling the plug on your wireless router. It hoes nothing to do with a "cable", rather than "Is there anyone at the end of my connection?" kind of thing...
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.
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all
Contact:

Re: What does "Cable connected" checkbox change?

Post by michaln »

rgfuller wrote:What does this box do? Why do I need to check it to get NAT to connect when my host is wireless?
What the box does is control whether the emulated NIC is reporting that a link is established or not.

You have to imagine that there's a cable between the emulated NIC that a guest OS sees and a NAT "router", a bridged adapter, or any other connection. The imaginary cable can always be plugged or unplugged independent of what's on the other end. This is very similar to having an Ethernet bridge which is "invisible" (has no IP address of its own) but is still connected with a cable that can be plugged in or not.

Unplugging and re-plugging the virtual cable is most commonly used to force a guest OS to rediscover the network environment (typically re-request a DHCP lease). Whether the host is wired, wireless, or has no networking capabilities at all is not relevant.
squall leonhart
Posts: 312
Joined: 21. Apr 2010, 10:39
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP, 8, 10, Android x86

Re: What does "Cable connected" checkbox change?

Post by squall leonhart »

amusingly this checkbox is broken on virtio under Vbox 5.0.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: What does "Cable connected" checkbox change?

Post by mpack »

Why post that into a dead topic? A BugTracker ticket would strike me as a more useful contribution.
Post Reply