book2

6.3 Verify and Troubleshoot EtherChannel

Логика проверки

Когда EtherChannel не работает, обычно проблема не в одной “магической” команде, а в несовместимости настроек на двух концах.

Проверка обычно идёт в таком порядке:

  1. посмотреть статус port-channel;
  2. посмотреть summary flags;
  3. проверить protocol и member ports;
  4. сравнить running-config с двух сторон;
  5. исправить mode mismatch или trunk/VLAN mismatch.

Главные verify-команды

show interfaces port-channel 1
show etherchannel summary
show etherchannel port-channel
show interfaces f0/1 etherchannel
show run | begin interface port-channel

show interfaces port-channel 1 ciscoIOScommand Показывает общий status logical port-channel interface.

show etherchannel summary ciscoIOScommand Главная verify-команда. Показывает protocol, состояние группы и member ports.

show etherchannel port-channel ciscoIOScommand Показывает подробности по конкретному port-channel и его member links.

show interfaces f0/1 etherchannel ciscoIOScommand Показывает роль конкретного physical interface внутри EtherChannel.

show run | begin interface port-channel ciscoIOScommand Показывает relevant config по port-channel и member ports, удобно для сравнения с другой стороной.

Как читать show etherchannel summary

В выводе особенно полезны flags:

  • S = Layer 2;
  • U = in use;
  • P = bundled in port-channel;
  • D = down;
  • I = stand-alone.

Пример хорошего состояния:

Po1(SU)  LACP  Fa0/1(P) Fa0/2(P)

Это читается так:

  • Po1 — port-channel 1;
  • SU — Layer 2 и in use;
  • LACP — negotiation protocol;
  • P у member ports — interfaces реально bundled.

Плохой пример:

Po1(SD)  -  Fa0/1(D) Fa0/2(D)

Это значит, что channel down и нормально не работает.

Типичные проблемы

Самые частые причины:

  • native VLAN mismatch;
  • allowed VLAN mismatch;
  • часть ports trunk, часть access;
  • speed mismatch;
  • duplex mismatch;
  • incompatible negotiation modes;
  • на одной стороне on, на другой desirable или active.

Частая путаница

EtherChannel может не собраться не потому, что protocol плохой, а потому что trunk/VLAN settings на концах разные.

PAgP / LACP compatibility traps

Быстрое правило:

КомбинацияРезультат
on + onработает
on + active/passiveне работает
on + desirable/autoне работает
active + passiveработает
passive + passiveне работает
desirable + autoработает
auto + autoне работает

Troubleshooting example

В модуле пример показывает mismatch:

  • на одной стороне channel-group 1 mode on;
  • на другой channel-group 1 mode desirable.

Такой EtherChannel не поднимется.

Исправление:

S1(config)# no interface port-channel 1
S1(config)# interface range fa0/1 - 2
S1(config-if-range)# channel-group 1 mode desirable
S1(config-if-range)# no shutdown
S1(config)# interface port-channel 1
S1(config-if)# switchport mode trunk

Что делает каждая команда

no interface port-channel 1 ciscoIOScommand Удаляет текущий logical port-channel interface, чтобы пересоздать EtherChannel корректно.

channel-group 1 mode desirable ciscoIOScommand Назначает interfaces в PAgP EtherChannel group 1 в active negotiating mode.

no shutdown ciscoIOScommand Административно включает interfaces.

Почему иногда нужно пересоздавать channel

EtherChannel тесно связан со STP, и прямое изменение mode/settings на уже проблемном bundle иногда даёт side effects.

Поэтому в lab’ах и troubleshooting examples часто:

  1. удаляют старый port-channel;
  2. заново собирают group;
  3. снова вешают trunk config.

Практический подход

Если EtherChannel странно себя ведёт, не только смотри protocol mode. Всегда сравни speed, duplex, switchport mode, native VLAN, allowed VLANs.

Ещё один важный момент

Не путай:

  • PAgP / LACP — negotiation EtherChannel;
  • DTP — negotiation trunk;
  • STP — loop prevention.

На одной и той же trunk-связи эти вещи могут существовать рядом, но решают разные задачи.

Если понял тему

Ты можешь открыть show etherchannel summary, увидеть flags и быстро понять, это protocol mismatch, VLAN mismatch или member-port mismatch.