Neil Aggarwal
2009-Oct-20 17:11 UTC
[CentOS-virt] Error setting up bridge with static IP address
Hello: I am trying to follow the RHEL virtualization guide to set up a bridge on a system running CentOS 5.4. I copied my ifcfg-eth0 to ifcfg-eth0:1 and set its content to this: DEVICE=eth0:1 HWADDR=[The MAC address from eth0] ONBOOT=yes BRIDGE=br1 I then created ifcfg-br1 with this content: DEVICE=br1 TYPE=Bridge BOOTPROTO=static BROADCAST=192.168.2.255 IPADDR=192.168.2.202 NETMASK=255.255.255.0 NETWORK=192.168.2.0 ONBOOT=yes DELAY=0 When I do service network restart, I get this error: error in ifcfg-eth0:1: didn't specify device or ipaddr I specified the device so it looks like it wants an IP address but that is contrary to what I am reading on the Internet. Any ideas what went wrong? Thanks, Neil -- Neil Aggarwal, (281)846-8957, www.JAMMConsulting.com Will your e-commerce site go offline if you have a DB server failure, fiber cut, flood, fire, or other disaster? If so, ask about our geographically redundant database system.
Neil Aggarwal
2009-Oct-20 18:11 UTC
[CentOS-virt] Error setting up bridge with static IP address
I did some more reading on the Internet and it looks like I am supposed to set up the bridge on eth0 and configure the bridge with the IP address of the host. So, I removed ifcfg-eth0:1 and changed ifcfg-eth0 to this: DEVICE=eth0 HWADDR=[The MAC address] ONBOOT=yes BRIDGE=br0 I removed ifcfg-br1 and created ifcfg-br0 with this content: DEVICE=br0 TYPE=Bridge BOOTPROTO=static BROADCAST=192.168.2.255 IPADDR=192.168.2.200 NETMASK=255.255.255.0 NETWORK=192.168.2.0 ONBOOT=yes DELAY=0 I don't get any errors when I do service network restart but now I can't ssh to the host using the 192.168.2.200 IP address. I also tried setting these values in /etc/sysctl.conf: net.bridge.bridge-nf-call-ip6tables = 0 net.bridge.bridge-nf-call-iptables = 0 net.bridge.bridge-nf-call-arptables = 0 net.ipv4.ip_forward = 1 and rebooting the machine. That did not help. Any ideas? Thanks, Neil -- Neil Aggarwal, (281)846-8957, www.JAMMConsulting.com Will your e-commerce site go offline if you have a DB server failure, fiber cut, flood, fire, or other disaster? If so, ask about our geographically redundant database system.