[CentOS-virt] Virtual Box: br0 not resolving: No DHCPOFFERS

Daniel de Kok daniel at centos.org
Mon Sep 3 16:22:28 UTC 2007


On Sun, 2007-09-02 at 16:49 -0700, Todd and Margo Chester wrote:
> 1) "br0" does not resolve with my DHCP server: "No
> DHCPOFFERS received"

[snip]

Why not do this one step at a time, and get bridging working first?

> 2) /etc/sysconfig/network-scripts/ifcfg-br0:
> DEVICE=br0
> TYPE=Bridge
> BOOTPROTO=dhcp
> ONBOOT=yes

Looks ok.

> 3) /etc/sysconfig/network-scripts/ifcfg-eth0
> DEVICE=eth0
> TYPE=Ethernet
> 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
> IPV6ADDR=
> IPV6PREFIX=
> ONBOOT=yes
> USERCTL=yes
> IPV6INIT=no
> PEERDNS=no
> BRIDGE=br0

But this doesn't. An ethernet bridge ties together multiple ethernets to
give the "illusion" that it is one ethernet. An interface that is added
to the bridge is just a bridge port. The configuration for the NIC
should simply add it to the bridge, e.g.:

---
DEVICE=eth0
TYPE=ETHER
BRIDGE=br0
ONBOOT=yes
---

The resulting bridge device (br0) is the interface to the new ethernet.
So, if you want to give it a static IP address, do it in the bridge
configuration. A quick example:

/etc/sysconfig/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
ONBOOT=yes
USERCTL=yes
IPV6INIT=no
PEERDNS=no
ONBOOT=yes
---

Once that works, continue with the other stuff :).

-- Daniel




More information about the CentOS-virt mailing list