VLAN เป็นหนึ่งในพื้นฐานสำคัญของการแบ่ง Network ออกเป็นหลาย Broadcast Domain แต่การสร้าง VLAN เพียงอย่างเดียวไม่ได้หมายความว่า Layer 2 Network จะปลอดภัยโดยอัตโนมัติ หาก Access Port, Trunk Port, Native VLAN หรือ Dynamic Trunking ถูก Configure ไม่เหมาะสม ผู้โจมตีอาจพยายามส่ง Traffic ข้าม VLAN ที่ตนเองไม่ได้รับอนุญาตให้เข้าถึง
การโจมตีลักษณะนี้มักถูกเรียกว่า VLAN Hopping โดยแนวคิดที่ควรรู้สำหรับ Network Engineer ได้แก่ Switch Spoofing และ Double Tagging รวมถึงความเสี่ยง Layer 2 อื่นที่เกี่ยวข้องกับการตั้งค่า VLAN และ Trunk
บทความนี้เน้นการเรียนรู้เพื่อ ป้องกัน ตรวจสอบ และ Troubleshoot Cisco Switch โดยอธิบายว่าความเสี่ยงเกิดจากอะไร Configuration แบบใดควรหลีกเลี่ยง และควร Hardening Access/Trunk Port อย่างไร เพื่อให้ VLAN Segmentation ทำงานตาม Network Design
สารบัญ
- VLAN Security คืออะไร?
- VLAN แยก Network ได้อย่างไร?
- VLAN Hopping คืออะไร?
- Switch Spoofing คืออะไร?
- DTP เกี่ยวข้องอย่างไร?
- Double Tagging คืออะไร?
- Native VLAN สำคัญอย่างไร?
- Switch Spoofing กับ Double Tagging ต่างกันอย่างไร?
- วิธีป้องกัน VLAN Hopping
- Hardening Access Port
- Hardening Trunk Port
- จำกัด Allowed VLAN
- Unused Port Security
- Management VLAN Security
- Layer 2 Security Stack
- Cisco VLAN Security Lab
- Verification Commands
- Troubleshooting
- VLAN Security Audit
- Best Practices
- FAQ
- บทสรุป
ภาค 1: พื้นฐาน VLAN Security
VLAN Security คืออะไร?
VLAN Security คือการทำให้ VLAN Segmentation ที่ออกแบบไว้ ไม่ถูกทำลายจาก Configuration Error, Unauthorized Device หรือ Layer 2 Attack
ตัวอย่าง Network:
Cisco Switch
+-------+-------+
| | |
VLAN10 VLAN20 VLAN30
| | |
v v v
IT HR GUEST
ตาม Design แล้ว Device ในแต่ละ VLAN จะอยู่คนละ Layer 2 Broadcast Domain
หากต้องการสื่อสารข้าม VLAN โดยทั่วไป Traffic ต้องผ่าน Layer 3 Device เช่น Router, Layer 3 Switch หรือ Firewall ตาม Network Architecture
VLAN 10
|
v
Layer 3 Gateway
|
ACL / Firewall Policy
|
v
VLAN 20
จุดนี้ทำให้ VLAN มีประโยชน์อย่างมากสำหรับ Network Segmentation แต่ต้อง Configure Layer 2 Infrastructure อย่างถูกต้องด้วย
VLAN แยก Network ได้อย่างไร?
สมมติเรามี:
VLAN 10 = USERS
VLAN 20 = SERVERS
VLAN 30 = GUEST
VLAN 99 = MANAGEMENT
Access Port จะถูกกำหนดให้กับ VLAN หนึ่ง:
interface GigabitEthernet1/0/10
switchport mode access
switchport access vlan 10
Traffic จากเครื่องที่ต่อ Port นี้ จึงถูกจัดอยู่ใน VLAN 10 ตาม Configuration ของ Switch
แล้ว Trunk ทำหน้าที่อะไร?
Trunk Link สามารถขนส่ง Traffic ของหลาย VLAN ระหว่าง Network Devices โดยใช้ VLAN Tagging ตามมาตรฐานที่รองรับ
SW1 SW2
VLAN10 ----\ /---- VLAN10
VLAN20 -----+== TRUNK ==+----- VLAN20
VLAN30 ----/ \---- VLAN30
บน Ethernet Network สมัยใหม่ มักใช้ IEEE 802.1Q สำหรับ VLAN Tagging
ภาค 2: VLAN Hopping คืออะไร?
ความหมายของ VLAN Hopping
VLAN Hopping คือแนวคิดของการพยายามทำให้ Traffic เข้าถึง VLAN อื่น โดยหลีกเลี่ยง VLAN Boundary ที่ Network Engineer ตั้งใจออกแบบไว้
ภาพรวม:
Attacker
VLAN 10
|
|
| Unauthorized Layer 2 Path
|
v
VLAN 20
รูปแบบที่มักใช้เพื่ออธิบาย VLAN Hopping ได้แก่:
- Switch Spoofing
- Double Tagging
ภาค 3: Switch Spoofing
Switch Spoofing คืออะไร?
Switch Spoofing เกี่ยวข้องกับสถานการณ์ ที่อุปกรณ์ปลายทางพยายามทำให้ Switch ปฏิบัติต่อ Port นั้นเสมือนเป็น Switch-to-Switch Link แทนที่จะเป็น User Access Port
Design ที่ควรเป็น:
Access Switch
|
| ACCESS PORT
|
v
PC
แต่ Configuration ที่มีความเสี่ยงอาจเปิดโอกาสให้:
Access Switch
|
| Dynamic Trunk Negotiation
|
v
Unauthorized Device
|
v
Attempts to Become Trunk
หาก Port สามารถเปลี่ยนสถานะเป็น Trunk โดยไม่ตั้งใจ อุปกรณ์ที่ไม่ควรได้รับ Traffic จากหลาย VLAN อาจได้รับสิทธิ์ Layer 2 มากกว่าที่ Network Design กำหนด
DTP เกี่ยวข้องกับ Switch Spoofing อย่างไร?
DTP หรือ Dynamic Trunking Protocol เป็น Cisco Protocol ที่ใช้ช่วย Negotiation สถานะ Trunk ระหว่างอุปกรณ์ที่รองรับ
แนวคิด:
Switch A
|
| DTP Negotiation
|
Switch B
|
v
Trunk
DTP มีประโยชน์ในบาง Environment แต่สำหรับ User Access Port เราไม่ต้องการให้ปลายทาง สามารถ Negotiation เพื่อกลายเป็น Trunk
แนวทางที่ปลอดภัยกว่า
กำหนด User Port เป็น Static Access Port:
interface GigabitEthernet1/0/10
switchport mode access
switchport access vlan 10
บน Cisco Platform ที่รองรับ และเมื่อเหมาะสมกับ Interface:
switchport nonegotiate
ใช้เพื่อปิดการส่ง DTP Negotiation บน Port ที่ไม่ต้องการ Negotiation
ภาค 4: Double Tagging
Double Tagging คืออะไร?
Double Tagging เป็นแนวคิดการโจมตีที่อาศัย 802.1Q Tag มากกว่าหนึ่งชั้น ร่วมกับพฤติกรรมของ Native VLAN ใน Topology และ Configuration ที่เข้าเงื่อนไข
แนวคิดเชิงโครงสร้าง:
Ethernet Frame
|
+---- Outer VLAN Tag
|
+---- Inner VLAN Tag
|
v
Switching Infrastructure
เมื่อ Frame ผ่าน Switch ตัวแรก ภายใต้เงื่อนไขบางแบบ Outer Tag อาจถูกประมวลผล จน Switch ตัวถัดไปเห็น Inner Tag เป็น VLAN Information สำหรับการ Forward ต่อ
ทำไม Double Tagging จึงต่างจาก Switch Spoofing?
Switch Spoofing มุ่งทำให้ Port กลายเป็น Trunk
ส่วน Double Tagging อาศัย Frame Tagging Behavior และ Native VLAN ภายใต้เงื่อนไขที่เหมาะสม
ภาค 5: Native VLAN Security
Native VLAN คืออะไร?
บน 802.1Q Trunk แบบดั้งเดิม Native VLAN เกี่ยวข้องกับการรับส่ง Frame ที่ไม่มี Tag บน Trunk ตาม Configuration และ Platform Behavior
ตัวอย่าง:
interface GigabitEthernet1/0/48
switchport mode trunk
switchport trunk native vlan 999
อย่าใช้ User VLAN เป็น Native VLAN โดยไม่จำเป็น
ตัวอย่างที่ควรหลีกเลี่ยง:
VLAN 10
=
User VLAN
+
Native VLAN
แนวทางที่ดีกว่า:
VLAN 10
=
Users
VLAN 20
=
Servers
VLAN 30
=
Guest
VLAN 999
=
Dedicated Native / Unused VLAN
according to design
โดย VLAN ที่เลือกเป็น Native VLAN ควรถูกออกแบบอย่างตั้งใจ และไม่ควรมี User Endpoint อยู่โดยไม่จำเป็น
Native VLAN ต้องตรงกันทั้งสองฝั่ง
SW1 SW2
Native VLAN 999 ===== Native VLAN 999
ไม่ควรเป็น:
SW1 SW2
Native VLAN 999 ===== Native VLAN 10
Native VLAN Mismatch อาจทำให้เกิด Connectivity, STP หรือ Security Problem ที่วิเคราะห์ยาก
ภาค 6: เปรียบเทียบ VLAN Hopping
Switch Spoofing กับ Double Tagging
| หัวข้อ | Switch Spoofing | Double Tagging |
|---|---|---|
| แนวคิด | ทำให้ Port มีพฤติกรรมเป็น Trunk | อาศัย VLAN Tag ซ้อนกัน |
| เกี่ยวข้องกับ | Dynamic Trunking / Port Mode | 802.1Q / Native VLAN |
| ความเสี่ยงหลัก | เข้าถึง VLAN ผ่าน Trunk ที่ไม่ควรเกิด | Frame อาจถูกส่งไปยัง VLAN อื่นภายใต้เงื่อนไขเฉพาะ |
| การป้องกันหลัก | Static Access Port และปิด Negotiation เมื่อเหมาะสม | Native VLAN Design และ Trunk Hardening |
ภาค 7: วิธีป้องกัน VLAN Hopping
หลักการ Hardening
แทนที่จะพยายามตรวจจับ Attack หลังเกิดเหตุ ควรลด Attack Surface ตั้งแต่ Configuration
Access Port
|
+---- Static Access Mode
|
+---- Correct VLAN
|
+---- No Unnecessary Trunk Negotiation
|
+---- PortFast
|
+---- BPDU Guard
Trunk Port
|
+---- Static Trunk
|
+---- Explicit Allowed VLAN
|
+---- Controlled Native VLAN
|
+---- Documented Neighbor
ภาค 8: Access Port Hardening
กำหนด Access Port ให้ชัดเจน
ตัวอย่าง User Port:
interface GigabitEthernet1/0/10
description USER-PC
switchport mode access
switchport access vlan 10
spanning-tree portfast
spanning-tree bpduguard enable
ทำไมต้องใช้ switchport mode access?
เพื่อกำหนด Role ของ Port อย่างชัดเจนว่าเป็น Access Port แทนการปล่อยให้ Port Mode ถูกตัดสินจาก Dynamic Negotiation ใน Platform ที่รองรับ
User Port
|
v
STATIC ACCESS
|
v
VLAN 10
BPDU Guard ช่วยอะไร?
ถ้ามีผู้ใช้ต่อ Switch เข้ากับ Port ที่ควรเป็น Edge Port:
Access Switch
|
| BPDU Guard
|
v
Unauthorized Switch
|
+---- BPDU
BPDU Guard สามารถป้องกัน Port ตาม Behavior ของ Platform ไม่ให้ Switch ที่ไม่ควรอยู่ตรงนั้น เข้ามามีผลต่อ STP
ภาค 9: Trunk Port Hardening
กำหนด Trunk แบบ Explicit
ตัวอย่าง:
interface GigabitEthernet1/0/48
description TRUNK-TO-SW2
switchport mode trunk
switchport trunk native vlan 999
switchport trunk allowed vlan 10,20,30,99
ปิด Negotiation เมื่อ Platform และ Design รองรับ
switchport nonegotiate
เป้าหมายคือไม่ปล่อยให้ Trunk State ขึ้นอยู่กับ Negotiation โดยไม่จำเป็น
ภาค 10: จำกัด Allowed VLAN บน Trunk
อย่าให้ทุก VLAN ผ่าน Trunk โดยไม่จำเป็น
ตัวอย่าง:
switchport trunk allowed vlan 10,20,30,99
แทนการปล่อย:
VLAN 1
VLAN 2
VLAN 3
...
All VLANs
แนวคิดคือ Least Privilege สำหรับ Layer 2
Does VLAN need this trunk?
|
+--+--+
| |
Yes No
| |
Allow Remove
ตัวอย่าง
ถ้า Access Switch มีเพียง:
VLAN 10 = USERS
VLAN 30 = GUEST
VLAN 99 = MANAGEMENT
Trunk ไป Distribution อาจไม่จำเป็นต้องขน VLAN 20 ถ้าไม่มี Service หรือ Endpoint ที่ต้องใช้ VLAN 20 บน Switch นั้น
ภาค 11: Unused Port Security
Port ที่ไม่ได้ใช้ควรทำอย่างไร?
ไม่ควรปล่อย Port ที่ไม่ได้ใช้งาน อยู่ใน Active User VLAN โดยไม่จำเป็น
ตัวอย่าง:
vlan 999
name UNUSED
Unused Port:
interface GigabitEthernet1/0/20
description UNUSED
switchport mode access
switchport access vlan 999
shutdown
ทำไมต้อง Shutdown ด้วย?
การย้าย Port ไป Unused VLAN ช่วยแยก Logical Membership แต่ shutdown ช่วยปิด Interface ไม่ให้มี Connectivity จนกว่า Administrator จะตั้งใจเปิดใช้งาน
ภาค 12: Management VLAN Security
Management VLAN ไม่ควรเป็น User VLAN
ตัวอย่าง Design:
VLAN 10
Users
VLAN 20
Servers
VLAN 30
Guest
VLAN 99
Management
การแยก Management Network ช่วยให้สามารถกำหนด Policy สำหรับ:
- SSH
- SNMP
- AAA
- Syslog
- NTP
- Network Automation
VLAN อย่างเดียวไม่ใช่ Security Policy ทั้งหมด
แม้จะแยก Management VLAN ก็ควรมี Layer 3 Control เช่น ACL หรือ Firewall ควบคุมว่าใครสามารถเข้าถึง Management Address ได้
User VLAN
|
X
|
Management VLAN
|
v
Router / Switch Management
ภาค 13: Layer 2 Security Stack
VLAN Security ไม่ได้มีแค่ VLAN Hopping
Production Access Switch ควรพิจารณา Layer 2 Security หลายส่วนร่วมกัน
Access Port
|
+---- Static Access VLAN
|
+---- PortFast
|
+---- BPDU Guard
|
+---- DHCP Snooping
|
+---- Dynamic ARP Inspection
|
+---- IP Source Guard
|
+---- Port Security / 802.1X
|
+---- ACL / Policy where applicable
DHCP Snooping
ช่วยป้องกัน Rogue DHCP Server และสร้าง DHCP Snooping Binding Database สำหรับ Feature อื่น
Dynamic ARP Inspection
ช่วยตรวจ ARP โดยสามารถอาศัยข้อมูล จาก DHCP Snooping Binding ใน Deployment ที่เหมาะสม
IP Source Guard
ช่วยควบคุม Source IP บน Access Port โดยสามารถทำงานร่วมกับ DHCP Snooping Binding ตาม Configuration และ Platform
BPDU Guard
ช่วยป้องกัน BPDU บน Edge Port ที่ไม่ควรเชื่อมต่อ Switch
Port Security หรือ 802.1X
ช่วยควบคุม Device หรือ Identity ที่ได้รับอนุญาตให้เข้าถึง Network ตาม Architecture ที่เลือกใช้
ภาค 14: Cisco VLAN Security Lab
Lab Topology
DIST1
+-------------+
| Cisco Switch|
+------+------+
|
| TRUNK
|
+------+------+
| ACCESS1 |
+--+---+---+--+
| | |
PC1 PC2 GUEST
VLAN 10 = USERS
VLAN 20 = SERVERS
VLAN 30 = GUEST
VLAN 99 = MANAGEMENT
VLAN 999 = NATIVE / UNUSED
Lab Goal
เราต้องการให้:
User Ports
=
Static Access
Unused Ports
=
Shutdown
Trunk
=
Static
Allowed VLAN
=
Explicit
Native VLAN
=
Dedicated
Edge STP
=
PortFast + BPDU Guard
Step 1 — สร้าง VLAN
vlan 10
name USERS
vlan 20
name SERVERS
vlan 30
name GUEST
vlan 99
name MANAGEMENT
vlan 999
name UNUSED
Step 2 — Configure User Access Port
interface GigabitEthernet1/0/10
description USER-PC1
switchport mode access
switchport access vlan 10
spanning-tree portfast
spanning-tree bpduguard enable
Step 3 — Configure Guest Port
interface GigabitEthernet1/0/15
description GUEST
switchport mode access
switchport access vlan 30
spanning-tree portfast
spanning-tree bpduguard enable
Step 4 — Configure Unused Port
interface GigabitEthernet1/0/20
description UNUSED
switchport mode access
switchport access vlan 999
shutdown
Step 5 — Configure Trunk
interface GigabitEthernet1/0/48
description TRUNK-TO-DIST1
switchport mode trunk
switchport trunk native vlan 999
switchport trunk allowed vlan 10,20,30,99
บน Platform และ Design ที่รองรับ:
switchport nonegotiate
ภาค 15: Verification Commands
ตรวจ VLAN
show vlan brief
ตรวจว่า:
VLAN Exists?
Access Port in correct VLAN?
Unexpected Port Membership?
ตรวจ Trunk
show interfaces trunk
ควรตรวจ:
- Port ใดเป็น Trunk?
- Native VLAN คืออะไร?
- Allowed VLAN มีอะไรบ้าง?
- VLAN ใด Active?
- VLAN ใดอยู่ใน Forwarding State?
ตรวจ Switchport
show interfaces GigabitEthernet1/0/10 switchport
มองหา:
Administrative Mode
Operational Mode
Access VLAN
Native VLAN
Negotiation Status
ตรวจ STP
show spanning-tree vlan 10
show spanning-tree vlan 30
show spanning-tree vlan 99
ตรวจ Interface Status
show interfaces status
ตรวจ MAC Address Table
show mac address-table dynamic
ใช้ตรวจว่า MAC Address ถูกเรียนรู้จาก Port และ VLAN ที่คาดไว้หรือไม่
ภาค 16: VLAN และ Trunk Troubleshooting
Troubleshooting Workflow
User Cannot Connect
|
v
Physical Link
|
v
Interface Status
|
v
Access VLAN
|
v
MAC Address
|
v
STP State
|
v
Trunk
|
v
Allowed VLAN
|
v
Native VLAN
|
v
Gateway / Routing
|
v
ACL / Firewall
Case 1 — PC อยู่ผิด VLAN
ตรวจ:
show vlan brief
show interfaces GigabitEthernet1/0/10 switchport
Expected:
Administrative Mode
=
static access
Access VLAN
=
correct VLAN
Case 2 — VLAN ใช้งานข้าม Switch ไม่ได้
ตรวจ:
show interfaces trunk
คำถามสำคัญ:
VLAN exists both sides?
VLAN allowed on trunk?
Trunk operational?
STP forwarding?
Native VLAN consistent?
Case 3 — Trunk มี VLAN มากกว่าที่ควร
หากพบ Trunk อนุญาต VLAN จำนวนมาก โดยไม่จำเป็น ควรตรวจ Network Requirement ก่อนปรับ Allowed VLAN List
ตัวอย่าง:
Current:
10,20,30,40,50,60,70,80,90,99
Required:
10,30,99
หลัง Change:
show interfaces trunk
และทดสอบ Service ที่ต้องผ่าน Trunk ทุกส่วนที่ได้รับผลกระทบ
Case 4 — Native VLAN Mismatch
ตรวจทั้งสอง Switch:
show interfaces trunk
ควรได้:
SW1
Native VLAN = 999
SW2
Native VLAN = 999
ไม่ใช่:
SW1 = 999
SW2 = 1
Case 5 — User ต่อ Switch เพิ่มเอง
หาก Access Port ใช้ PortFast + BPDU Guard อาจพบ Port ถูก Protect หรือ Errdisable ตาม Platform
ตรวจ:
show interfaces status err-disabled
show spanning-tree interface GigabitEthernet1/0/10 detail
อย่า Recover Port จนกว่าจะตรวจว่า อุปกรณ์ปลายสายคืออะไร
Case 6 — Network ใช้งานไม่ได้หลังจำกัด Allowed VLAN
อย่าสรุปทันทีว่า Allowed VLAN Hardening เป็นสิ่งผิด
ตรวจ:
Which VLAN carries the service?
Does VLAN need to cross this trunk?
Is VLAN active?
Is STP forwarding?
Is gateway reachable?
ถ้า Service ต้องใช้ VLAN นั้นจริง ให้เพิ่มกลับตาม Design ไม่ควรกลับไปอนุญาตทุก VLAN เพียงเพื่อแก้ปัญหาชั่วคราว
ภาค 17: VLAN Security Audit
เริ่ม Audit จากอะไร?
Network Engineer สามารถเริ่ม VLAN Security Audit จากคำสั่งพื้นฐาน:
show vlan brief
show interfaces trunk
show interfaces switchport
show spanning-tree
show interfaces status
show mac address-table
คำถามที่ควรถามระหว่าง Audit
- มี Port ใดเป็น Trunk โดยไม่ควรเป็นหรือไม่?
- User Port ถูกกำหนด Static Access หรือไม่?
- Trunk ขน VLAN เกิน Requirement หรือไม่?
- Native VLAN ถูกกำหนดอย่างตั้งใจหรือไม่?
- Native VLAN ตรงกันทั้งสองฝั่งหรือไม่?
- Unused Port ถูก Shutdown หรือไม่?
- Management VLAN แยกจาก User VLAN หรือไม่?
- Edge Port ใช้ BPDU Guard หรือไม่?
- Root Bridge อยู่ตรงตาม Network Design หรือไม่?
ภาค 18: ตัวอย่างการแก้ปัญหาจริง
สถานการณ์: พบ Port ที่ไม่ควรเป็น Trunk
Network Diagram ระบุ:
Gi1/0/12
=
User PC
แต่ตรวจพบ:
show interfaces GigabitEthernet1/0/12 switchport
แล้ว Operational Mode แสดงว่า:
trunk
นี่เป็น Configuration ที่ต้องตรวจสอบทันที
แนวทางแก้ไข
ตรวจสิ่งที่ต่ออยู่กับ Port ก่อน:
Physical Device
MAC Address
Neighbor Information
Change History
ถ้ายืนยันว่าเป็น User Port:
interface GigabitEthernet1/0/12
switchport mode access
switchport access vlan 10
spanning-tree portfast
spanning-tree bpduguard enable
จากนั้น Verify:
show interfaces GigabitEthernet1/0/12 switchport
show vlan brief
show spanning-tree interface GigabitEthernet1/0/12 detail
ภาค 19: VLAN Security Best Practices
1. กำหนด User Port เป็น Static Access
switchport mode access
2. อย่าใช้ Dynamic Trunking โดยไม่มี Requirement
ถ้า Port Role รู้แน่นอน ควรกำหนด Mode อย่าง Explicit
3. กำหนด Trunk แบบ Explicit
switchport mode trunk
4. จำกัด Allowed VLAN
อนุญาตเฉพาะ VLAN ที่จำเป็นต้องผ่าน Link นั้น
5. ออกแบบ Native VLAN อย่างตั้งใจ
หลีกเลี่ยงการใช้ Active User VLAN เป็น Native VLAN โดยไม่มีเหตุผลด้าน Design
6. Native VLAN ต้องตรงกันทั้งสองฝั่ง
ตรวจด้วย:
show interfaces trunk
7. Shutdown Unused Port
และพิจารณาย้ายไป Dedicated Unused VLAN ตามมาตรฐานองค์กร
8. ใช้ PortFast + BPDU Guard บน Edge Port
เมื่อ Port ถูกออกแบบ สำหรับ End Device
9. แยก Management Network
ไม่ควรให้ User VLAN เข้าถึง Switch Management Plane โดยไม่มี Policy
10. Document ทุก Trunk
ตัวอย่าง:
Gi1/0/48
=
TRUNK TO DIST1
Native VLAN
=
999
Allowed VLAN
=
10,20,30,99
11. ตรวจ Trunk เป็นระยะ
show interfaces trunk
คำสั่งสั้น ๆ นี้สามารถช่วยค้นพบ Unexpected Trunk, Allowed VLAN ที่กว้างเกินไป และ Native VLAN ที่ไม่ตรงกับ Design
12. ใช้ Defense in Depth
Static Port Mode
|
v
Trunk Hardening
|
v
STP Security
|
v
DHCP Snooping
|
v
DAI
|
v
IP Source Guard
|
v
Port Security / 802.1X
|
v
ACL / Firewall
|
v
Monitoring
ภาค 20: คำถามที่พบบ่อย
VLAN Hopping คืออะไร?
คือแนวคิดการพยายามส่ง Traffic ไปยัง VLAN ที่ผู้ใช้ ไม่ได้รับอนุญาตให้เข้าถึง โดยอาศัย Layer 2 Behavior หรือ Configuration ที่ไม่เหมาะสม
VLAN Hopping มีรูปแบบอะไรบ้าง?
รูปแบบคลาสสิกที่ Network Engineer ควรรู้คือ:
Switch Spoofing
Double Tagging
Switch Spoofing เกี่ยวข้องกับอะไร?
เกี่ยวข้องกับการพยายาม ทำให้ Port มีพฤติกรรมเป็น Trunk แทนที่จะเป็น Access Port
วิธีลดความเสี่ยง Switch Spoofing ที่สำคัญที่สุดคืออะไร?
กำหนด User Port เป็น Static Access Port และไม่เปิด Dynamic Trunk Negotiation โดยไม่มีความจำเป็น
Double Tagging เกี่ยวข้องกับอะไร?
เกี่ยวข้องกับ 802.1Q Tagging และ Native VLAN Behavior ภายใต้เงื่อนไขของ Topology และ Configuration ที่เหมาะสม
ควรใช้ VLAN 1 เป็น Native VLAN หรือไม่?
Production Design ควรประเมินการใช้ Dedicated Native VLAN ที่ไม่ได้ใช้เป็น User VLAN แทนการพึ่ง Default Configuration โดยไม่มีเหตุผล
Native VLAN ควรมี User หรือไม่?
โดยทั่วไปควรหลีกเลี่ยง การวาง User Endpoint ใน VLAN ที่ถูกกำหนดเป็น Dedicated Native/Unused VLAN สำหรับ Trunk Hardening
Trunk ควร Allow ทุก VLAN หรือไม่?
ไม่ควรเป็น Default Design หาก Link ต้องใช้เพียงบาง VLAN ควรอนุญาตเฉพาะ VLAN ที่มี Requirement จริง
VLAN สามารถแทน Firewall ได้หรือไม่?
ไม่ได้
VLAN
=
Layer 2 Segmentation
ACL
=
Traffic Filtering
Firewall
=
Security Policy
+
Stateful Inspection
+
Additional Security Functions
ควรใช้แต่ละ Technology ตามหน้าที่ของมัน
BPDU Guard ป้องกัน VLAN Hopping โดยตรงหรือไม่?
BPDU Guard ไม่ได้ถูกออกแบบมา เป็น VLAN Hopping Protection โดยตรง แต่ช่วยป้องกัน Unauthorized Switch หรือ BPDU บน Edge Port จึงเป็นส่วนหนึ่งของ Layer 2 Defense in Depth
ปิด DTP แล้ว Network ปลอดภัยทั้งหมดหรือไม่?
ไม่ ยังต้องพิจารณา:
Access Port Mode
Trunk Configuration
Native VLAN
Allowed VLAN
STP Security
Unused Ports
DHCP Snooping
DAI
IP Source Guard
Port Authentication
บทสรุป
VLAN เป็นเครื่องมือสำหรับ Network Segmentation แต่ VLAN Security ขึ้นอยู่กับการ Configure Access Port, Trunk, Native VLAN และ Layer 2 Protection อย่างถูกต้อง
VLAN Hopping ที่ควรรู้ มีสองแนวคิดหลัก:
Switch Spoofing
=
Attempts to gain
Trunk behavior
Double Tagging
=
Abuses VLAN tagging behavior
under specific conditions
พื้นฐานของการป้องกันคือ:
User Port
|
v
Static Access
|
+
PortFast
|
+
BPDU Guard
Trunk
|
v
Static Trunk
|
+
Explicit Allowed VLAN
|
+
Controlled Native VLAN
|
+
Disable Unnecessary Negotiation
และต้องเสริมด้วย:
Unused Port Shutdown
Management Segmentation
DHCP Snooping
Dynamic ARP Inspection
IP Source Guard
Port Security / 802.1X
ACL / Firewall
Monitoring
สำหรับ Network Engineer สิ่งสำคัญไม่ใช่เพียงจำ Command แต่ต้องสามารถตอบได้ว่า:
Port นี้ควรเป็น Access หรือ Trunk?
Port นี้ควรอยู่ VLAN ไหน?
Trunk นี้ต้องขน VLAN อะไร?
Native VLAN คืออะไร?
ทำไม VLAN นี้ต้องผ่าน Link นี้?
ถ้ามี Trunk เกิดขึ้นโดยไม่คาดคิด
เราจะตรวจพบอย่างไร?
เมื่อ VLAN และ Trunk ถูก Harden แล้ว หัวข้อถัดไปควรขยับจาก Layer 2 Security ไปสู่การควบคุมคุณภาพของ Traffic ซึ่งมีความสำคัญกับ Voice, Video และ Business-Critical Application
บทความถัดไป: QoS Fundamentals สำหรับ Network Engineer: Classification, Marking, DSCP, CoS, Queuing และ Congestion
Share your thoughts here
Join the conversation and share your perspective on this article.