"Bridged Adapter" issue while running CentOS 6.3 on VirtualBox.

Issues related to configuring your network

"Bridged Adapter" issue while running CentOS 6.3 on VirtualBox.

Postby jerouy » 2012/09/03 08:27:13

Hi Folks,

I was fighting with this issue for a long time but failed to find a general solution to it.

Host: Microsoft Windows 7 SP1
Guest: CentOS 6.3
VM: Oracle VirtualBox 4.1
Network Setting on VM guest: "Bridged Adapter"

Issue description:
After fresh installation, network on guest CentOS always shows icon with red "x" on the top-right.
On some PC(my work PC for instance), I can click on that icon and then click "System eth0" in the drop-down menu, then after seconds it starts working.
However, on my home PC, clicking that icon never helps.

I did a lot searching online, found quite a few similar issues and discussions, but still cannot find a solution.

Some weird things I can think about:
- "NAT" mode works fine. But I need "Bridged Adapter";
- I have installed some other Linux distributions on VirtualBox, CentOS is the only one having this kind of issue; Windows guests work well too.
- I created and installed a guest on VirtualBox 4.1.18 the other day, network didn't work. Then I overwrite-updated VirtualBox software to 4.1.20, all of a sudden that guest's network started working flawlessly! No setting was changed at all! However, later I created and installed another guest with all the same settings but it has the same issue again;
- After trying the solutions I found on the Internet, I found out it looks like a DHCP-related issue. When I issue "/etc/init.d/network restart" command, everything shows OK until the last action "Determining IP information for eth0... Failed". I do have a DHCP server (ADSL-router) in my home network and it works fine (I have no other issue with that).

Here is what I have tried:
1. After fresh installation:
Code: Select all
[root@localhost Desktop]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="08:00:27:44:5B:C5"
NM_CONTROLLED="yes"
ONBOOT="no"
TYPE="Ethernet"
UUID="f8e1217d-11be-48b1-8c45-437cddfe9b0f"

[root@localhost Desktop]# /etc/init.d/network restart
Shutting down interface eth0:  Error: Device 'eth0' (/org/freedesktop/NetworkManager/Devices/0) disconnecting failed: This device is not active
                                                           [FAILED]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]


2. Changed "ONBOOT=no" to "ONBOOT=yes"
Code: Select all
[root@localhost Desktop]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="08:00:27:44:5B:C5"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="f8e1217d-11be-48b1-8c45-437cddfe9b0f"

[root@localhost Desktop]# /etc/init.d/network restart
Shutting down interface eth0:  Error: Device 'eth0' (/org/freedesktop/NetworkManager/Devices/0) disconnecting failed: This device is not active
                                                           [FAILED]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  Active connection state: activating
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/2

** (process:3004): WARNING **: _nm_object_get_property: Error getting 'State' for /org/freedesktop/NetworkManager/ActiveConnection/2: (19) Method "Get" with signature "ss" on interface "org.freedesktop.DBus.Properties" doesn't exist


state: unknown
Error: Connection activation failed.
                                                           [FAILED]


3. Changed "NM_CONTROLLED=yes" to "no"
Code: Select all
[root@localhost Desktop]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="08:00:27:44:5B:C5"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
UUID="f8e1217d-11be-48b1-8c45-437cddfe9b0f"

[root@localhost Desktop]# /etc/init.d/network restart
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0: 
Determining IP information for eth0...PING 10.0.2.2 (10.0.2.2) from 10.0.2.15 eth0: 56(84) bytes of data.

--- 10.0.2.2 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3002ms
pipe 3
 failed.
                                                           [FAILED]

I have no idea where that "10.0.x.x" IP address came from. My DHCP server is set to the IP range "192.168.3.X".

4. remove the "NM_CONTROLLED" line
Code: Select all
root@localhost Desktop]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="08:00:27:44:5B:C5"
#NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
UUID="f8e1217d-11be-48b1-8c45-437cddfe9b0f"

[root@localhost Desktop]# /etc/init.d/network restart
Shutting down interface eth0:  Device state: 3 (disconnected)
                                                           [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  Active connection state: activating
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/2
^[[24~
** (process:2640): WARNING **: _nm_object_get_property: Error getting 'State' for /org/freedesktop/NetworkManager/ActiveConnection/2: (19) Method "Get" with signature "ss" on interface "org.freedesktop.DBus.Properties" doesn't exist


state: unknown
Error: Connection activation failed.
                                                           [FAILED]


Any help?

Thanks a lot.

Jeremy
jerouy
 
Posts: 1
Joined: 2012/09/03 05:21:33

"Bridged Adapter" issue while running CentOS 6.3 on VirtualB

Postby jlehtone » 2012/09/03 11:04:25

jerouy wrote:
... CentOS always shows icon with red "x" on the top-right.

# /etc/init.d/network restart

The "x" is shown by gnome-applet of the NetworkManager service. 'network' is a separate, competing service.

I would remove NetworkManager\* packages, so that only the 'network' service remains. Then concentrate
on getting the configuration right.

Strip the 'ifcfg-eth0' to
Code: Select all
DEVICE="eth0"
BOOTPROTO="dhcp"
NM_CONTROLLED="no"
ONBOOT="yes"
User avatar
jlehtone
 
Posts: 1431
Joined: 2007/12/11 08:17:33
Location: Finland

Re: "Bridged Adapter" issue while running CentOS 6.3 on VirtualBox.

Postby driftwood » 2012/09/03 12:15:55

Agree it's probably undesirable to run NetworkManager and network services at the same time.
Not sure it's desirable to remove the HWADDR line.
driftwood
 
Posts: 119
Joined: 2012/01/26 14:40:16

Re: "Bridged Adapter" issue while running CentOS 6.3 on VirtualBox.

Postby jlehtone » 2012/09/03 13:07:03

driftwood wrote:
Not sure it's desirable to remove the HWADDR line.

HWADDR has been deprecated to security check. If named interface does not have the same MAC as configured, the interface will not come up. That is desirable safety, and more vital when system has more than one interface. If the VM has only one interface, then we eliminate one potential point of failure by removing the HWADDR.

Definitely, re-add (the correct) HWADDR, once the interface is up and running.
User avatar
jlehtone
 
Posts: 1431
Joined: 2007/12/11 08:17:33
Location: Finland


Return to CentOS 6 - Networking Support

Who is online

Users browsing this forum: No registered users and 0 guests