Dear Centos-Virt:
This is actually a second request for help on the same issue. I finally got to try what several months ago was replayed to me and no joy was to be had. I am afraid the original thread got stale and also had extra, unnecessary data in it.
Guest=XP Pro, SP2 Host=CentOS5; # uname -r; 2.6.18-8.1.15.el5
VirtualBox-1.5.0_24069_rhel5-2.i586.rpm http://www.virtualbox.org/download/1.5.0/VirtualBox-1.5.0_24069_rhel5-1.i586...
I have two nic: eth0 is the internal network; eth1 connects to a DSL modem.
I also have a fully functioning DHCP server on eth0 (works perfectly with Parallels for Linux).
The directions (from hell): http://www.virtualbox.org/download/UserManual.pdf
I am trying to set up a "host interface" network between my XP guest and my Linux host (eth0).
I do believe I don't have a clue as to how to set up a bridge on eth0. Here is what I have so far:
~~~~~~~~~~~~~~~~~ ifcfg-br0:
DEVICE=br0 TYPE=Bridge BOOTPROTO=static BROADCAST=192.168.255.255 IPADDR=192.168.255.10 NETMASK=255.255.255.0 NETWORK=192.168.255.0 GATEWAY=192.168.255.10 ONBOOT=yes USERCTL=yes IPV6INIT=no PEERDNS=no
~~~~~~~~~~~~~~~~~ ifcfg-eth0:
DEVICE=eth0 TYPE=Ethernet BOOTPROTO=static BROADCAST=192.168.255.255 IPADDR=192.168.255.12 NETMASK=255.255.255.0 NETWORK=192.168.255.0 GATEWAY=192.168.255.10 ONBOOT=yes USERCTL=yes IPV6INIT=no PEERDNS=no BRIDGE=br0
~~~~~~~~~~~~~~~~~ ifcfg-vbox0:
DEVICE=vbox0 TYPE=Ethernet BOOTPROTO=static BROADCAST=192.168.255.255 IPADDR=192.168.255.14 NETMASK=255.255.255.0 NETWORK=192.168.255.0 GATEWAY=192.168.255.10 ONBOOT=yes USERCTL=yes IPV6INIT=no PEERDNS=no BRIDGE=br0
When I fire up Virtual Box, my DCHP server offers it an IP, but I do not see the RX light flashing on my XP monitor icon in the far right of the status bar. VB doesn't get an IP. If I configure the VB NIC with a static address (I tried 192.168.255.20), again no receive light and the network won't work.
Also, I have to "ifdown eth1" and "ifup eth1" to get the "G" (gateway) to show up on "netstat -rn". Otherwise, no surfing the net with Firefox (Linux version). Weird.
I am so very confused. Can someone tell me what I am doing wrong?
Many thanks, -T
Todd and Margo Chester wrote:
Dear Centos-Virt:
This is actually a second request for help on the same issue. I finally got to try what several months ago was replayed to me and no joy was to be had. I am afraid the original thread got stale and also had extra, unnecessary data in it.
Guest=XP Pro, SP2 Host=CentOS5; # uname -r; 2.6.18-8.1.15.el5
VirtualBox-1.5.0_24069_rhel5-2.i586.rpm http://www.virtualbox.org/download/1.5.0/VirtualBox-1.5.0_24069_rhel5-1.i586...
I have two nic: eth0 is the internal network; eth1 connects to a DSL modem.
I also have a fully functioning DHCP server on eth0 (works perfectly with Parallels for Linux).
The directions (from hell): http://www.virtualbox.org/download/UserManual.pdf
I am trying to set up a "host interface" network between my XP guest and my Linux host (eth0).
I do believe I don't have a clue as to how to set up a bridge on eth0. Here is what I have so far:
ifcfg-br0: DEVICE=br0 TYPE=Bridge BOOTPROTO=static BROADCAST=192.168.255.255 IPADDR=192.168.255.10 NETMASK=255.255.255.0 NETWORK=192.168.255.0 GATEWAY=192.168.255.10 ONBOOT=yes USERCTL=yes IPV6INIT=no PEERDNS=no
ifcfg-eth0:
DEVICE=eth0 TYPE=Ethernet BOOTPROTO=static BROADCAST=192.168.255.255 IPADDR=192.168.255.12 NETMASK=255.255.255.0 NETWORK=192.168.255.0 GATEWAY=192.168.255.10 ONBOOT=yes USERCTL=yes IPV6INIT=no PEERDNS=no BRIDGE=br0
ifcfg-vbox0: DEVICE=vbox0 TYPE=Ethernet BOOTPROTO=static BROADCAST=192.168.255.255 IPADDR=192.168.255.14 NETMASK=255.255.255.0 NETWORK=192.168.255.0 GATEWAY=192.168.255.10 ONBOOT=yes USERCTL=yes IPV6INIT=no PEERDNS=no BRIDGE=br0 When I fire up Virtual Box, my DCHP server offers it an IP, but I do not see the RX light flashing on my XP monitor icon in the far right of the status bar. VB doesn't get an IP. If I configure the VB NIC with a static address (I tried 192.168.255.20), again no receive light and the network won't work. Also, I have to "ifdown eth1" and "ifup eth1" to get the "G" (gateway) to show up on "netstat -rn". Otherwise, no surfing the net with Firefox (Linux version). Weird. I am so very confused. Can someone tell me what I am doing wrong? Many thanks, -T _______________________________________________ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
I found a posting over on VB's forums:
http://forums.virtualbox.org/viewtopic.php?t=1636&highlight=bridging+hos...
Here TonyM using the following in his rc.local:
/sbin/modprobe tun /usr/sbin/brctl addbr br0 /sbin/ifconfig eth0 0.0.0.0 promisc /usr/sbin/brctl addif br0 eth0 /sbin/ifconfig br0 192.168.1.10 netmask 255.255.255.0 /usr/bin/VBoxAddIF vbox0 oracle br0 /sbin/ifconfig vbox0 192.168.1.50 netmask 255.255.255.0 /sbin/service network restart
(No symptom change for me, so I put everything back the way it was. And, I did test it with my firewall off.)
The Symptom, when starting XP in VB, was that it could not get an IP address from my Linux Box's DHCP server. But, in my messages log (tail -f /var/log/messages), I can see my DHCP server valiantly trying to give it one:
Nov 10 12:04:20 rn1 dhcpd: DHCPDISCOVER from 08:00:27:d2:20:b8 (vb-winxp) via eth0 Nov 10 12:04:21 rn1 dhcpd: DHCPOFFER on 192.168.255.197 to 08:00:27:d2:20:b8 (vb-winxp) via eth0 Nov 10 12:04:24 rn1 dhcpd: DHCPDISCOVER from 08:00:27:d2:20:b8 (vb-winxp) via eth0 Nov 10 12:04:24 rn1 dhcpd: DHCPOFFER on 192.168.255.197 to 08:00:27:d2:20:b8 (vb-winxp) via eth0 Nov 10 12:04:32 rn1 dhcpd: DHCPDISCOVER from 08:00:27:d2:20:b8 (vb-winxp) via eth0 Nov 10 12:04:32 rn1 dhcpd: DHCPOFFER on 192.168.255.197 to 08:00:27:d2:20:b8 (vb-winxp) via eth0 Nov 10 12:04:49 rn1 dhcpd: DHCPDISCOVER from 08:00:27:d2:20:b8 (vb-winxp) via eth0 Nov 10 12:04:49 rn1 dhcpd: DHCPOFFER on 192.168.255.197 to 08:00:27:d2:20:b8 (vb-winxp) via eth0
Now this is interesting: the DHCP server is offering the IP via eth0. Should it not being offering it via br0 or vbox0? (I am afraid I do not understand this bridging so well.)
Question about bridging: who talks to 127/0/0/1? br0 or eth0? I am thinking that this is the sequence: 127.0.0.1--> eth0 --> br0 --> vbox0 --> virtual box's nic Am I correct?
So I am back to the symptom I had before: the VB NIC can write to the host Linux system, but it can not read.
:'( :'( :'(
-T
On Sat, 2007-11-10 at 12:18 -0800, Todd and Margo Chester wrote:
ifcfg-eth0: DEVICE=eth0 TYPE=Ethernet BOOTPROTO=static BROADCAST=192.168.255.255 IPADDR=192.168.255.12 NETMASK=255.255.255.0 NETWORK=192.168.255.0 GATEWAY=192.168.255.10 ONBOOT=yes USERCTL=yes IPV6INIT=no PEERDNS=no BRIDGE=br0
As I told in my previous reply some time ago, this is wrong. I had also included examples of how to set up a bridge correctly.
With kind regards, Daniel de Kok
Todd and Margo Chester wrote:
Dear Centos-Virt:
This is actually a second request for help on the same issue. I finally got to try what several months ago was replayed to me and no joy was to be had. I am afraid the original thread got stale and also had extra, unnecessary data in it.
Guest=XP Pro, SP2 Host=CentOS5; # uname -r; 2.6.18-8.1.15.el5
VirtualBox-1.5.0_24069_rhel5-2.i586.rpm http://www.virtualbox.org/download/1.5.0/VirtualBox-1.5.0_24069_rhel5-1.i586...
I have two nic: eth0 is the internal network; eth1 connects to a DSL modem.
I also have a fully functioning DHCP server on eth0 (works perfectly with Parallels for Linux).
The directions (from hell): http://www.virtualbox.org/download/UserManual.pdf
I am trying to set up a "host interface" network between my XP guest and my Linux host (eth0).
I do believe I FINALLY have it figured out. I wrote myself the following how to. Please feel free to clean it up and make it into an "Official CentOS 5 How To".
The only problem I have left is that the Guest XP can not browse the Host's Samba server by SMB name (IP works fine)
-T
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
T's CentOS 5 -- Virtual Box "Host Networking" bridge setup:
Note: a lot of this is taken from (with lots of refinements): http://www.linuxweblog.com/virtualbox-host-networking
iptables: after creating br0 at etho's expense, you have to change all references to "eth0" in your firewall to "br0"
br0: will become the internal interface and have a "Fixed" (static) IP address of 192.168.255.10
Support software (required);
"VBoxAddIF" from Virtual Basic
bridge-utils: yum install bridge-utils
ftp://ftp.pbone.net/mirror/ftp.centos.org/5.0/os/i386/CentOS/bridge-utils-1.1-2.i386.rpm
~~~~~~~~~~~~~~ /etc/rc.d/rc.local ~~~~~~~~~~~~~~~
# Set permissions on /dev/net/tun such that Virtual Box can use it /bin/chmod 0666 /dev/net/tun /bin/chmod 777 /dev/vboxdrv
# Restart the firewall /etc/{iamnottellingyou}
~~~ /etc/sysconfig/network-scripts/ifcfg-eth0 ~~~
DEVICE=eth0 TYPE=Ethernet ONBOOT=yes USERCTL=yes IPV6INIT=no PEERDNS=no BRIDGE=br0 ONBOOT=yes PROMISC=yes
~~~ /etc/sysconfig/network-scripts/ifcfg-br0 ~~~
DEVICE=br0 TYPE=Bridge BOOTPROTO=static BROADCAST=192.168.255.255 IPADDR=192.168.255.10 NETMASK=255.255.255.0 NETWORK=192.168.255.0 GATEWAY=192.168.255.10 ONBOOT=yes USERCTL=yes IPV6INIT=no PEERDNS=no PROMISC=yes
~~~ /etc/sysconfig/network-scripts/ifcfg-br0 ~~~
IPADDR=0.0.0.0 PROMISC=yes
~~~~~~~~ Initial and permanent setup ~~~~~~~~~~~
#! /bin/bash
# load the tun module modprobe tunvi chmod 666 /dev/net/tun
# Create a new bridge and add the interfaces to the bridge. brctl addbr br0 brctl addif br0 eth0 /usr/bin/VBoxDeleteIF vbox0 /usr/bin/VBoxAddIF vbox0 tony br0 brctl addif br0 vbox0
# Bring up eth0 and vbox0 in promiscuous mode # Commended out as it should be handles in "network-scripts" #ifconfig eth0 promisc #ifconfig vbox0 0.0.0.0 promisc
brctl addif br0 vbox0
# Now reboot (restarting networking doesn't work) echo "Now reboot. (I have no idea why)"
Todd and Margo Chester wrote:
Todd and Margo Chester wrote:
Dear Centos-Virt:
This is actually a second request for help on the same issue. I finally got to try what several months ago was replayed to me and no joy was to be had. I am afraid the original thread got stale and also had extra, unnecessary data in it.
Guest=XP Pro, SP2 Host=CentOS5; # uname -r; 2.6.18-8.1.15.el5
VirtualBox-1.5.0_24069_rhel5-2.i586.rpm http://www.virtualbox.org/download/1.5.0/VirtualBox-1.5.0_24069_rhel5-1.i586...
I have two nic: eth0 is the internal network; eth1 connects to a DSL modem.
I also have a fully functioning DHCP server on eth0 (works perfectly with Parallels for Linux).
The directions (from hell): http://www.virtualbox.org/download/UserManual.pdf
I am trying to set up a "host interface" network between my XP guest and my Linux host (eth0).
I do believe I FINALLY have it figured out. I wrote myself the following how to. Please feel free to clean it up and make it into an "Official CentOS 5 How To".
The only problem I have left is that the Guest XP can not browse the Host's Samba server by SMB name (IP works fine)
-T
T's CentOS 5 -- Virtual Box "Host Networking" bridge setup: Note: a lot of this is taken from (with lots of refinements): http://www.linuxweblog.com/virtualbox-host-networking iptables: after creating br0 at etho's expense, you have to change all references to "eth0" in your firewall to "br0" br0: will become the internal interface and have a "Fixed" (static) IP address of 192.168.255.10 Support software (required); "VBoxAddIF" from Virtual Basic bridge-utils: yum install bridge-utils ftp://ftp.pbone.net/mirror/ftp.centos.org/5.0/os/i386/CentOS/bridge-utils-1.1-2.i386.rpm ~~~~~~~~~~~~~~ /etc/rc.d/rc.local ~~~~~~~~~~~~~~~ # Set permissions on /dev/net/tun such that Virtual Box can use it /bin/chmod 0666 /dev/net/tun /bin/chmod 777 /dev/vboxdrv # Restart the firewall /etc/{iamnottellingyou} ~~~ /etc/sysconfig/network-scripts/ifcfg-eth0 ~~~ DEVICE=eth0 TYPE=Ethernet ONBOOT=yes USERCTL=yes IPV6INIT=no PEERDNS=no BRIDGE=br0 ONBOOT=yes PROMISC=yes ~~~ /etc/sysconfig/network-scripts/ifcfg-br0 ~~~ DEVICE=br0 TYPE=Bridge BOOTPROTO=static BROADCAST=192.168.255.255 IPADDR=192.168.255.10 NETMASK=255.255.255.0 NETWORK=192.168.255.0 GATEWAY=192.168.255.10 ONBOOT=yes USERCTL=yes IPV6INIT=no PEERDNS=no PROMISC=yes ~~~ /etc/sysconfig/network-scripts/ifcfg-br0 ~~~
Ooops ^^^^^^^^^^^ should be ifcfg-vbox0 ^^^
IPADDR=0.0.0.0 PROMISC=yes
#! /bin/bash # load the tun module modprobe tunvi chmod 666 /dev/net/tun # Create a new bridge and add the interfaces to the bridge. brctl addbr br0 brctl addif br0 eth0 /usr/bin/VBoxDeleteIF vbox0 /usr/bin/VBoxAddIF vbox0 tony br0 brctl addif br0 vbox0 # Bring up eth0 and vbox0 in promiscuous mode # Commended out as it should be handles in "network-scripts" #ifconfig eth0 promisc #ifconfig vbox0 0.0.0.0 promisc brctl addif br0 vbox0 # Now reboot (restarting networking doesn't work) echo "Now reboot. (I have no idea why)" _______________________________________________ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt