You are on page 1of 7

Prerequisite

1. set rt_tables file

[root@jktmmpsibdb01 network-scripts]# cat /etc/iproute2/rt_tables

# reserved values

255 local

254 main

253 default

0 unspec

# local

#1 inr.ruhep

1 prd

2 mgt

3 bkp

2. Setting IP and bonding

[root@jktmmpsibdb01 network-scripts]# cat /proc/net/bonding/bond0 | grep eth

Currently Active Slave: eth0

Slave Interface: eth0

Slave Interface: eth1

[root@jktmmpsibdb01 network-scripts]# cat ifcfg-eth0

DEVICE=eth0

HWADDR=00:17:A4:77:08:68

TYPE=Ethernet

ONBOOT=yes

BOOTPROTO=none
MASTER=bond0

SLAVE=yes

[root@jktmmpsibdb01 network-scripts]# cat ifcfg-eth1

DEVICE=eth1

HWADDR=00:17:A4:77:08:6A

TYPE=Ethernet

ONBOOT=yes

BOOTPROTO=none

MASTER=bond0

SLAVE=yes

[root@jktmmpsibdb01 network-scripts]# cat ifcfg-bond0

DEVICE=bond0

BONDING_MASTER=yes

TYPE=Bond

BONDING_OPTS="mode=1 downdelay=0 updelay=0 miimon=100 fail_over_mac=active"

IPADDR=10.64.19.179

NETMASK=255.255.252.0

MTU=9000

ONBOOT=yes

BOOTPROTO=none

NM_CONTROLLED=no
3. Setting Rule and Route File in more than 2 IP Network

[root@jktmmpsibdb01 network-scripts]# cat rule-bond0

from 10.64.19.179/22 table mgt

to 10.64.19.179 table mgt

[root@jktmmpsibdb01 network-scripts]# cat route-bond0

10.64.16.0/22 dev bond0 table mgt

default via 10.64.16.1 dev bond0 table mgt

SETTING BOND1 :

[root@jktmmpsibdb01 network-scripts]# cat /proc/net/bonding/bond1| grep eth

Currently Active Slave: eth2

Slave Interface: eth2

Slave Interface: eth3

[root@jktmmpsibdb01 network-scripts]# cat ifcfg-bond1

DEVICE=bond1

BONDING_MASTER=yes

TYPE=Bond

BONDING_OPTS="mode=1 downdelay=0 updelay=0 miimon=100 fail_over_mac=active"

IPADDR=10.64.25.61

NETMASK=255.255.252.0

MTU=9000

ONBOOT=yes

BOOTPROTO=none

NM_CONTROLLED=no

HOTPLUG="no"

[root@jktmmpsibdb01 network-scripts]# cat ifcfg-eth2

DEVICE=eth2

HWADDR=00:17:A4:77:08:6C

TYPE=Ethernet

ONBOOT=yes
BOOTPROTO=none

MASTER=bond1

SLAVE=yes

[root@jktmmpsibdb01 network-scripts]# cat ifcfg-eth3

DEVICE=eth3

HWADDR=00:17:A4:77:08:6E

TYPE=Ethernet

ONBOOT=yes

BOOTPROTO=none

MASTER=bond1

SLAVE=yes

[root@jktmmpsibdb01 network-scripts]# cat route-bond1

10.64.24.0/22 dev bond1 table prd

default via 10.64.24.1 dev bond1 table prd

[root@jktmmpsibdb01 network-scripts]# cat rule-bond1

from 10.64.25.61/22 table prd

to 10.64.25.61 table prd

SETTING BOND2 :

[root@jktmmpsibdb01 network-scripts]# cat /proc/net/bonding/bond2| grep eth

Currently Active Slave: eth4

Slave Interface: eth4

Slave Interface: eth5

[root@jktmmpsibdb01 network-scripts]# cat ifcfg-eth4

DEVICE=eth4

HWADDR=00:17:A4:77:08:70

TYPE=Ethernet

ONBOOT=yes

BOOTPROTO=none
MASTER=bond2

SLAVE=yes

[root@jktmmpsibdb01 network-scripts]# cat ifcfg-eth5

DEVICE=eth5

HWADDR=00:17:A4:77:08:72

TYPE=Ethernet

ONBOOT=yes

BOOTPROTO=none

MASTER=bond2

SLAVE=yes

[root@jktmmpsibdb01 network-scripts]# cat ifcfg-bond2

DEVICE=bond2

BONDING_MASTER=yes

TYPE=Bond

BONDING_OPTS="mode=1 downdelay=0 updelay=0 miimon=100 fail_over_mac=active"

IPADDR=10.64.29.52

NETMASK=255.255.252.0

MTU=9000

ONBOOT=yes

BOOTPROTO=none

NM_CONTROLLED=no

[root@jktmmpsibdb01 network-scripts]# cat route-bond2

10.64.28.0/22 dev bond2 table bkp

default via 10.64.28.1 dev bond2 table bkp

[root@jktmmpsibdb01 network-scripts]# cat rule-bond2

from 10.64.29.52/22 table bkp

to 10.64.29.52 table bkp


SETTING BOND3 IP PRIVATE :

[root@jktmmpsibdb01 network-scripts]# cat /proc/net/bonding/bond3| grep eth

Currently Active Slave: eth10

Slave Interface: eth10

Slave Interface: eth11

[root@jktmmpsibdb01 network-scripts]# cat ifcfg-bond3

DEVICE=bond3

BONDING_MASTER=yes

TYPE=Bond

BONDING_OPTS="mode=1 downdelay=0 updelay=0 miimon=100 fail_over_mac=active"

IPADDR=192.168.0.1

NETMASK=255.255.255.0

MTU=9000

ONBOOT=yes

BOOTPROTO=none

NM_CONTROLLED=no

HOTPLUG="no"

[root@jktmmpsibdb01 network-scripts]# cat ifcfg-eth10

DEVICE=eth10

HWADDR=00:17:A4:77:08:38

TYPE=Ethernet

ONBOOT=yes

BOOTPROTO=none

MASTER=bond3

SLAVE=yes

[root@jktmmpsibdb01 network-scripts]# cat ifcfg-eth11

DEVICE=eth11

HWADDR=00:17:A4:77:08:42

TYPE=Ethernet
ONBOOT=yes

BOOTPROTO=none

MASTER=bond3

SLAVE=yes

You might also like