This is a write up of how to connect a cisco switch in this case a 2950 to Etherchannel LACP with a Fedora server. I have 14 Ethernet interfaces total. Since I finished up with my VCP lab(fail) and I have two extra interfaces why not etherchannel them together. I am using interface Fa0/3 and Fa0/4 on my 2950 and on my server eth0 and eth14.
With Linux distros like Fedorea,Centos this will work. Other Linux distros the etc interface files are collected in a /etc/interfaces. Fedora puts a config file for each interface. I WOULD HIGHLY SUGGEST not following this remotely, as anyone who has delt with Etherchannel things never go right the first try.
Step one is adding a bond0 interface, in fedora when you vi into a network interface that is not create it will then create the bond0 interface.
vi /etc/sysconfig/network-scripts/ifcfg-bond0
here is what my bond0 configuration looks like.
DEVICE=bond0
BONDING_OPTS=”mode=4 miimon=500 lacp-rate=1″ #mode=4 is LACP(802.3ad)
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
PEERDNS=no
IPV6INIT=no
NM_CONTROLLED=no
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=192.168.1.125
GATEWAY=192.168.1.1
DNS1=8.8.8.8
There are plenty of different aggregation methods, mode 4 is for LACP. There are some others which include backup interfaces and a round robin feature.
Next step is go under each of the interfaces and tell them they have a master which is bond0 and they are slaves to bond0. This is similar to saying they have a layer 2 connection over both interfaces. Bond0 is the layer3 in this case.
vi /etc/sysconfig/network-scripts/ifconfig-eth0
DEVICE=”eth0″
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
NM_CONTROLLED=”yes”
ONBOOT=”yes”
TYPE=Ethernet
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=”System eth0″
#UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
#IPADDR0=192.168.1.125
#PREFIX0=24
#GATEWAY0=192.168.1.1
#DNS1=8.8.8.8
#HWADDR=00:30:67:AA:37:23
Notice I have commented out the old configuration I had where this was my managment interface. Also notice in line 3 master is bond0 and line 4 slave is yes.
vi /etc/sysconfig/network-scripts/ifconfig-eth14
TYPE=Ethernet
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
NAME=”Auto eth14″
UUID=7399bea9-a957-4ec7-be5b-03b280e7fdd3
ONBOOT=yes
#HWADDR=00:1B:21:B0:74:56
#IPADDR0=155.1.146.100
PREFIX0=24
At this point the configuration is about 75% done on the Server. Next we move to the Cisco Device.
conf t
int range fa0/3 – 4
channel-protocol lacp
channel-group 1 mode active
At this point this will form a Port-channel interface.
AggSwitch#sh ip int po1
Port-channel1 is up, line protocol is up
Chances are it will not be up.
Configuration is done on the Cisco Device.
Moving back to to the server. This is where someone would lose managment remotely, we are going to attempt to bring up the bond.
ifup bond0
if this does not work I would restart /etc/network restart. Or reboot after you should see the following.
[burnyd@dynamips ~]# ifconfig bond0
bond0 Link encap:Ethernet HWaddr 00:30:67:AA:37:23
inet6 addr: fe80::230:67ff:feaa:3723/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:8169 errors:0 dropped:0 overruns:0 frame:0
TX packets:804 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:947585 (925.3 KiB) TX bytes:140837 (137.5 KiB)
Comments
I was going to write something on my blog about link aggregation, but this vastly improves whatever I had in mind. Nice writeup!