Guenadi N Jilevski's Oracle BLOG

Oracle RAC, DG, EBS, DR and HA DBA BLOG

NIC Bonding in OEL5.X and RH 5.X

NIC Bonding in OEL5.X and RH 5.X

NIC bonding allows us to aggregate multiple network cards to act as one, allowing increased bandwidth and redundancy.ifconfig output is as shown below.
“). Before we start the bond1”,) and we want to bond them so they look like a single interface (“eth7” and “eth5”, “eth3”, “eth1”) and we have another four network interfaces (“bond0”,) and we want to bond them so they look like a single interface (“eth4” and “eth4”, “eth2”, “eth0Let’s assume we have four network interfaces (”

[root@raclinux1 ~]# ifconfig -a

eth0 Link encap:Ethernet HWaddr 00:0C:29:38:C8:4B

inet addr:192.168.2.200 Bcast:192.168.2.255 Mask:255.255.255.0

inet6 addr: fe80::20c:29ff:fe38:c84b/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:1317 errors:0 dropped:0 overruns:0 frame:0

TX packets:108 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:351162 (342.9 KiB) TX bytes:20935 (20.4 KiB)

Interrupt:51 Base address:0x2424

eth1 Link encap:Ethernet HWaddr 00:0C:29:38:C8:55

inet addr:10.10.4.201 Bcast:10.10.4.255 Mask:255.255.255.0

inet6 addr: fe80::20c:29ff:fe38:c855/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:1011 errors:0 dropped:0 overruns:0 frame:0

TX packets:106 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:187767 (183.3 KiB) TX bytes:20280 (19.8 KiB)

Interrupt:75 Base address:0x24a4

eth2 Link encap:Ethernet HWaddr 00:0C:29:38:C8:5F

inet addr:192.168.2.202 Bcast:192.168.2.255 Mask:255.255.255.0

inet6 addr: fe80::20c:29ff:fe38:c85f/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:889 errors:0 dropped:0 overruns:0 frame:0

TX packets:105 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:171252 (167.2 KiB) TX bytes:19852 (19.3 KiB)

Interrupt:67 Base address:0x2824

eth3 Link encap:Ethernet HWaddr 00:0C:29:38:C8:69

inet addr:10.10.4.203 Bcast:10.10.4.255 Mask:255.255.255.0

inet6 addr: fe80::20c:29ff:fe38:c869/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:818 errors:0 dropped:0 overruns:0 frame:0

TX packets:151 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:154542 (150.9 KiB) TX bytes:28532 (27.8 KiB)

Interrupt:59 Base address:0x28a4

eth4 Link encap:Ethernet HWaddr 00:0C:29:38:C8:73

inet addr:192.168.2.204 Bcast:192.168.2.255 Mask:255.255.255.0

inet6 addr: fe80::20c:29ff:fe38:c873/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:824 errors:0 dropped:0 overruns:0 frame:0

TX packets:99 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:155278 (151.6 KiB) TX bytes:18886 (18.4 KiB)

Interrupt:51 Base address:0x2c24

eth5 Link encap:Ethernet HWaddr 00:0C:29:38:C8:7D

inet addr:10.10.4.205 Bcast:10.10.4.255 Mask:255.255.255.0

inet6 addr: fe80::20c:29ff:fe38:c87d/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:761 errors:0 dropped:0 overruns:0 frame:0

TX packets:116 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:143643 (140.2 KiB) TX bytes:19833 (19.3 KiB)

Interrupt:75 Base address:0x2ca4

eth6 Link encap:Ethernet HWaddr 00:0C:29:38:C8:87

inet addr:192.168.2.206 Bcast:192.168.2.255 Mask:255.255.255.0

inet6 addr: fe80::20c:29ff:fe38:c887/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:745 errors:0 dropped:0 overruns:0 frame:0

TX packets:94 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:136713 (133.5 KiB) TX bytes:17767 (17.3 KiB)

Interrupt:67 Base address:0x3024

eth7 Link encap:Ethernet HWaddr 00:0C:29:38:C8:91

inet addr:10.10.4.207 Bcast:10.10.4.255 Mask:255.255.255.0

inet6 addr: fe80::20c:29ff:fe38:c891/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:730 errors:0 dropped:0 overruns:0 frame:0

TX packets:107 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:129165 (126.1 KiB) TX bytes:18482 (18.0 KiB)

Interrupt:59 Base address:0x30a4

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:6873 errors:0 dropped:0 overruns:0 frame:0

TX packets:6873 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:8958464 (8.5 MiB) TX bytes:8958464 (8.5 MiB)

sit0 Link encap:IPv6-in-IPv4

NOARP MTU:1480 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00

inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0

inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:55 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:0 (0.0 b) TX bytes:9248 (9.0 KiB)

[root@raclinux1 ~]#


Add the following line to the “/etc/modprobe.conf” file.

alias bond0 bonding

alias bond1 bonding

 

[root@raclinux1 ~]# cat /etc/modprobe.conf

alias eth0 vmxnet

alias eth1 vmxnet

alias eth2 vmxnet

alias eth3 vmxnet

alias eth4 vmxnet

alias eth5 vmxnet

alias eth6 vmxnet

alias eth7 vmxnet

alias scsi_hostadapter mptbase

alias scsi_hostadapter1 mptspi

alias scsi_hostadapter2 ata_piix

# Added by VMware Tools

install pcnet32 /sbin/modprobe -q –ignore-install vmxnet;/sbin/modprobe -q –ignore-install pcnet32 $CMDLINE_OPTS;/bin/true

alias char-major-14 sb

options sb io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330

#Added for bonding

alias bond0 bonding

alias bond1 bonding

[root@raclinux1 ~]#

The files defining the regular and bonding interfaces are located in the “/etc/sysconfig/network-scripts” directory. Create a new file called “ifcfg-bond0” and “ifcfg-bond1” for the bonding interface with the following contents (adjust the network parameters as applicable).

DEVICE=bond0

BOOTPROTO=none

ONBOOT=yes

NETWORK=192.168.2.0

NETMASK=255.255.255.0

IPADDR=192.168.2.131

USERCTL=no

BONDING_OPTS=”mode=1 miimon=100″

 

 

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

DEVICE=bond0

BOOTPROTO=none

ONBOOT=yes

NETWORK=192.168.2.0

NETMASK=255.255.255.0

IPADDR=192.168.2.131

USERCTL=no

BONDING_OPTS=”mode=1 miimon=100″

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

DEVICE=bond1

BOOTPROTO=none

ONBOOT=yes

NETWORK=10.10.4.0

NETMASK=255.255.255.0

IPADDR=10.10.4.131

USERCTL=no

BONDING_OPTS=”mode=1 miimon=100″

[root@raclinux1 network-scripts]#

A description of the bonding options is available here.

Amend the existing “ifcfg-ethX” files, adding the “MASTER” and “SLAVE” parameters. The contents of these files should look like this.

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

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

DEVICE=eth0

BOOTPROTO=none

HWADDR=00:0C:29:38:C8:4B

IPV6INIT=yes

IPV6_AUTOCONF=yes

ONBOOT=yes

DHCP_HOSTNAME=raclinux1.gj.com

TYPE=Ethernet

PEERDNS=yes

USERCTL=no

IPADDR=192.168.2.200

NETMASK=255.255.255.0

GATEWAY=192.168.2.1

MASTER=bond0

SLAVE=yes

[root@raclinux1 network-scripts]#

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

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

DEVICE=eth2

BOOTPROTO=none

BROADCAST=192.168.2.255

HWADDR=00:0C:29:38:C8:5F

IPADDR=192.168.2.202

IPV6INIT=yes

IPV6_AUTOCONF=yes

NETMASK=255.255.255.0

NETWORK=192.168.2.0

ONBOOT=yes

TYPE=Ethernet

PEERDNS=yes

USERCTL=no

MASTER=bond0

SLAVE=yes

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

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

DEVICE=eth4

BOOTPROTO=none

HWADDR=00:0C:29:38:C8:73

IPV6INIT=yes

IPV6_AUTOCONF=yes

ONBOOT=yes

TYPE=Ethernet

PEERDNS=yes

USERCTL=no

NETMASK=255.255.255.0

IPADDR=192.168.2.204

GATEWAY=192.168.2.1

MASTER=bond0

SLAVE=yes

[root@raclinux1 network-scripts]# cat ifcfg-eth6

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

DEVICE=eth6

BOOTPROTO=none

BROADCAST=192.168.2.255

HWADDR=00:0C:29:38:C8:87

IPADDR=192.168.2.206

IPV6INIT=yes

IPV6_AUTOCONF=yes

NETMASK=255.255.255.0

NETWORK=192.168.2.0

ONBOOT=yes

TYPE=Ethernet

PEERDNS=yes

USERCTL=no

MASTER=bond0

SLAVE=yes

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

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

DEVICE=eth1

BOOTPROTO=none

BROADCAST=10.10.4.255

HWADDR=00:0c:29:38:c8:55

IPADDR=10.10.4.201

IPV6INIT=yes

IPV6_AUTOCONF=yes

NETMASK=255.255.255.0

NETWORK=10.10.4.0

ONBOOT=yes

TYPE=Ethernet

PEERDNS=yes

USERCTL=yes

MASTER=bond1

SLAVE=yes

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

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

DEVICE=eth3

BOOTPROTO=none

BROADCAST=10.10.4.255

HWADDR=00:0C:29:38:C8:69

IPADDR=10.10.4.203

IPV6INIT=yes

IPV6_AUTOCONF=yes

NETMASK=255.255.255.0

NETWORK=10.10.4.0

ONBOOT=yes

TYPE=Ethernet

PEERDNS=yes

USERCTL=no

MASTER=bond1

SLAVE=yes

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

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

DEVICE=eth5

BOOTPROTO=none

BROADCAST=10.10.4.255

HWADDR=00:0C:29:38:C8:7D

IPADDR=10.10.4.205

IPV6INIT=yes

IPV6_AUTOCONF=yes

NETMASK=255.255.255.0

NETWORK=10.10.4.0

ONBOOT=yes

TYPE=Ethernet

PEERDNS=yes

USERCTL=no

MASTER=bond1

SLAVE=yes

[root@raclinux1 network-scripts]# cat ifcfg-eth7

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

DEVICE=eth7

BOOTPROTO=none

BROADCAST=10.10.4.255

HWADDR=00:0C:29:38:C8:91

IPADDR=10.10.4.207

IPV6INIT=yes

IPV6_AUTOCONF=yes

NETMASK=255.255.255.0

NETWORK=10.10.4.0

ONBOOT=yes

TYPE=Ethernet

PEERDNS=yes

USERCTL=no

MASTER=bond1

SLAVE=yes

[root@raclinux1 network-scripts]#

Restart the network service.

# service network restart

 


The bonded interface can be displayed using the “ifconfig” command, which shows “bond0” and “bond1” running as the master and all “ethX” running as slaves.

# ifconfig –a

 

 

[root@raclinux1 network-scripts]# ifconfig -a

bond0 Link encap:Ethernet HWaddr 00:0C:29:38:C8:4B

inet addr:192.168.2.131 Bcast:192.168.2.255 Mask:255.255.255.0

inet6 addr: fe80::20c:29ff:fe38:c84b/64 Scope:Link

UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1

RX packets:6423 errors:0 dropped:0 overruns:0 frame:0

TX packets:656 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:1489186 (1.4 MiB) TX bytes:130982 (127.9 KiB)

bond1 Link encap:Ethernet HWaddr 00:0C:29:38:C8:55

inet addr:10.10.4.131 Bcast:10.10.4.255 Mask:255.255.255.0

inet6 addr: fe80::20c:29ff:fe38:c855/64 Scope:Link

UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1

RX packets:5244 errors:0 dropped:0 overruns:0 frame:0

TX packets:868 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:974814 (951.9 KiB) TX bytes:175450 (171.3 KiB)

eth0 Link encap:Ethernet HWaddr 00:0C:29:38:C8:4B

UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1

RX packets:2681 errors:0 dropped:0 overruns:0 frame:0

TX packets:328 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:831437 (811.9 KiB) TX bytes:73037 (71.3 KiB)

Interrupt:51 Base address:0x2424

eth1 Link encap:Ethernet HWaddr 00:0C:29:38:C8:55

UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1

RX packets:1642 errors:0 dropped:0 overruns:0 frame:0

TX packets:277 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:311419 (304.1 KiB) TX bytes:60817 (59.3 KiB)

Interrupt:75 Base address:0x24a4

eth2 Link encap:Ethernet HWaddr 00:0C:29:38:C8:4B

UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1

RX packets:1313 errors:0 dropped:0 overruns:0 frame:0

TX packets:115 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:235803 (230.2 KiB) TX bytes:20332 (19.8 KiB)

Interrupt:67 Base address:0x2824

eth3 Link encap:Ethernet HWaddr 00:0C:29:38:C8:55

UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1

RX packets:1295 errors:0 dropped:0 overruns:0 frame:0

TX packets:226 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:248875 (243.0 KiB) TX bytes:45138 (44.0 KiB)

Interrupt:59 Base address:0x28a4

eth4 Link encap:Ethernet HWaddr 00:0C:29:38:C8:4B

UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1

RX packets:1255 errors:0 dropped:0 overruns:0 frame:0

TX packets:109 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:220382 (215.2 KiB) TX bytes:19366 (18.9 KiB)

Interrupt:51 Base address:0x2c24

eth5 Link encap:Ethernet HWaddr 00:0C:29:38:C8:55

UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1

RX packets:1183 errors:0 dropped:0 overruns:0 frame:0

TX packets:190 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:220943 (215.7 KiB) TX bytes:36695 (35.8 KiB)

Interrupt:75 Base address:0x2ca4

eth6 Link encap:Ethernet HWaddr 00:0C:29:38:C8:4B

UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1

RX packets:1174 errors:0 dropped:0 overruns:0 frame:0

TX packets:104 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:201564 (196.8 KiB) TX bytes:18247 (17.8 KiB)

Interrupt:67 Base address:0x3024

eth7 Link encap:Ethernet HWaddr 00:0C:29:38:C8:55

UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1

RX packets:1124 errors:0 dropped:0 overruns:0 frame:0

TX packets:175 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:193577 (189.0 KiB) TX bytes:32800 (32.0 KiB)

Interrupt:59 Base address:0x30a4

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:6931 errors:0 dropped:0 overruns:0 frame:0

TX packets:6931 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:8970108 (8.5 MiB) TX bytes:8970108 (8.5 MiB)

sit0 Link encap:IPv6-in-IPv4

NOARP MTU:1480 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00

inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0

inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:55 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:0 (0.0 b) TX bytes:9248 (9.0 KiB)

[root@raclinux1 network-scripts]#




For further information see:

June 15, 2010 - Posted by | oracle

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: