Port-channel (PC) / Virtual port-channel (VPC)

Port-Channel – is a bundle of 2+ links between 2 switches (see example below). Links bundled together and connection utilize throughput of both links. In comparison to spanning tree, links utilization become more efficient, as both links are used for data transfer.

Sample configuration.

Sw1

interface Port-channel12
  description Port-Channel to SW2
 
interface Ethernet0/1
  description Link to SW2
  switchport
  switchport mode trunk
  channel-group 12 mode active
interface Ethernet0/2
  description Link to SW2
  switchport
  switchport mode trunk
  channel-group 12 mode active

Sw2

interface Port-channel21
  description Port-Channel to SW1
 
interface Ethernet0/1
  description Link to SW1
  switchport
  switchport mode trunk
  channel-group 21 mode active
interface Ethernet0/2
  description Link to SW1
  switchport
  switchport mode trunk
  channel-group 21 mode active

Virtual Port-Channel – same as Port-Channel, with single difference – link on one side of VPC goes to two switches (see example below).

This feature LIMITED to some switch models.

Sample configuration.

SW1

interface port-channel 10
  description Port-channel-To-SW2-and-SW3

interface Ethernet1/1
  description link-To-SW2
  switchport mode trunk
  switchport trunk allowed vlan 10,20
  channel-group 10 mode active

interface Ethernet1/2
  description link-To-SW3
  switchport mode trunk
  switchport trunk allowed vlan 10,20
  channel-group 10 mode active

Sw2

vrf context vpc_keepalive

interface port-channel 10

  description Port-channel-To-SW1
  vpc 1

interface Ethernet1/49
  description VPC Keepalive link
  ip address 10.255.255.1/30
  no shu
  
interface Ethernet1/1
  description link-To-SW1
  switchport mode trunk
  switchport trunk allowed vlan 10,20
  spanning-tree port type edge trunk
  channel-group 10 mode active

vpc domain 1
  role priority 1
  peer-keepalive destination 10.255.255.2 source 10.255.255.1 vrf vpc_keepalive
  delay restore 450
  peer-gateway
  auto-recovery
  fast-convergence

interface port-channel100
  description vPC peer-link 
  vpc peer-link

interface Ethernet1/50
  description to SW3
  switchport
  switchport mode trunk
  channel-group 100 mode active
  no shutdown

  interface Ethernet1/51
  description to SW3
  switchport
  switchport mode trunk
  channel-group 100 mode active
  no shutdown

SW3

vrf context vpc_keepalive

interface port-channel 10
  description Port-channel-To-SW1
  vpc 1

interface Ethernet1/49
  description VPC keepalive link
  ip address 10.255.255.2/30
  no shu
  
interface Ethernet1/1
  description link-To-SW1
  switchport mode trunk
  switchport trunk allowed vlan 10,20
  spanning-tree port type edge trunk
  channel-group 10 mode active

vpc domain 1
  role priority 2
  peer-keepalive destination 10.255.255.1 source 10.255.255.2 vrf vpc_keepalive
  delay restore 450
  peer-gateway
  auto-recovery
  fast-convergence

interface port-channel100
  description vPC peer-link 
  vpc peer-link

interface Ethernet1/50
  description to SW2
  switchport
  switchport mode trunk
  channel-group 100 mode active
  no shutdown

  interface Ethernet1/51
  description to SW2
  switchport
  switchport mode trunk
  channel-group 100 mode active
  no shutdown