Saturday, August 20, 2011

Link aggregation - Port Channeling - (Etherchannel)

When connecting redundant paths to servers or other network gear such as switches, it is often ideal to connect multiple links for redundancy.  Enabling link aggregation allows all connected links to pass traffic in an active/active fashion.  Failure on 1 port does not affect the link as traffic just continues flowing on the remaining ports.  If Etherchannel is set up on 1 side (server, switch, whatever) it must be set up on the the side of the link!!

Multiple options exist for this feature.
EtherChannel - Cisco proprietrary standard.
Port Aggregation Protocol (PAgP) - Cisco proprietary - Allows for the dynamic creation of Fast Etherchannel links.  This is not supported on all Cisco devices and is going away.  Like the ISL of trunking :)
Link Aggregation Control Protocol (LACP) - IEEE standard 802.3ad

Some things to keep in mind about Port Channeling.
It is considered best practice to hard code the port channeling method and not rely on dynamic protocols.  PAgP isn't even supported on some Cisco devices such as NX-OS and IOS routers.
Check the load balancing method deployed on each configured device, defaults are not the same.

Switch IOS Configuration:

Port config:
Samples show trunks but can be access.

Interface GigabitEthernetX/X/X
 switchport trunk encapsulation dot1q
 switchport mode trunk                                                        
 channel-group 1 mode on
Interface GigabitEthernetX/X/Y
 switchport trunk encapsulation dot1q
 switchport mode trunk                                                        
 channel-group 1 mode on
Interface Port-Channel 1
 switchport trunk encapsulation dot1q
 switchport mode trunk

Check load-balance method:
show etherchannel load-balance
Recommended changes in config mode:

port-channel load-balance src-dst-ip !(to enable IP-based load balancing)
port-channel load-balance src-mac !(to enable MAC-based load balancing)

Port channel options:
switch (config-if)#channel-group 1 mode ?

  active     Enable LACP unconditionally
  auto       Enable PAgP only if a PAgP device is detected
  desirable  Enable PAgP unconditionally
  on         Enable Etherchannel only
  passive    Enable LACP only if a LACP device is detected

Check port channel config settings:
switch#show etherchannel 1 summary

Flags:  D - down        P - bundled in port-channel
        I - stand-alone s - suspended
        H - Hot-standby (LACP only)
        R - Layer3      S - Layer2
        U - in use      f - failed to allocate aggregator

        M - not in use, minimum links not met
        u - unsuitable for bundling
        w - waiting to be aggregated
        d - default port

Number of channel-groups in use: 1
Number of aggregators:           1

Group  Port-channel  Protocol    Ports
1      Po1(SU)          -        Te2/0/2(P)  Te3/0/2(P)

The commands are similar but different.  IOS uses etherchannel, NX-OS uses port-channel syntax.

Interface EthernetX/X
switchport mode trunk
 channel-group 1
Interface GigabitEthernetX/Y
switchport mode trunk
 channel-group 1
Interface Port-Channel 1
 switchport mode trunk

Check load-balance method:
show port-channel load-balance
The default should be source-dest-ip and you should be good to go here.

Port channel options:
Nexus(config-if)# channel-group 1 mode ?
 active   Set channeling mode to ACTIVE
  on       Set channeling mode to ON
  passive  Set channeling mode to PASSIVE
Check port channel config settings:
Nexus# show port-channel summary 
Flags:  D - Down        P - Up in port-channel (members)
        I - Individual  H - Hot-standby (LACP only)
        s - Suspended   r - Module-removed
        S - Switched    R - Routed
        U - Up (port-channel)
Group Port-       Type     Protocol  Member Ports
1     Po1(SU)     Eth      NONE      Eth1/9(P)    Eth1/10(P)

ASA (New in 8.4!)
No Global load-balance command.  It goes under the port-channel.  When using etherchannel, you'll probably want to start using trunking since you'll be using up more interfaces.

interface Ethernet0/1
channel-group 1 mode on
interface Ethernet0/2
channel-group 1 mode on
interface port-channel1
port-channel load-balance src-dst-ip-port

IOS Routers:
Etherchannel on IOS routers looks to be supported on 2811 and above it looks like.  Not all modules are supported!  Load balancing can not be configured.  IOS routers are set to source and destination IP load balancing.  Only 802.1Q trunking is supported.  Who uses ISL anymore!?

interface Port-channel1
ip add
int GigabitEthernet0/0
channel-group 1
int GigabitEthernet0/1

VMware server:
To configure vSwitch properties for load balancing:
Source: VMware KB
  1. Click the ESX host.
  2. Click the Configuration tab.
  3. Click the Networking link.
  4. Click Properties.
  5. Click the virtual switch in the Ports tab and click Edit.
  6. Click the NIC Teaming tab.
  7. From the Load Balancing dropdown, choose Route based on ip hash.
  8. Verify that there are two or more network adapters listed under Active Adapters.
    Note: The only load balancing option for vSwitch or vDistributed Switch that can be used with EtherChannel is IP HASH.
    • Do not use beacon probing with IP HASH load balancing.
    • Do not configure standby or unused uplinks with IP HASH load balancing.
    • VMware support only one EtherChannel per vSwitch or vNetwork Distributed Switch (vDS).

    No comments: