- Make sure bridge module is installed in the Kernel
- Run the bridge module: sudo modprobe bridge
- Install bridge-utils (download it from http://bridge.sourceforge.net) and copy brctl into /sbin (the ifup script is hardcoded to call it from /sbin)
- create a new bridge instance (in this example, the bridge name is called br0): sudo brctl addbr br0
- Add the interface(s) to be members of this bridge: sudo brctl addif br0 ethx (where x = 0, 1, ...)
- To make it permanent, copy /etc/sysconfig/network/ifcfg-template to ifcfg-br0
- Modify the content and let have it as below (IPADDR is chosen here as 192.168.1.4):
IPADDR=192.168.1.4
NETMASK=255.255.255.0
NETWORK=
BROADCAST=
STARTMODE=auto
USERCONTROL=no
BRIDGE='yes'
BRIDGE_PORTS='eth0 eth1 eth2'
BRIDGE_AGEINGTIME='300'
BRIDGE_FORWARDDELAY='0'
BRIDGE_HELLOTIME='2'
BRIDGE_MAXAGE='20'
BRIDGE_PATHCOSTS='19'
BRIDGE_PORTPRIORITIES=
BRIDGE_PRIORITY=
BRIDGE_STP='on'
- restart network: sudo /etc/init.d/network restart
No comments:
Post a Comment