Search This Blog

Friday, November 11, 2011

Cisco IOS Ether-Channel Configuration


Brief
Ether-Channel allows multiple physical Ethernet links to combine into one logical channel. This allows load sharing of traffic among the links in the channel as well as redundancy in the event that one or more links in the channel fail. Ether-Channel can be used to interconnect LAN switches, routers, servers, and clients via unshielded twisted pair (UTP) wiring or single-mode and multimode fiber.

Guidelines
     1. All physical interfaces, which belong to the same logical interface (port-channel) on the same switch, must be with the same physical characteristic (all Fast-Ethernet or all Giga-Ethernet).
     2. All switchport commands must be configured on physical interfaces before configuring the logical interface.
     3. Issue the command channel-group x, on the physical interface, will create the logical interface automatically while l inheriting the entire configuration.

Diagram



Configuration

Layer-2 FEC/GEC
SW1:
SW1(config)# interface gigabitEthernet 0/1
SW1(config-if)#switchport mode access
SW1(config-if)#switchport nonegotiate
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#switchport mode trunk
SW1(config-if)# channel-group 1 mode active
Creating a port-channel interface Port-channel 1
SW1(config-if)# exit
SW1(config)# interface gigabitEthernet 0/2
SW1(config-if)#switchport mode access
SW1(config-if)#switchport nonegotiate
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#switchport mode trunk
SW1(config-if)# channel-group 1 mode active
SW1(config-if)# exit

SW2:
SW2(config)# interface fastEthernet 0/1
SW2(config-if)#switchport mode access
SW2(config-if)#switchport nonegotiate
SW2(config-if)#switchport trunk encapsulation dot1q
SW2(config-if)#switchport mode trunk
SW2(config-if)# channel-group 2 mode active
Creating a port-channel interface Port-channel 2
SW2(config-if)# exit
SW2(config)# interface fastEthernet 0/2
SW2(config-if)#switchport mode access
SW2(config-if)#switchport nonegotiate
SW2(config-if)#switchport trunk encapsulation dot1q
SW2(config-if)#switchport mode trunk
SW2(config-if)# channel-group 2 mode active
SW2(config-if)# exit
The nonegotiate ensure that no DTP messages will be exchanged and that the port will be trunk without negotiation.
The channel-group will command will create automatically the logical interface port-channel
The mode active will force the use in LACP protocol

Verification
SW2#show etherchannel 2 summary
Flags:  D - down        P - in port-channel
        I - stand-alone s - suspended
        H - Hot-standby (LACP only)
        R - Layer3      S - Layer2
        u - unsuitable for bundling
        U - in use      f - failed to allocate aggregator
        d - default port

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

Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
2      Po2(SU)         LACP      Fa0/1(P)    Fa0/2(P)   
In the table we can see which interfaces are members of the port-channel bundle and the port-channel status (S – Layer-2, U – In use) 

SW2#show etherchannel 2 protocol
Protocol:  LACP
Shows which protocol is been used in the port-channel Ether-channel, PAgP or LACP 802.3ad

SW2#sh etherchannel 2 detail
Group state = L2
Ports: 2   Maxports = 16
Port-channels: 1 Max Port-channels = 16
Protocol:   LACP
                Ports in the group:
                -------------------
Port: Fa0/1
------------

Port state    = Up Mstr In-Bndl
Channel group = 2           Mode = Active      Gcchange = -
Port-channel  = Po2         GC   =   -         Pseudo port-channel = Po2
Port index    = 0           Load = 0x00        Protocol =   LACP

Flags:  S - Device is sending Slow LACPDUs   F - Device is sending fast LACPDUs.
        A - Device is in active mode.        P - Device is in passive mode.

Local information:
                            LACP port     Admin     Oper    Port     Port
Port      Flags   State     Priority      Key       Key     Number   State
Fa0/1     SA      bndl      32768         0x2       0x2     0x1      0x3D 

Partner's information:
         
                  LACP port                        Oper    Port     Port
Port      Flags   Priority  Dev ID         Age     Key     Number   State
Fa0/1     SA      32768     108c.cf99.e980   4s    0x1     0x1      0x3D 

Age of the port in the current state: 00d:00h:09m:40s

Port: Fa0/2
------------

Port state    = Up Mstr In-Bndl
Channel group = 2           Mode = Active      Gcchange = -
Port-channel  = Po2         GC   =   -         Pseudo port-channel = Po2
Port index    = 0           Load = 0x00        Protocol =   LACP

Flags:  S - Device is sending Slow LACPDUs   F - Device is sending fast LACPDUs.
        A - Device is in active mode.        P - Device is in passive mode.

Local information:
                            LACP port     Admin     Oper    Port     Port
Port      Flags   State     Priority      Key       Key     Number   State
Fa0/2     SA      bndl      32768         0x2       0x2     0x2      0x3D 

Partner's information:

                  LACP port                        Oper    Port     Port
Port      Flags   Priority  Dev ID         Age     Key     Number   State
Fa0/2     SA      32768     108c.cf99.e980   9s    0x1     0x2      0x3D 

Age of the port in the current state: 00d:00h:09m:41s

                Port-channels in the group:
                ----------------------

Port-channel: Po2    (Primary Aggregator)

------------

Age of the Port-channel   = 00d:00h:13m:31s
Logical slot/port   = 1/0          Number of ports = 2
HotStandBy port = null
Port state          = Port-channel Ag-Inuse
Protocol            =   LACP

Ports in the Port-channel:

Index   Load   Port     EC state        No of bits
------+------+------+------------------+-----------
  0     00     Fa0/1    Active    0
  0     00     Fa0/2    Active    0

Time since last port bundled:    00d:00h:09m:43s    Fa0/2
Show more detailed information on the port-channel

Port-channel configuration
SW1 Port-channel 1 configuration:
SW1(config)# interface interface port-channel 1
SW1(config-if)# switchport trunk allowed vlan 1-5
SW1(config-if)# switchport trunk native vlan 5
SW1(config-if)# exit
2:08:13: %SPANTREE-2-RECV_PVID_ERR: Received BPDU with inconsistent peer vlan id 1 on Port-channel2 VLAN5.
02:08:13: %SPANTREE-2-BLOCK_PVID_PEER: Blocking Port-channel2 on VLAN0001. Inconsistent peer vlan.
02:08:13: %SPANTREE-2-BLOCK_PVID_LOCAL: Blocking Port-channel2 on VLAN0005. Inconsistent local vlan.
02:08:14: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan5, changed state to down
02:08:36: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/1 (5), with SW1 GigabitEthernet0/1 (1).

SW2 Port-channel 2 configuration:
SW2(config)# interface interface port-channel 2
SW2(config-if)# switchport trunk allowed vlan 1-5
SW2(config-if)# switchport trunk native vlan 5
SW2(config-if)# exit

We can configure the allowed VLAN’s and native VLAN only on the port-channel, there is no need to configure it on the physical interfaces also.
Note that the native VLAN must be match on the trunk.

Verification
SW1#show interfaces port-channel 1 trunk

Port        Mode         Encapsulation  Status        Native vlan
Po1         on           802.1q         trunking      5

Port        Vlans allowed on trunk
Po1         1-5

Port        Vlans allowed and active in management domain
Po1         1-5

Port        Vlans in spanning tree forwarding state and not pruned
Po1         1-5

SW1#show interfaces gigabitEthernet 0/1 trunk

Port        Mode         Encapsulation  Status        Native vlan
Gi0/1       on           802.1q         trunk-inbndl  5
                                      (Po1)

Port        Vlans allowed on trunk
Gi0/1       1-5

Port        Vlans allowed and active in management domain
Gi0/1       1-5

Port        Vlans in spanning tree forwarding state and not pruned
Gi0/1       1-5



No comments:

Post a Comment