Page 1 of 1

SOLVED Virtualbox Bridged network ethernet cable disconnect

Posted: 11. Jul 2014, 00:57
by ironhyde
I’m trying to connect to a ethernet device (like a scanner/printer) to a guest Ubuntu 12.04 running on Virtualbox 4.3.12. The scanner is connected to the Mac Pro directly over ethernet cable.
Problems faced:
1) The ethernet connection gets disconnected and the ip needs to be set again to reconnect.
2) How to permanently set a static ip to the bridge adaptor connection?
System:
Host: Mac Pro running OS X 10.9.3
Guest: Ubuntu 12.04 32­bit
Virtualbox settings: Bridged adaptor
Device connected on ethernet (scanner) demands:
the network settings of the Ethernet adapter set from automatic IP address to manual IP address selection with:
IP address: 192.168.1.X (here X can be 0 to 100)
Subnet Mask: 255.255.255.0

In terminal (***TERMINAL_STATE 0***):
____________________________________________________________________

Code: Select all

viki@c3po:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:b3:ed:c7  
          inet6 addr: fe80::a00:27ff:feb3:edc7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4195220 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1800 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:651884753 (651.8 MB)  TX bytes:381818 (381.8 KB)
____________________________________________________________________
NOTE: There is no IP address in the line after eth0 . Why?

Later in terminal (***TERMINAL_STATE 1***):
____________________________________________________________________

Code: Select all

viki@c3po:~$ sudo ifconfig eth0 192.168.1.1
viki@c3po:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:b3:ed:c7
[color=#FF0000]inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0[/color] inet6 addr: fe80::a00:27ff:feb3:edc7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2540914 errors:0 dropped:0 overruns:0 frame:0
TX packets:1454 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:2995685395 (2.9 GB) TX bytes:308913 (308.9 KB)
____________________________________________________________________
At this point, the ubuntu wireless network icon is passive (looks like a sector of a circle)
Within a minute or two, the wireless network icon starts blinking (the sector has waves in it)

Finally, in a few seconds, I get a warning Wired Network Disconnected - You are now offline : see attachement IMG_AFTER_DISCONNECT


Now if I do a ifconfig, I get same response as ***TERMINAL_STATE 0*** mentioned earlier.

Later, if I set the ip again using sudo ifconfig eth0 192.168.1.1 the I get reconnected.

Some system setting screenshots:
1) Ethernet settings on the MAC Pro:
See attachement MAC_PRO_ETHERNET

2) Virtualbox Network (bridge adaptor) settings
See attachement VIRTUALBOX_BRIDGE_NETWORK

Re: Virtualbox Bridged network ethernet cable disconnecting

Posted: 11. Jul 2014, 01:49
by Perryg
IP address: 192.168.1.X (here X can be 0 to 100)
Gateway: 255.255.255.0
Was this a typo? Did you mean subnet mask instead of gateway?

Post the complete results of ifconfig -a
and
lspci

Re: Virtualbox Bridged network ethernet cable disconnecting

Posted: 11. Jul 2014, 07:23
by ironhyde
Perryg wrote:
IP address: 192.168.1.X (here X can be 0 to 100)
Gateway: 255.255.255.0
Was this a typo? Did you mean subnet mask instead of gateway?

Post the complete results of ifconfig -a
and
lspci
Typo corrected.

Re: Virtualbox Bridged network ethernet cable disconnecting

Posted: 11. Jul 2014, 09:34
by noteirak
Please attach as zip the VM log file for a session where you produce the problem.

Re: Virtualbox Bridged network ethernet cable disconnecting

Posted: 11. Jul 2014, 18:46
by ironhyde
update (PROBLEM SOLVED) from my side:
If you see the MAC_PRO_ETHERNET pic that I've attached in my main post above, there is a wifi connected to my MAC.
I disconnected the wifi by disabling wireless on my MAC OS.
I started the VM: guest Ubuntu.
In the terminal:

Code: Select all

viki@c3po:~$ sudo ifconfig -a
[sudo] password for viki: 
eth0      Link encap:Ethernet  HWaddr 08:00:27:b3:ed:c7  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
(NOTE: compare above terminal response to ***TERMINAL_STATE 0*** in the main post. )

Code: Select all

viki@c3po:~$ sudo ifconfig eth0 192.168.3.100
viki@c3po:~$ sudo ifconfig -a
eth0      Link encap:Ethernet  HWaddr 08:00:27:b3:ed:c7  
          inet addr:192.168.3.100  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:feb3:edc7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:46824 errors:0 dropped:0 overruns:0 frame:0
          TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:54863764 (54.8 MB)  TX bytes:11144 (11.1 KB)
So far the IP is stable. I think the wifi was creating a problem. But, I’m not sure why? In the virtual machine settings (refer attachment VIRTUALBOX_BRIDGE_NETWORK) see the “Name:” section. Here I tell the bridge adaptor to connect to the en0:ethernet1 using the drop down menu. So how does the wifi interfere. BTW, the wifi in the “name:” drop down menu is listed as “en2: Wi-fi (AirPort)”

Re: Virtualbox Bridged network ethernet cable disconnecting

Posted: 11. Jul 2014, 22:47
by noteirak
Can you try to reproduce with 4.3.14_RC1 who just came out?