book2

11.5 Mitigate STP Attacks

PortFast и BPDU Guard

Для защиты access layer от STP-based attacks модуль делает упор на две features:

  • PortFast
  • BPDU Guard

Они особенно важны на end-user facing access ports.

Configure PortFast

На access port:

interface fa0/1
switchport mode access
spanning-tree portfast

Глобально для access ports:

spanning-tree portfast default

spanning-tree portfast ciscoIOScommand Включает PortFast на interface.

spanning-tree portfast default ciscoIOScommand Включает PortFast по умолчанию на всех access ports.

Проверка:

show running-config | begin span
show spanning-tree summary
show spanning-tree interface fa0/1 detail

show running-config | begin span ciscoIOScommand Показывает spanning-tree related configuration.

show spanning-tree summary ciscoIOScommand Даёт краткий обзор STP/PortFast/BPDU Guard defaults.

show spanning-tree interface fa0/1 detail ciscoIOScommand Показывает STP details по конкретному interface.

Configure BPDU Guard

На interface:

interface fa0/1
spanning-tree bpduguard enable

Глобально для PortFast-enabled ports:

spanning-tree portfast bpduguard default

spanning-tree bpduguard enable ciscoIOScommand Включает BPDU Guard на interface.

spanning-tree portfast bpduguard default ciscoIOScommand Включает BPDU Guard по умолчанию для PortFast-enabled ports.

Главная логика

Если access port с BPDU Guard получает BPDU:

  • это подозрительно;
  • port уходит в err-disabled;
  • unauthorized switch insertion effectively block’ится.

Golden rule

Always enable BPDU Guard on PortFast-enabled ports

Быстрый шаблон

FeatureГде использоватьЗачем
PortFastend-device access portsускорить forwarding
BPDU Guardте же access portsблокировать rogue BPDUs

Exam trap

PortFast не для switch-to-switch links. И BPDU Guard логично применять именно на access / end-device ports.

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

Ты можешь правильно выбрать, где включать PortFast, где включать BPDU Guard, и объяснить, почему BPDU на access port — это red flag.