Linux Bonding Slave interface Replacement

No comments

BondingThe Linux bonding  driver provides  a method for aggregating multiple network devices  into a single logical interface which named  “bonded” interface. Behave  of bonding interface  depends  on bonding  mode  .

  • Mode 1 (active-backup policy)
  • Mode 2 (XOR policy)
  • Mode 4 (IEEE 802.3ad policy)
  • Mode 5 (adaptive transmit load balancing policy)

You can get detail information about  bonding  mode  which  link I added below. (Red Hat  Bonding Mode)  (Bonding  Configuration)

At this  post  I ‘ll  try to explain another subject which related service  up-time. We are planning  huge environment  to backing  up our services  but as you know  IT Application parameters always  changing and  IT Infrastructure and  Planning  activity must  be  flexible  to meet IT Applications’ needs. Otherwise It ‘won’t  be possible  to manage  all changes.

For these  reason it’s  important  to improve  your infrastructure element like  networking,system,application etc. in service  operational state. At  this  post  I’ll describe  how to change your  bonding  interface  without any down time on server and  application side.

We will  check  this object;

  • ifenslave
  • Bonding  Configurations
  • NetworkManager

*Before start  operation check  if your  NetworkManager service  is down. It  must  be  disabled.

Step 1: Check  Bonding  Configurations

Bonding Master Interface : bond1
Slave 1:Eth2
Slave 2:Eth3
Active Slave:Eth2

Step 2: Check  your  new  network  element 

-Before  start  operation please  make  double check  on your new network  interface  cable and vlan configuration. Also you need to check Network switch side  about  agg.  mode.

Step 3:Drop old ethernet device

-Now we will remove eth2  from bonding  interface.At  this  step we run ifenslave command .

Step 4:Add new  ethernet device

-Before adding  new  device  check  link state  with “ethtool”  command.

Step 5: Drop Other  old  ethernet device  “eth3”

-After this  operation our  active  Slave  ethernet device  ‘ll be  eth7  which we added  to bonding at  last step.

Step 6:Add  last  new  device  to bonding

Step 7: Add new  configuration to the config file

Change  eth2  interface config file and  add  “#”  to  MASTER  and  SLAVE  line. And  also  change  ONBOOT option to “no”.

# vi ifcfg-eth2
HWADDR=”6C:3B:E5:A4:3F:4A”
DEVICE=eth2
BOOTPROTO=none
ONBOOT=no
#MASTER=bond1
#SLAVE=yes
USERCTL=no

Also  apply  these  changes  for eth3 to.

cat ifcfg-eth3
HWADDR=”6C:3B:E5:A4:3F:4B”
DEVICE=eth3
BOOTPROTO=none
ONBOOT=no
#MASTER=bond1
#SLAVE=yes
USERCTL=no

Edit  new  interface  eth7-eth11  like  this configuration.

DEVICE=”eth7″
NM_CONTROLLED=”no”
ONBOOT=yes
TYPE=”Ethernet”
NAME=”System eth7″
BOOTPROTO=none
HWADDR=AP:16:2D:83:30:63      >> Mac address  must be  your  interface mac  address  which  comes  from “ip a” command
MASTER=bond1
SLAVE=yes

DEVICE=”eth11″
NM_CONTROLLED=”no”
BOOTPROTO=”none”
ONBOOT=yes
TYPE=”Ethernet”
NAME=”System eth11″
HWADDR=AK:26:2D:83:3B:4F
MASTER=bond1
SLAVE=yes

 

 

Follow me

Abdurrahim

I'm a System Engineer with extensive experience and administration skills and works for Interbank Card Center Of Turkey.I provide hardware and software support for the following Unix/Linux and Windows platforms.(Oracle Solaris,HP-UX, Linux, IBM-AIX, Windows Servers)
Follow me
facebooktwittergoogle_pluslinkedinby feather