Static Network configuration with bridge in CentOS 6.2

Posted by Kyle on Server Fault See other posts from Server Fault or by Kyle
Published on 2012-07-08T18:56:37Z Indexed on 2012/07/08 21:17 UTC
Read the original article Hit count: 389

I have a server with CentOS 6.2 installed, I want to use it as a VM host to run some windows installations for development purposes. I wanted to be able to directly RDP and serve websites from IIS on these windows server installations, so I figured I would set it up as bridged networking.

I have been struggling with this all morning, usually the result being that when I brought up the bridge interface all network connectivity to the CentOS would go away, however, I think I finally have that all figured out. However, here's what happens.

The eth0 and br0 interfaces are defined in /etc/sysconfig/network-scripts with ifcfg-eth0 and ifcfg-br0. I DO NOT have ifup or ifdown or any other files for these interfaces, I have not found if they are needed. I can login and use firefox to browse the web, however, running ifconfig reveals that my eth0 does not have an IPAddress, but the br0 does. I can actually RDP into the Windows installation, and browse the internet from there as well, but I cannot directly connect(via putty, vnc, nor viewing web pages) to the CentOS box. Any idea what's up?

ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none
IPADDR=192.168.1.20
GATEWAY=192.168.1.1
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes
BRIDGE=br0

ifcfg-br0

DEVICE=br0
TYPE=Bridge
BOOTPROTO=static
DNS1=192.168.1.1
DNS2=8.8.8.8
GATEWAY=192.168.1.1
IPADDR=192.168.1.2
NETMAS=255.255.255.0
ONBOOT=yes

I know some of the options are inconsistent (DNS and BOOTPROTO) because I tried changing those in the eth0 file to make it work, and the changes haven't adversly affected web browsing or the other functionality

Thank you!

© Server Fault or respective owner

Related posts about linux

Related posts about networking