All pastes #633088 Raw Edit

Unnamed

public text v1 · immutable
#633088 ·published 2007-07-25 13:25 UTC
rendered paste body
6.5.1.2. Bridging on openSUSE hosts

To create a bridge on a recent openSUSE host, you must first install the bridge utilities (bridge-utils) package. If you are working from the command line this can be done as follows:

sudo /sbin/yast -i bridge-utils

Then you must create a text file describing the bridge to be created. The name of the file must correspond to the name of the bridge you wish to create. To create the bridge br0, you should call the file /etc/sysconfig/network/ifcfg-br0. Below we have given an example of a file which creates a bridge including the network device eth0, obtains an IP address by DHCP (through the network device) and is started automatically when openSUSE starts. You will probably want to adjust this to match your networking requirements.

BOOTPROTO='dhcp'
NETMASK='255.255.255.0'
STARTMODE='auto'
USERCONTROL='no'
DHCLIENT_TIMEOUT=30
BRIDGE='yes'
BRIDGE_PORTS='eth0'

For this example to work, you will also need to change the configuration for the network interface eth0 to a static IP address of 0.0.0.0, as openSUSE does not do this automatically when the interface is added to the bridge. You can do this using the graphical interface or by changing the following settings in the file /etc/sysconfig/network/ifcfg-eth-xx:xx:xx:xx:xx:xx, where the last part should be replaced with the hardware address of the network card.

BOOTPROTO='static'
IPADDR='0.0.0.0'

You can activate the bridge immediately after creating it with the command:

sudo /sbin/ifdown eth0
sudo /sbin/ifup br0

The bridge will be activated automatically from now on when the host is restarted.