Archive for agosto, 2011


This article is a sort of “Post-it®”, a brief explanation of how to configure a network bridge with two NICs under CentOS 5.x / 6.x. After spending more than 10 minutes googling how to perform this task ( mainly reading about ( l ) users that didn’t have a clue about what a network bridge is or, worse, asking how to bridge n-thousand VM while performing routing having iptables misconfigured… ), I thought it was better to write everything down in “safe place”: what’s better than my blog?

So, this is how I have made the bridge on Nighthawk ( a double Pentium III – 800 MHz with a Gig of RAM and a pair of UWSCSI3 disks ), under CentOS 6.0.
The two NICs are both based on an Intel 82559 chip. The first one is integrated into the motherboard, while the second one is on a PCI slot.

OBVIOUSLY, a network bridge has ONE MAC address ( could be the same of one of the two NIC or could be a different one ) and ONE IP address, unless your playing with aliased interface over a bridge, but this is not the case.

The integrated NIC is eth0, the NIC on the PCI slot is eth1 while the network bridge is nbr0.

So, these are the configuration files:

# /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
HWADDR="00:30:48:AA:BB:CC"
ONBOOT="yes"
BRIDGE="nbr0"

# /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE="eth1"
HWADDR="00:90:27:DD:EE:FF"
ONBOOT="yes"
BRIDGE="nbr0"

# /etc/sysconfig/network-scripts/ifcfg-nbr0
DEVICE="nbr0"
TYPE="bridge"
BOOTPROTO="dhcp"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
ONBOOT="yes"

The bridge takes its IP address via DHCP. If a static address is required, file ifcfg-nbr0 must be changed according to what is reported into the RHEL Deployment Guide.

Bye

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter