Re: [opensuse] VirtualBox bridged connection in OpenSuse 10.3



On Sunday 11 May 2008, Anton Moiseev wrote:
Hi,

I have VirtualBox 1.6 ose, OpenSuse 10.3.
There are 2 physical network cards - eth0 and eth1.

eth0 is connected with a wire to ADSL-modem, gets its address dhcp -
192.168.1.2

eth1 is not connected to anywhere. I want configure a bridge on it for
VirtualBox, so guest OS (ALT Linux Server) would become part of local
network (so I could ping it from my host suse, and my host could be
pinged from guest os) and also they all should have inet, connected
though eth0

I was following different instructions -
http://en.opensuse.org/Virtualbox_Network_Bridging ,
http://dotlinux.blogspot.com/2007/12/virtualbox.html , and also some
other - all without success. I someone has the same configuration,
which >really< works - please post it here.

Here are my steps:

#######1. Created file /etc/sysconfig/network/ifcfg-br0:
#ifcfg-br0
IPADDR=192.168.1.101
NETMASK=255.255.255.0
NETWORK=
BROADCAST=
STARTMODE=auto
USERCONTROL=yes
BRIDGE='yes'
BRIDGE_PORTS='eth1'
BRIDGE_AGEINGTIME='300'
BRIDGE_FORWARDDELAY='0'
BRIDGE_HELLOTIME='2'
BRIDGE_MAXAGE='20'
BRIDGE_PATHCOSTS='19'
BRIDGE_PORTPRIORITIES=
BRIDGE_PRIORITY=
BRIDGE_STP='on'

#######2. Changed file /etc/sysconfig/network/ifcfg-eth1:
#ifcfg-eth1
BOOTPROTO=static
IPADDR=0.0.0.0
BROADCAST=
STARTMODE='auto'
NAME='nVidia MCP55 Ethernet'
PREFIXLEN=
ETHTOOL_OPTIONS=
MTU=
NETWORK=
REMOTE_IPADDR=
USERCONTROL=yes
NETMASK=255.255.255.0





#######3. Execute /etc/init.d/network restart

Shutting down network interfaces:
eth0 device: nVidia Corporation MCP55 Ethernet (rev a2) done
eth1 device: nVidia Corporation MCP55 Ethernet (rev a2) done
irda0
No configuration found for irda0
Nevertheless the interface will be shut down. done
Shutting down service network . . . . . . . . . . . . . done
Hint: you may set mandatory devices in /etc/sysconfig/network/config
Setting up network interfaces:
lo
lo IP address: 127.0.0.1/8
Checking for network time protocol daemon (NTPD): doneed
eth0 device: nVidia Corporation MCP55 Ethernet (rev a2)
eth0 is controlled by ifplugd waiting
eth1 device: nVidia Corporation MCP55 Ethernet (rev a2)
eth1 IP address: 0.0.0.0/24
Checking for network time protocol daemon (NTPD): doneed
irda0
No configuration found for irda0 unused
br0
br0 Ports: [eth1]
br0 forwarddelay (see man ifcfg-bridge) .. not ready. Proceeding in
background.
br0 IP address: 192.168.1.101/24
Checking for network time protocol daemon (NTPD): doneed
Setting up service network . . . . . . . . . . . . . . done
SuSEfirewall2: Setting up rules from /etc/sysconfig/SuSEfirewall2 ...
SuSEfirewall2: Warning: no default firewall zone defined, assuming 'ext'
SuSEfirewall2: using default zone 'ext' for interface br0
SuSEfirewall2: using default zone 'ext' for interface irda0
SuSEfirewall2: batch committing...
SuSEfirewall2: Firewall rules successfully set






####### ifconfig after that:
br0 Link encap:Ethernet HWaddr 00:17:31:EA:E0:C3
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::217:31ff:feea:e0c3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:4902 (4.7 Kb)

eth0 Link encap:Ethernet HWaddr 00:17:31:EA:E7:0F
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::217:31ff:feea:e70f/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1395697 errors:0 dropped:0 overruns:0 frame:0
TX packets:1341039 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:786423834 (749.9 Mb) TX bytes:1499863073 (1430.3 Mb)
Interrupt:249 Base address:0xe000

eth1 Link encap:Ethernet HWaddr 00:17:31:EA:E0:C3
UP BROADCAST PROMISC 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)
Interrupt:248

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:114038 errors:0 dropped:0 overruns:0 frame:0
TX packets:114038 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:12171611 (11.6 Mb) TX bytes:12171611 (11.6 Mb)




####### 4. /usr/bin/VBoxAddIF vbox0 benderamp br0

VirtualBox host networking interface creation utility, version _VERSION_
(C) 2005-2007 Sun Microsystems, Inc.
All rights reserved.

Creating the permanent host networking interface "vbox0" for user
benderamp.


####### After that ifconfig:

br0 Link encap:Ethernet HWaddr 00:17:31:EA:E0:C3
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::217:31ff:feea:e0c3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:5058 (4.9 Kb)

eth0 Link encap:Ethernet HWaddr 00:17:31:EA:E7:0F
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::217:31ff:feea:e70f/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1395765 errors:0 dropped:0 overruns:0 frame:0
TX packets:1341145 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:786451106 (750.0 Mb) TX bytes:1499881499 (1430.3 Mb)
Interrupt:249 Base address:0xe000

eth1 Link encap:Ethernet HWaddr 00:17:31:EA:E0:C3
UP BROADCAST PROMISC 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)
Interrupt:248

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:114038 errors:0 dropped:0 overruns:0 frame:0
TX packets:114038 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:12171611 (11.6 Mb) TX bytes:12171611 (11.6 Mb)

vbox0 Link encap:Ethernet HWaddr 00:FF:80:10:B6:F4
inet6 addr: fe80::2ff:80ff:fe10:b6f4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:25 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

####### 5. Virtual machine is already configured to use host interface
vbox0

Start guest OS (all further commands are made inside it). Startup log
on the "Starting Network" stage has rather long pause, then [Done].
Login with root, ifconfig shows network device eth0 without ip
assigned.
Make ifconfig eth0 192.168.1.102 netmask 255.255.255.0

Nothing pings except itself. On what step did I miss something?





***************
Also, if I make bridge on eth0 instead of eth1 (BRIDGE_PORTS='eth0' ), then

with 'network restart' I have a bit different message:
...
br0
br0 Ports: [eth0]
br0 forwarddelay (see man ifcfg-bridge) .... ready
br0 IP address: 192.168.1.101/24
...

Then I all the same. ifconfig looks the same, but the host stops
pinging modem 192.168.1.1) and so there is no inet on the host suse.

But the guest OS has 192.168.1.3 assigned to eth0 just after loading,
pings model and has inet. Ping does go to host 192.168.1.2 (but in
this case as I understand it should not as eth0 is taken by bridge)


Thank's
Anton

Virtualbox 1.6 host networking doesn't work correctly
(http://www.virtualbox.org/ticket/1471). I have used version 1.5.2 without
problems, just add both eth0 and eth1 to the bridge and check whether vbox0
state in "brctl showstp br0" is "forwarding".

Regards
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



Relevant Pages