Pages

Tuesday, November 8, 2011

Bridge Networking in RHEL


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:
  1. login as root
  2. shutdown interface that will be bridged
    ifdown eth0
    ifdown eth1
    
  3. go to /etc/sysconfig/network-scripts
    cd /etc/sysconfig/network-scripts
    
  4. edit file ifcfg-eth0
    vim ifcfg-eth0
    
  5. add these codes:
    DEVICE=eth0
    HWADDR=00:AA:BB:CC:DD:EE
    ONBOOT=yes
    BRIDGE=bridge0
    
  6. edit file ifcfg-eth1
    vim ifcfg-eth1
    
  7. add these lines:
    DEVICE=eth1
    HWADDR=00:AA:BB:CC:DD:FF
    ONBOOT=yes
    BRIDGE=bridge0
    
  8. edit file ifcfg-bridge0
    vim ifcfg-bridge0
    
  9. 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
    
  10. activate interface
    ifup eth0
    ifup eth1
    ifup bridge0
    
  11. check network using ifconfig

No comments:

Post a Comment

Don't Forget To Join Our Community
×
Widget