Page 1 of 1

Plz help with Red Hat and bridging

Posted: 15. Sep 2008, 23:58
by rafiso
I have installed VirtalBox on a CentOs 5.2 server and I need a new IP for the guest OS, so I made a bridge using the manual.

eth0 static 192.168.100.10
eth1 static 192.168.100.11

I don't want any changes for eth0.

There is a dhcp to send ips to the guest os and when it's working, it's works so here is the problem :


The method described for fedora is working but then I can't use the eth1 in my LAN (no ping..) but it's working in the guest OS (dhcp).

Code: Select all

New file /etc/sysconfig/network-scripts/ifcfg-br0 with:
DEVICE=br0
TYPE=Bridge
BOOTPROTO=dhcp
ONBOOT=yes

Add to the file /etc/sysconfig/network-scripts/ifcfg-eth1 :
BRIDGE=br0

/sbin/service network restart
VBoxAddIF vbox0 root br0
then add vbox0 as interface for the VM in the GUI.
====> internet access in the VM but i can't use 192.168.100.11 (eth1) in the LAN ??????



The other method for other distributions works but it doesn't "save" the modifications. I mean that after a reboot it doesn't work anymore.

Code: Select all

brctl addbr br0
ifconfig eth1 0.0.0.0
brctl addif br0 eth1
ifconfig br0 192.168.100.11 netmask 255.255.255.0
VBoxAddIF vbox0 root br0
==> after a reboot it doesn't work anymore.


I noticed that some people are using some scripts.. it that really necessary ? Why the first method doesn't work as the second one ?? Thanks you for your help I'm used to VMware server... :)

Best regards

Posted: 16. Sep 2008, 09:36
by sej7278
i did a step-by-step of how i got hif bridging to work on centos 5.2 - i can get to the lan and internet:

http://forums.virtualbox.org/viewtopic.php?t=933

Posted: 16. Sep 2008, 21:49
by Technologov
[root@localhost kvm_intel]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
#BOOTPROTO=dhcp
BOOTPROTO=none
HWADDR=00:1c:c0:39:87:95
BRIDGE=sw0

[root@localhost kvm_intel]# cat /etc/sysconfig/network-scripts/ifcfg-sw0
DEVICE=sw0
BOOTPROTO=none
#BOOTPROTO=dhcp
#BOOTPROTO=static
ONBOOT=yes
# Bridge Configuration
TYPE=Bridge
DELAY=0.1
STP=off

IPADDR=172.18.7.12
NETMASK=255.255.255.0
GATEWAY=172.18.7.1
BROADCAST=172.18.7.255

==================
Look at my config - this one works on Fedora7 !

-Technologov