Friday, May 25, 2012

Red Hat Enterprise Linux 5.x LACP

[root@rhel5 ~]# uname -a
Linux egwgwcs 2.6.18-308.el5PAE #1 SMP Fri Jan 27 17:40:09 EST 2012 i686 i686 i386 GNU/Linux
[root@rhel5 ~]#
[root@rhel5 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.8 (Tikanga)
[root@rhel5 ~]#
[root@rhel5 ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
IPADDR=192.168.1.101
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
ONBOOT=yes
BOOTPROTO=none
BONDING_OPTS="mode=4 miimon=100"
[root@rhel5 ~]#
[root@rhel5 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
MACADDR=00:10:18:a2:07:ac
ONBOOT=yes
TYPE=Ethernet
MASTER=bond0
SLAVE=yes
[root@rhel5 ~]#
[root@rhel5 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
MACADDR=00:10:18:a2:07:ad
ONBOOT=yes
TYPE=Ethernet
MASTER=bond0
SLAVE=yes
[root@rhel5 ~]#
[root@rhel5 ~]# ls -l /etc/sysconfig/networking/devices
total 0
[root@rhel5 ~]#

Reboot the server.
Note: not modifying anything in /etc/modprobe.conf and /etc/rc.d/rc.local

[root@rhel5 ~]# ifconfig
bond0     Link encap:Ethernet  HWaddr 00:10:18:A2:07:AC
          inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::210:18ff:fea2:7ac/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:17420591 errors:0 dropped:0 overruns:0 frame:0
          TX packets:545949 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4014084008 (3.7 GiB)  TX bytes:178162877 (169.9 MiB)

eth0      Link encap:Ethernet  HWaddr 00:10:18:A2:07:AC
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:16901178 errors:0 dropped:0 overruns:0 frame:0
          TX packets:505049 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3914119872 (3.6 GiB)  TX bytes:172584206 (164.5 MiB)
          Interrupt:177

eth1      Link encap:Ethernet  HWaddr 00:10:18:A2:07:AC
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:519413 errors:0 dropped:0 overruns:0 frame:0
          TX packets:40900 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:99964136 (95.3 MiB)  TX bytes:5578671 (5.3 MiB)
          Interrupt:130

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:7821740 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7821740 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2779914013 (2.5 GiB)  TX bytes:2779914013 (2.5 GiB)

[root@rhel5 ~]#
[root@rhel5 ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.4.0-1 (October 7, 2008)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

802.3ad info
LACP rate: slow
Active Aggregator Info:
        Aggregator ID: 1
        Number of ports: 2
        Actor Key: 17
        Partner Key: 32925
        Partner Mac Address: 00:23:04:ee:be:01

Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:10:18:a2:07:ac
Aggregator ID: 1

Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 00:10:18:a2:07:ad
Aggregator ID: 1
[root@rhel5 ~]#

Please leave a comment if this is working for you too. Thanks. :-)

1 comment:

  1. https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s2-networkscripts-interfaces-chan.html

    ReplyDelete