LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
Search this Thread
Old 04-20-2008, 08:53 PM   #1
simjii
Member
 
Registered: Nov 2003
Distribution: SUSE 11.0 32bit and11.2 x86_64
Posts: 77

Rep: Reputation: 16
HOW TO : Host Interface Networking setup in VirtualBox


I just installed VirtualBox 1.5.2 and spent almost entire day to figure out for setup of Host Interface Networking (HIN) in VirtualBox. The problem is that if the firewall is running the guest cannot get access to the network. To figure out it took me a while. Anyway following is the step by step for setting up HIN.

System: openSuese 10.3 with a lot of patches.
VirtualBox binary version from http://www.virtualbox.org/wiki/Downloads

Assumption: 1. eth0 is already setup and running.
2. There is no firewall running on the host. If the firewall is running, better turn it off before you pull your hairs out of your head like me. If the firewall is running guest cannot get network access. Don't know why.

Host netowrking setup for VirtualBox
1. Check if bridge-utils and uml-utilities packages are installed.
2. Create 'eth1' without any device attached using a YaST or just create
/etc/sysconfig/network/ifcfg-eth1 with contents shwn below. 'eth1' will be the bridge device.
If eth1 device is created with YaST the last two lines in ifcfg-eth1 have to be added and NETMASK has to be setup properly.

#### contents of ifcfg-eth1 after bridge setup
BOOTPROTO='dhcp'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR=''
MTU=''
NAME=''
NETMASK='255.255.255.0'
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
USERCONTROL='no'
### Following two lines are added manually.
BRIDGE='yes'
BRIDGE_PORTS='eth0'

3. Change the IPADDR line in /etc/sysconfig/netowrk/ifcfg-eth0 to
IPADDR='0.0.0.0/24' and BOOTPROTO to BOOTPROTO='static'.

Contents of 'ifcfg-eth0'after bridge setup

BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='0.0.0.0/24'
MTU=''
NAME='Giga-byte RTL8111/8168B PCI Express Gigabit Ethernet controller'
NETMASK=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
USERCONTROL='no'
PREFIXLEN=''

4. Run the following command to make 'vbox0' permanent.
/usr/sbin/VBoxAddIF vbox0 <user> eth1
Replace <user>> with the name of the user who is supposed to be able to use the new interface. vbox0 is the ethernet interface for HIN in VirtualBox

5. Finally, one can bring up the new interface, eth1 by executing
ifup eth1

Last edited by simjii; 04-21-2008 at 12:18 AM.
 
Old 08-01-2008, 09:35 PM   #2
shogun1234
Member
 
Registered: May 2004
Posts: 165

Rep: Reputation: 15
Quote:
Originally Posted by simjii View Post
...
4. Run the following command to make 'vbox0' permanent.
/usr/sbin/VBoxAddIF vbox0 <user> eth1
Replace <user>> with the name of the user who is supposed to be able to use the new interface. vbox0 is the ethernet interface for HIN in VirtualBox
When trying step 4, I got the following error:
Code:
/usr/bin/VBoxAddIF vbox0 <user_name> eth1
VirtualBox host networking interface creation utility, version _VERSION_
(C) 2005-2007 innotek GmbH
All rights reserved.

Creating the permanent host networking interface "vbox0" for user <user_name>.

Failed to add the interface "vbox0" to the bridge "eth1".
Make sure that the bridge exists and that you currently have sufficient
permissions to do this.
Either using sudo or directly creating vbox0 by root; none of those commands work. It always returns insufficient permissions. How to solve this problem?

The way how I do it only differs in that I replace eth0 with wlan because I only have wireless card (iwl4965agn). So I copy ifcfg-eth0 as ifcfg-eth1; and add values (which should be added to eth1 in howto) to wlan0. The ifcfg-eth1 looks as follow:
Code:
## bridge device
BOOTPROTO='dhcp'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR=''
MTU=''
NAME=''
NETMASK='255.255.255.0'
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
USERCONTROL='no'
BRIDGE='yes'
BRIDGE_PORTS='eth0'
and ifcfg-wlan
Code:
#BOOTPROTO='dhcp'
BOOTPROTO='static'
STARTMODE='auto'
NAME='PRO/Wireless 4965 AG or AGN Network Connection'
IPADDR='0.0.0.0/24'
The environment I use is SUSE 11.0/ kernel 2.6.25-1.1-default/ virtualbox 1.5.6/ nc6910p

Many thanks,


How can I solve this problem?

Last edited by shogun1234; 08-01-2008 at 09:37 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VirtualBox Networking (NAT) not working on XP host with Mandriva guest FreeRadical2600 Linux - Newbie 9 10-29-2008 08:12 AM
Networking Ubuntu on VirtualBox on Vista jgombos Linux - Networking 2 03-14-2008 09:57 PM
Virtualbox networking madness! ddales Linux - Networking 1 01-28-2008 10:49 PM
Ubuntu Host Virtualbox guest Networking weirdness ddales Linux - Networking 0 01-20-2008 02:24 PM
Virtualbox Networking problem 00yahoo Ubuntu 1 07-13-2007 07:54 AM


All times are GMT -5. The time now is 03:39 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration