Have you ever deal with servers that have many lan card??. Have you ever wanted to optimize the function of these lan cards for failover??. If so, we can use Bridge networking.
With bridged networking we can set many lan card for failover. This means that if one of the lan card does not connect to the network, then the connection will be handled by other active lan card. It also has other benefits that we do not need to memorize which lan card is used and which one is not.
Every operating system has its own way to implement the bridge. In this blog, we will discuss about the bridge networking on Redhat Enterprise Linux (RHEL).
To set the bridge, perform the following steps:
- login as root
- shutdown interface that will be bridged
ifdown eth0 ifdown eth1
- go to /etc/sysconfig/network-scripts
cd /etc/sysconfig/network-scripts
- edit file ifcfg-eth0
vim ifcfg-eth0
- add these codes:
DEVICE=eth0 HWADDR=00:AA:BB:CC:DD:EE ONBOOT=yes BRIDGE=bridge0
- edit file ifcfg-eth1
vim ifcfg-eth1
- add these lines:
DEVICE=eth1 HWADDR=00:AA:BB:CC:DD:FF ONBOOT=yes BRIDGE=bridge0
- edit file ifcfg-bridge0
vim ifcfg-bridge0
- add these lines:
DEVICE=bridge0 BOOTPROTO=none ONBOOT=yes NETMASK=255.255.255.0 IPADDR=192.168.1.2 TYPE=Bridge USERCTL=no IPV6INIT=no GATEWAY=192.168.1.1 DELAY=0
- activate interface
ifup eth0 ifup eth1 ifup bridge0
- check network using ifconfig
No comments:
Post a Comment