11.6 Module Practice and Quiz
Что нужно уметь проговорить без подсказки
После Module 11 ты должен быстро объяснить:
- как secure unused ports;
- как работает
Port Security; - чем отличаются violation modes
protect,restrict,shutdown; - как harden’ить trunks против VLAN attacks;
- как настраивать
DHCP Snooping,DAI,PortFast,BPDU Guard.
Короткий summary
| Тема | Ключевая мысль |
|---|---|
| Unused ports | unused VLAN + shutdown |
| Port Security | контроль MAC addresses на port |
| VLAN attack mitigation | manual trunking + no DTP + non-default native VLAN |
| DHCP Snooping | trusted/untrusted DHCP model |
| DAI | валидирует ARP через bindings |
| PortFast | быстрый access port startup |
| BPDU Guard | блокирует suspicious BPDUs на access ports |
Формулы для памяти
| Формула | Смысл |
|---|---|
protect | drop only |
restrict | drop + log + counter |
shutdown | drop + 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 summaryswitchport 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 ты понял правильно.