Search Posts

Port-channel

An example of port-channel with 3 switches.

Partial config of switch SW1:

interface Port-channel1
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface Port-channel2
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface GigabitEthernet0/0
 switchport trunk encapsulation dot1q
 switchport mode trunk
 media-type rj45
 negotiation auto
 channel-group 1 mode active
!
interface GigabitEthernet0/1
 switchport trunk encapsulation dot1q
 switchport mode trunk
 media-type rj45
 negotiation auto
 channel-group 1 mode active
!
interface GigabitEthernet0/2
 switchport trunk encapsulation dot1q
 switchport mode trunk
 media-type rj45
 negotiation auto
 channel-group 2 mode active
!
interface GigabitEthernet0/3
 switchport trunk encapsulation dot1q
 switchport mode trunk
 media-type rj45
 negotiation auto
 channel-group 2 mode active

Creating port-channel step by step

Step 1: create interface port-channel

SW1#configure terminal
SW1(config)#interface port-channel 4
SW1(config-if)#exit

Step 2: show running-config
[partial config]

SW1#show running-config

!
interface Port-channel4
!

Step 3: make interfaces member of channel-group
In this example, 2 interfaces are added to channel-group 4.

SW1#configure terminal
SW1(config)#interface gigabitEthernet 1/0
SW1(config-if)#channel-group 4 mode active
SW1(config-if)#exit
SW1(config)#interface gigabitEthernet 1/1
SW1(config-if)#channel-group 4 mode active
SW1(config-if)#end

Step 4: show running-config

SW1#show running-config
[partial config]
!
interface Port-channel4
!
interface GigabitEthernet1/0
 media-type rj45
 negotiation auto
 channel-group 4 mode active
!
interface GigabitEthernet1/1
 media-type rj45
 negotiation auto
 channel-group 4 mode active
!

Step 5: configure port-channel
Configure the port-channel with “switchport trunk encapsulation dot1q” and “switchport mode trunk”.

SW1#configure terminal
SW1(config)#interface port-channel 4
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#switchport mode trunk

Step 6: show running-config

SW1#show running-config
[partial config]
!
interface Port-channel4
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface GigabitEthernet1/0
 switchport trunk encapsulation dot1q
 switchport mode trunk
 media-type rj45
 negotiation auto
 channel-group 4 mode active
!
interface GigabitEthernet1/1
 switchport trunk encapsulation dot1q
 switchport mode trunk
 media-type rj45
 negotiation auto
 channel-group 4 mode active

The interfaces, which are member of channel-group 4, also receive the configuration as configured on port-channel4.