6.3 Verify and Troubleshoot EtherChannel
Логика проверки
Когда EtherChannel не работает, обычно проблема не в одной “магической” команде, а в несовместимости настроек на двух концах.
Проверка обычно идёт в таком порядке:
- посмотреть статус
port-channel; - посмотреть summary flags;
- проверить protocol и member ports;
- сравнить running-config с двух сторон;
- исправить 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-channelshow 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 часто:
- удаляют старый
port-channel; - заново собирают group;
- снова вешают 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.