book2

11.6 Module Practice and Quiz

Что нужно уметь проговорить без подсказки

После Module 11 ты должен быстро объяснить:

  1. как secure unused ports;
  2. как работает Port Security;
  3. чем отличаются violation modes protect, restrict, shutdown;
  4. как harden’ить trunks против VLAN attacks;
  5. как настраивать DHCP Snooping, DAI, PortFast, BPDU Guard.

Короткий summary

ТемаКлючевая мысль
Unused portsunused VLAN + shutdown
Port Securityконтроль MAC addresses на port
VLAN attack mitigationmanual trunking + no DTP + non-default native VLAN
DHCP Snoopingtrusted/untrusted DHCP model
DAIвалидирует ARP через bindings
PortFastбыстрый access port startup
BPDU Guardблокирует suspicious BPDUs на access ports

Формулы для памяти

ФормулаСмысл
protectdrop only
restrictdrop + log + counter
shutdowndrop + log + counter + err-disabled
DAI requires DHCP Snoopingключевая зависимость
server/uplink = trustedдля DHCP/ARP security
PortFast + BPDU Guardзащита access ports

Мини-проверка себя

Попробуй ответить:

  • Почему unused port нельзя просто “оставить как есть”?
  • Почему Port Security требует access mode?
  • Чем sticky удобнее pure dynamic learning?
  • Почему DAI без DHCP snooping не имеет нормальной базы для проверки?
  • Что случится, если access port с BPDU Guard получит BPDU?

Команды для повторения

interface range fa0/8 - 24
shutdown
switchport mode access
switchport port-security
switchport port-security maximum 4
switchport port-security mac-address aaaa.bbbb.1234
switchport port-security mac-address sticky
switchport port-security aging time 10
switchport port-security aging type inactivity
switchport port-security violation restrict
show port-security
show port-security interface fa0/5
show port-security address
switchport nonegotiate
switchport trunk native vlan 999
ip dhcp snooping
ip dhcp snooping trust
ip dhcp snooping limit rate 6
ip dhcp snooping vlan 10,20,30-49
show ip dhcp snooping
show ip dhcp snooping binding
ip arp inspection vlan 10
ip arp inspection trust
ip arp inspection validate src-mac dst-mac ip
spanning-tree portfast
spanning-tree portfast default
spanning-tree bpduguard enable
spanning-tree portfast bpduguard default
show spanning-tree summary

switchport port-security ciscoIOScommand Включает Port Security на port.

switchport port-security maximum 4 ciscoIOScommand Задаёт maximum secure MAC count.

switchport port-security mac-address sticky ciscoIOScommand Включает sticky learning.

switchport port-security violation restrict ciscoIOScommand Включает violation mode restrict.

show port-security ciscoIOScommand Показывает port security summary.

show port-security interface fa0/5 ciscoIOScommand Показывает details для одного secure port.

show port-security address ciscoIOScommand Показывает secure MAC table.

switchport nonegotiate ciscoIOScommand Отключает DTP negotiation.

switchport trunk native vlan 999 ciscoIOScommand Меняет native VLAN.

ip dhcp snooping ciscoIOScommand Включает DHCP Snooping globally.

ip dhcp snooping trust ciscoIOScommand Делает interface trusted для DHCP.

ip dhcp snooping limit rate 6 ciscoIOScommand Лимитирует DHCP packet rate на untrusted port.

show ip dhcp snooping ciscoIOScommand Показывает status DHCP snooping.

show ip dhcp snooping binding ciscoIOScommand Показывает DHCP snooping bindings.

ip arp inspection vlan 10 ciscoIOScommand Включает DAI на VLAN 10.

ip arp inspection trust ciscoIOScommand Делает interface trusted для DAI.

ip arp inspection validate src-mac dst-mac ip ciscoIOScommand Включает дополнительные DAI проверки.

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

spanning-tree portfast default ciscoIOScommand Включает PortFast globally для access ports.

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

spanning-tree portfast bpduguard default ciscoIOScommand Включает BPDU Guard globally для PortFast-enabled ports.

show spanning-tree summary ciscoIOScommand Показывает summary по STP/PortFast/BPDU Guard defaults.

Самая важная мысль модуля

В этом модуле нужно не просто помнить команды, а понимать trust model и связь feature с конкретной атакой.

Если повторяешь быстро

Сначала выучи Port Security modes, потом DHCP Snooping -> DAI dependency, потом PortFast + BPDU Guard.

Итог модуля

Если ты можешь увидеть LAN attack scenario и сразу сказать, какой switch feature включать, на каких ports и с каким trust behavior, значит Module 11 ты понял правильно.