10.3 Layer 2 Security Threats
Почему Layer 2 так важен
Layer 2 долго считали “внутренним и доверенным”.
Но сегодня это слабое место, потому что:
- BYOD добавляет непредсказуемые devices;
- insider threats реальны;
- switch ports часто физически доступны;
- многие Layer 2 protocols исторически проектировались не под hostile environment.
Если attacker получает контроль на Layer 2, он может ломать всё выше.
Attack categories
Модуль выделяет такие категории:
| Категория | Примеры |
|---|---|
| MAC Table Attacks | MAC flooding |
| VLAN Attacks | VLAN hopping, double-tagging |
| DHCP Attacks | starvation, spoofing |
| ARP Attacks | spoofing, poisoning |
| Address Spoofing | fake IP/MAC identity |
| STP Attacks | root bridge manipulation |
Главные mitigation mechanisms
Это одна из самых важных таблиц всего модуля:
| Mitigation | Что защищает |
|---|---|
| Port Security | MAC flooding, часть spoofing/starvation risks |
| DHCP Snooping | DHCP starvation и DHCP spoofing |
| DAI | ARP spoofing и ARP poisoning |
| IPSG | IP и MAC spoofing |
| BPDU Guard | STP manipulation on access ports |
Port Security — switch feature, которая ограничивает, какие MAC addresses и сколько MAC addresses можно видеть на port. networkterm DHCP Snooping — feature, которая фильтрует DHCP traffic и отделяет trusted/untrusted DHCP behavior. networkterm DAI (Dynamic ARP Inspection) — feature, которая проверяет ARP packets и помогает блокировать ARP spoofing/poisoning. abbreviation IPSG (IP Source Guard) — feature, которая помогает бороться с IP/MAC spoofing на access ports. abbreviation BPDU Guard — protection mechanism против rogue STP BPDUs на access ports. networkterm
Не только data plane, но и management plane
Модуль отдельно подчеркивает: Layer 2 protections мало помогут, если management protocols insecure.
Что нужно помнить:
- использовать
SSH,SCP,SFTP,SSL/TLS; - избегать insecure management methods where possible;
- использовать management VLAN;
- фильтровать доступ через ACLs;
- по возможности использовать out-of-band management.
Полезные команды и термины
show mac address-table dynamic
no cdp run
no cdp enable
no lldp run
no lldp transmit
no lldp receiveshow mac address-table dynamic ciscoIOScommand
Показывает learned dynamic MAC entries switch.
no cdp run ciscoIOScommand
Отключает CDP globally на device.
no cdp enable ciscoIOScommand
Отключает CDP на конкретном interface.
no lldp run ciscoIOScommand
Отключает LLDP globally.
no lldp transmit ciscoIOScommand
Запрещает LLDP transmit на interface.
no lldp receive ciscoIOScommand
Запрещает LLDP receive на interface.
Самая важная мысль раздела
Attack category -> specific mitigationНа exam часто проверяют именно соответствие threat и защитного механизма.
Если понял тему
Ты уже можешь увидеть атаку и быстро сопоставить её с правильным mitigation feature.