NAC และ 802.1X คืออะไร? ควบคุมการเข้าถึงเครือข่ายองค์กรอย่างปลอดภัย 2026

บทนำ: ทำไมต้องควบคุมการเข้าถึงเครือข่าย?

ลองจินตนาการว่าออฟฟิศของคุณมีเครือข่าย Wi-Fi และ LAN ที่ใครก็ได้เสียบสาย LAN หรือเชื่อมต่อ Wi-Fi แล้วเข้าถึงข้อมูลสำคัญได้ทันที — ฐานข้อมูลลูกค้า, ระบบบัญชี, file server ที่มีเอกสารความลับ ทั้งหมดนี้ไม่มีการตรวจสอบว่าเครื่องที่เชื่อมต่อเป็นของพนักงานจริงหรือไม่ และเครื่องนั้นปลอดภัยหรือเปล่า

สถานการณ์แบบนี้เกิดขึ้นจริงในหลายองค์กรในประเทศไทย — พนักงานเอาโน้ตบุ๊กส่วนตัวมาเสียบ LAN, แขกที่มาประชุมใช้ Wi-Fi เดียวกับพนักงาน, อุปกรณ์ IoT เช่น กล้อง CCTV หรือ smart TV ต่อเข้าเครือข่ายโดยไม่มีการควบคุม ปัญหาเหล่านี้คือความเสี่ยงด้านความปลอดภัยที่ร้ายแรงมาก

Network Access Control (NAC) คือคำตอบสำหรับปัญหานี้ — เป็นระบบที่ควบคุมว่า ใคร และ อุปกรณ์อะไร สามารถเข้าถึงเครือข่ายได้ โดยใช้โปรโตคอล IEEE 802.1X เป็นกลไกหลักในการ authenticate ก่อนอนุญาตให้ใช้งาน port หรือ SSID

บทความนี้จะอธิบายทุกอย่างเกี่ยวกับ NAC และ 802.1X ตั้งแต่แนวคิดพื้นฐาน, architecture, EAP methods, การตั้งค่า RADIUS server, การ configure switch และ access point, guest access, posture assessment, device profiling, VLAN assignment จนถึง implementation best practices และการ troubleshoot ปัญหาที่พบบ่อย

ส่วนที่ 1: NAC (Network Access Control) คืออะไร?

1.1 ความหมายของ NAC

Network Access Control (NAC) คือโซลูชันด้านความปลอดภัยที่ทำหน้าที่ ควบคุมการเข้าถึงเครือข่าย โดยกำหนดนโยบาย (Policy) ว่าอุปกรณ์ใดบ้างที่ได้รับอนุญาตให้เชื่อมต่อ และเมื่อเชื่อมต่อแล้วจะได้สิทธิ์เข้าถึงทรัพยากรอะไรบ้าง ขึ้นอยู่กับตัวตน (Identity) และสถานะ (Posture) ของอุปกรณ์นั้น

NAC = Who + What + Where + When + How
├── Who: ใครกำลังเชื่อมต่อ? (username, certificate)
├── What: อุปกรณ์อะไร? (corporate laptop, BYOD, IoT)
├── Where: เชื่อมต่อจากที่ไหน? (office, branch, remote)
├── When: เชื่อมต่อเมื่อไหร่? (business hours, after hours)
└── How: เชื่อมต่อด้วยวิธีไหน? (wired, wireless, VPN)

1.2 ทำไม NAC ถึงสำคัญในยุคปัจจุบัน

มีหลายเหตุผลที่ทำให้ NAC กลายเป็นสิ่งจำเป็นสำหรับทุกองค์กร:

1) BYOD (Bring Your Own Device): พนักงานนำอุปกรณ์ส่วนตัวมาใช้งานในออฟฟิศมากขึ้น — โน้ตบุ๊ก, สมาร์ทโฟน, แท็บเล็ต อุปกรณ์เหล่านี้อาจมีมัลแวร์หรือไม่ได้อัปเดตแพตช์ความปลอดภัย ถ้าปล่อยให้เชื่อมต่อเครือข่ายได้อย่างอิสระ มัลแวร์อาจแพร่กระจายเข้าสู่ระบบภายในองค์กร

2) IoT Explosion: จำนวนอุปกรณ์ IoT ในองค์กรเพิ่มขึ้นอย่างมหาศาล — กล้อง CCTV, เครื่องพิมพ์เครือข่าย, smart TV ในห้องประชุม, ระบบ access control ประตู, เซ็นเซอร์สิ่งแวดล้อม อุปกรณ์เหล่านี้มักมีระบบปฏิบัติการที่อัปเดตยาก และเป็นเป้าหมายที่แฮกเกอร์ชอบโจมตี

3) Compliance Requirements: มาตรฐานความปลอดภัยต่างๆ เช่น ISO 27001, PCI DSS, HIPAA, PDPA กำหนดให้ต้องมีการควบคุมการเข้าถึงเครือข่าย และต้องมี audit trail ว่าใครเชื่อมต่อเมื่อไหร่

4) Lateral Movement Prevention: เมื่อแฮกเกอร์เจาะเข้ามาได้จุดหนึ่ง สิ่งที่ทำต่อคือ lateral movement — กระจายไปยังเครื่องอื่นๆ ในเครือข่าย NAC ช่วยจำกัดการเคลื่อนไหวนี้โดยการแบ่ง VLAN ตาม identity และ role

5) Visibility: NAC ทำให้คุณเห็นภาพรวมของอุปกรณ์ทั้งหมดที่เชื่อมต่ออยู่ในเครือข่าย ว่ามีอะไรบ้าง เป็นประเภทอะไร ของใคร ใช้ระบบปฏิบัติการอะไร เชื่อมต่อจากที่ไหน ข้อมูลเหล่านี้มีค่ามหาศาลสำหรับการวางแผนความปลอดภัย

1.3 NAC Architecture Overview

ระบบ NAC ประกอบด้วย component หลักๆ ดังนี้:

NAC System Components:

┌─────────────┐    ┌──────────────┐    ┌─────────────────┐
│  Supplicant │───▶│ Authenticator│───▶│ Authentication  │
│  (Client)   │    │ (Switch/AP)  │    │ Server (RADIUS) │
└─────────────┘    └──────────────┘    └─────────────────┘
                                              │
                                     ┌────────┴────────┐
                                     │  Identity Store  │
                                     │ (AD/LDAP/Cert)  │
                                     └─────────────────┘

Component Details:
1. Supplicant (ผู้ร้องขอ):
   ├── ซอฟต์แวร์บนอุปกรณ์ที่ต้องการเชื่อมต่อ
   ├── ส่งข้อมูลตัวตน (credentials) ไปยัง authenticator
   ├── ตัวอย่าง: Windows built-in supplicant, Cisco AnyConnect
   ├── รองรับ EAP methods ต่างๆ
   └── สำหรับอุปกรณ์ IoT ที่ไม่มี supplicant → ใช้ MAB

2. Authenticator (ผู้ตรวจสอบ):
   ├── Network device ที่ควบคุม port access
   ├── ทำหน้าที่เป็น "ประตู" — เปิด/ปิด port
   ├── ส่ง credentials ต่อไปยัง RADIUS server
   ├── ตัวอย่าง: Managed switch (Cisco, HP, Juniper), Access Point
   └── รับคำสั่ง VLAN assignment จาก RADIUS

3. Authentication Server:
   ├── RADIUS server (Remote Authentication Dial-In User Service)
   ├── ตรวจสอบ credentials กับ identity store
   ├── ตัดสินใจ Accept/Reject/Challenge
   ├── ส่ง VLAN assignment, ACL กลับไปที่ authenticator
   └── ตัวอย่าง: FreeRADIUS, Microsoft NPS, Cisco ISE, Aruba ClearPass

4. Identity Store (แหล่งข้อมูลตัวตน):
   ├── Active Directory / LDAP
   ├── Certificate Authority (CA)
   ├── Local database
   ├── External identity providers (SAML, OAuth)
   └── MDM (Mobile Device Management) integration

ส่วนที่ 2: IEEE 802.1X Protocol

2.1 802.1X คืออะไร?

IEEE 802.1X คือมาตรฐาน port-based network access control ที่กำหนดกลไกการ authenticate ก่อนอนุญาตให้ใช้งาน network port (ทั้ง wired และ wireless) โดยใช้ EAP (Extensible Authentication Protocol) เป็นกรอบการ authenticate

ก่อนที่ 802.1X จะ authenticate สำเร็จ port จะอยู่ในสถานะ unauthorized — อนุญาตให้ส่งเฉพาะ EAPOL (EAP over LAN) frame เท่านั้น ทราฟฟิกอื่นๆ จะถูก drop ทั้งหมด เมื่อ authenticate สำเร็จ port จะเปลี่ยนเป็นสถานะ authorized และอนุญาตให้ส่งทราฟฟิกปกติได้

2.2 ขั้นตอนการทำงานของ 802.1X

802.1X Authentication Flow:

Supplicant          Authenticator         RADIUS Server
(Client PC)         (Switch/AP)           (Auth Server)
    │                    │                      │
    │  ① EAPOL-Start     │                      │
    │──────────────────▶ │                      │
    │                    │                      │
    │  ② EAP-Request/    │                      │
    │     Identity       │                      │
    │◀────────────────── │                      │
    │                    │                      │
    │  ③ EAP-Response/   │                      │
    │     Identity       │                      │
    │     (username)     │                      │
    │──────────────────▶ │                      │
    │                    │  ④ RADIUS             │
    │                    │  Access-Request       │
    │                    │  (EAP-Message)        │
    │                    │─────────────────────▶ │
    │                    │                      │
    │                    │  ⑤ RADIUS             │
    │                    │  Access-Challenge     │
    │                    │◀───────────────────── │
    │  ⑥ EAP-Request/   │                      │
    │     Method         │                      │
    │◀────────────────── │                      │
    │                    │                      │
    │  ⑦ EAP-Response/  │                      │
    │     Credentials    │                      │
    │──────────────────▶ │                      │
    │                    │  ⑧ RADIUS             │
    │                    │  Access-Request       │
    │                    │─────────────────────▶ │
    │                    │                      │
    │                    │  ⑨ RADIUS             │
    │                    │  Access-Accept        │
    │                    │  (VLAN, ACL)          │
    │                    │◀───────────────────── │
    │                    │                      │
    │  ⑩ EAP-Success    │                      │
    │◀────────────────── │                      │
    │                    │                      │
    │  Port AUTHORIZED   │                      │
    │═══════════════════ │                      │
    │  Normal traffic    │                      │
    │◀════════════════▶  │                      │

หมายเหตุ:
- ขั้นตอน ①-③: ระหว่าง supplicant กับ authenticator ใช้ EAPOL
- ขั้นตอน ④-⑨: ระหว่าง authenticator กับ RADIUS ใช้ RADIUS protocol
- EAP ถูก encapsulate ใน EAPOL (LAN side) และ RADIUS (server side)
- Switch ไม่ต้องเข้าใจ EAP method — แค่ relay ระหว่าง 2 ฝั่ง

2.3 Port States ใน 802.1X

Port ที่เปิดใช้งาน 802.1X จะมีสถานะดังนี้:

802.1X Port States:

1. Unauthorized (ค่าเริ่มต้น):
   ├── อนุญาตเฉพาะ EAPOL frames
   ├── Drop ทราฟฟิกอื่นทั้งหมด (DHCP, ARP, etc.)
   ├── client ยังเข้าเครือข่ายไม่ได้
   └── รอ authentication

2. Authorized (หลัง auth สำเร็จ):
   ├── อนุญาตทราฟฟิกทุกประเภท
   ├── port ถูก assign ไปยัง VLAN ที่กำหนด
   ├── อาจมี ACL restrict เพิ่มเติม
   └── session timeout → ต้อง re-authenticate

3. Force Authorized:
   ├── ปิดการใช้งาน 802.1X บน port นี้
   ├── อนุญาตทราฟฟิกทั้งหมดโดยไม่ต้อง auth
   └── ใช้สำหรับ port พิเศษ (เช่น uplink, server port)

4. Force Unauthorized:
   ├── ปิด port ถาวร ไม่ให้ใช้งาน
   └── ใช้สำหรับ port ที่ไม่ต้องการใช้งาน (security)

ส่วนที่ 3: EAP Methods — วิธีการยืนยันตัวตน

3.1 EAP คืออะไร?

EAP (Extensible Authentication Protocol) ไม่ใช่ authentication method โดยตรง แต่เป็น framework ที่รองรับ authentication method หลายแบบ เปรียบเหมือน “กรอบ” ที่สามารถใส่วิธีการ authenticate แบบต่างๆ เข้าไปได้ ทำให้ 802.1X ยืดหยุ่นมาก

3.2 EAP Methods ที่นิยมใช้

EAP Methods Comparison:

┌───────────┬─────────────────┬─────────────┬──────────────┬───────────┐
│ EAP Method│ Client Cert     │ Server Cert │ Authentication│ Security  │
│           │ Required?       │ Required?   │ Type          │ Level     │
├───────────┼─────────────────┼─────────────┼──────────────┼───────────┤
│ PEAP      │ ❌ No           │ ✅ Yes      │ Username/    │ ★★★★☆    │
│ (MSCHAPv2)│                 │             │ Password     │ High      │
├───────────┼─────────────────┼─────────────┼──────────────┼───────────┤
│ EAP-TLS   │ ✅ Yes          │ ✅ Yes      │ Certificate  │ ★★★★★    │
│           │                 │             │ (mutual)     │ Highest   │
├───────────┼─────────────────┼─────────────┼──────────────┼───────────┤
│ EAP-TTLS  │ ❌ No           │ ✅ Yes      │ Username/    │ ★★★★☆    │
│           │                 │             │ Password     │ High      │
├───────────┼─────────────────┼─────────────┼──────────────┼───────────┤
│ EAP-FAST  │ ❌ No           │ Optional    │ PAC-based    │ ★★★☆☆    │
│ (Cisco)   │                 │             │              │ Medium    │
├───────────┼─────────────────┼─────────────┼──────────────┼───────────┤
│ MAB       │ ❌ No           │ ❌ No       │ MAC Address  │ ★★☆☆☆    │
│ (Fallback)│                 │             │              │ Low       │
└───────────┴─────────────────┴─────────────┴──────────────┴───────────┘

3.3 PEAP (Protected EAP) — วิธีที่นิยมที่สุด

PEAP เป็น EAP method ที่ นิยมใช้มากที่สุด ในองค์กร เพราะไม่ต้องติดตั้ง client certificate ทำให้ deploy ง่าย โดยใช้ username/password จาก Active Directory ในการ authenticate:

PEAP (Protected EAP) Workflow:

Phase 1: TLS Tunnel Establishment
├── RADIUS server ส่ง server certificate ไปยัง client
├── Client ตรวจสอบ certificate (trust chain)
├── สร้าง TLS tunnel เพื่อเข้ารหัสข้อมูล
└── คล้ายกับ HTTPS — ป้องกัน eavesdropping

Phase 2: Inner Authentication (ภายใน TLS tunnel)
├── Client ส่ง username/password ผ่าน tunnel
├── ใช้ MSCHAPv2 (Microsoft Challenge Handshake Auth Protocol v2)
├── RADIUS ส่ง credentials ไปตรวจสอบกับ AD/LDAP
├── AD ตอบกลับ accept/reject
└── RADIUS ส่ง Access-Accept หรือ Access-Reject

ข้อดี PEAP:
├── ง่ายต่อการ deploy — ใช้ username/password จาก AD
├── ไม่ต้องติดตั้ง client certificate
├── Windows มี built-in supplicant รองรับ
├── macOS และ iOS รองรับ native
└── เหมาะสำหรับองค์กรที่ใช้ Active Directory อยู่แล้ว

ข้อเสีย PEAP:
├── พึ่งพา password — อาจถูก brute force ถ้า password อ่อน
├── ต้องดูแล server certificate (ต่ออายุ, distribute CA)
└── ถ้าไม่ validate server cert — เสี่ยงต่อ Evil Twin attack

3.4 EAP-TLS — ความปลอดภัยสูงสุด

EAP-TLS ใช้ certificate ทั้ง 2 ฝั่ง (mutual authentication) — ทั้ง server และ client ต้องมี certificate ทำให้เป็นวิธีที่ปลอดภัยที่สุด เพราะไม่ใช้ password เลย ถึงแม้แฮกเกอร์จะรู้ username ก็ไม่สามารถ authenticate ได้ถ้าไม่มี private key

EAP-TLS Requirements:

Server Side:
├── Server certificate บน RADIUS server
├── CA (Certificate Authority) — ออก certificate ให้ client
└── CRL/OCSP — ตรวจสอบว่า cert ยังไม่ถูก revoke

Client Side:
├── Client certificate (user cert หรือ machine cert)
├── Private key (stored in Windows Certificate Store, TPM, หรือ smart card)
└── CA certificate (เพื่อ trust server cert)

Certificate Distribution Methods:
├── Active Directory Certificate Services (ADCS) + Auto-enrollment
│   ├── Group Policy → auto-enroll cert ให้ domain-joined machines
│   ├── สะดวกที่สุดสำหรับ Windows environment
│   └── ต้องมี Enterprise CA
├── SCEP (Simple Certificate Enrollment Protocol)
│   ├── สำหรับ mobile devices (iOS, Android)
│   └── ใช้ร่วมกับ MDM (Intune, JAMF, etc.)
├── Manual enrollment
│   ├── ออก cert แล้วติดตั้งเอง
│   └── ไม่เหมาะกับจำนวนมาก
└── EST (Enrollment over Secure Transport)
    ├── มาตรฐานใหม่ แทน SCEP
    └── ปลอดภัยกว่า SCEP

ข้อดี EAP-TLS:
├── ปลอดภัยที่สุด — ไม่ใช้ password
├── ป้องกัน phishing, credential theft
├── Mutual authentication — ทั้ง 2 ฝั่ง verify กัน
└── เหมาะสำหรับ high-security environment

ข้อเสีย EAP-TLS:
├── ต้องมี PKI infrastructure (CA server, CRL/OCSP)
├── Deploy client cert ยุ่งยาก (โดยเฉพาะ BYOD)
├── Certificate lifecycle management (renew, revoke)
└── ค่าใช้จ่ายและความซับซ้อนสูงกว่า PEAP

3.5 EAP-TTLS (Tunneled TLS)

EAP-TTLS คล้ายกับ PEAP — สร้าง TLS tunnel ก่อนแล้วส่ง credentials ภายใน แต่ต่างจาก PEAP ตรงที่ inner method ไม่จำกัดเฉพาะ MSCHAPv2 สามารถใช้ PAP, CHAP, MSCHAP หรือ EAP อื่นๆ ได้ ทำให้มีความยืดหยุ่นมากกว่า และนิยมใน Linux environment มากกว่า Windows

ส่วนที่ 4: RADIUS Server — หัวใจของระบบ NAC

4.1 RADIUS Protocol พื้นฐาน

RADIUS (Remote Authentication Dial-In User Service) เป็นโปรโตคอลมาตรฐานสำหรับ Authentication, Authorization และ Accounting (AAA) ทำงานบน UDP port 1812 (authentication) และ 1813 (accounting)

RADIUS Message Types:

1. Access-Request: (Authenticator → RADIUS)
   ├── ส่งข้อมูลตัวตนของ client ไปตรวจสอบ
   ├── Contains: username, EAP-Message, NAS info
   └── Encrypted with shared secret

2. Access-Challenge: (RADIUS → Authenticator)
   ├── ขอข้อมูลเพิ่มเติมจาก client
   ├── เช่น ขอ password หลังจากได้ username
   └── ส่วนหนึ่งของ EAP conversation

3. Access-Accept: (RADIUS → Authenticator)
   ├── Authentication สำเร็จ
   ├── พร้อมส่ง authorization attributes:
   │   ├── Tunnel-Type: VLAN
   │   ├── Tunnel-Medium-Type: IEEE-802
   │   ├── Tunnel-Private-Group-ID: VLAN ID (เช่น 100)
   │   ├── Filter-Id: ACL name
   │   ├── Session-Timeout: เวลา session (วินาที)
   │   └── Vendor-Specific Attributes (VSA)
   └── Authenticator เปิด port + assign VLAN

4. Access-Reject: (RADIUS → Authenticator)
   ├── Authentication ล้มเหลว
   └── Authenticator ยัง block port

5. Accounting-Request/Response:
   ├── บันทึก session — start, stop, interim update
   ├── เก็บข้อมูล: เวลาที่เชื่อมต่อ, data usage
   └── ใช้สำหรับ audit trail และ compliance

4.2 FreeRADIUS — Open Source RADIUS Server

FreeRADIUS เป็น RADIUS server ที่ใช้กันมากที่สุดในโลก (ประมาณ 1 ใน 3 ของ RADIUS deployment ทั้งหมด) เป็น open source, ฟรี, รองรับ EAP methods ทั้งหมด และสามารถ integrate กับ AD/LDAP ได้:

# ติดตั้ง FreeRADIUS บน Ubuntu/Debian
sudo apt update
sudo apt install freeradius freeradius-utils freeradius-ldap

# ไฟล์ configuration หลัก
/etc/freeradius/3.0/
├── radiusd.conf          # Main config
├── clients.conf          # RADIUS clients (switches, APs)
├── users                 # Local user database
├── mods-available/       # Available modules
│   ├── eap               # EAP configuration
│   ├── ldap              # LDAP/AD integration
│   ├── mschap            # MSCHAPv2 for PEAP
│   └── sql               # SQL backend
├── mods-enabled/         # Enabled modules (symlinks)
├── sites-available/      # Virtual servers
│   ├── default           # Main authentication site
│   └── inner-tunnel      # Inner EAP tunnel
└── sites-enabled/        # Enabled sites

# ตัวอย่าง clients.conf — เพิ่ม switch/AP เป็น RADIUS client
client sw-core-01 {
    ipaddr = 192.168.1.1
    secret = MyR@diusSh@redSecret!
    shortname = sw-core-01
    nastype = cisco
}

client ap-floor-3 {
    ipaddr = 192.168.1.10
    secret = MyR@diusSh@redSecret!
    shortname = ap-floor-3
    nastype = other
}

# ตัวอย่าง EAP configuration (mods-available/eap)
eap {
    default_eap_type = peap
    timer_expire = 60
    ignore_unknown_eap_types = no

    tls-config tls-common {
        private_key_file = /etc/freeradius/3.0/certs/server.key
        certificate_file = /etc/freeradius/3.0/certs/server.pem
        ca_file = /etc/freeradius/3.0/certs/ca.pem
    }

    peap {
        tls = tls-common
        default_eap_type = mschapv2
        virtual_server = inner-tunnel
    }

    tls {
        tls = tls-common
    }
}

# ทดสอบ FreeRADIUS
sudo freeradius -X    # Debug mode — ดู log ทั้งหมด
radtest testuser testpass localhost 0 testing123

4.3 Microsoft NPS (Network Policy Server)

Microsoft NPS เป็น RADIUS server ที่มาพร้อมกับ Windows Server เหมาะสำหรับองค์กรที่ใช้ Active Directory เป็น identity store อยู่แล้ว เพราะ integrate กับ AD ได้ง่ายมาก:

Microsoft NPS Setup Checklist:

1. Install NPS Role:
   ├── Server Manager → Add Roles and Features
   ├── Network Policy and Access Services
   └── Network Policy Server

2. Register NPS in Active Directory:
   ├── NPS Console → Right-click NPS (Local)
   └── Register server in Active Directory

3. Add RADIUS Clients:
   ├── NPS → RADIUS Clients → New
   ├── Friendly name: sw-core-01
   ├── Address: 192.168.1.1
   └── Shared secret: MyR@diusSh@redSecret!

4. Configure Connection Request Policy:
   ├── Conditions: NAS Port Type = Ethernet
   ├── Settings: Authentication = Local computer
   └── Override network policy auth = No

5. Configure Network Policy:
   ├── Policy name: Corp-Wired-Access
   ├── Conditions:
   │   ├── Windows Groups = Domain Computers, Domain Users
   │   ├── NAS Port Type = Ethernet
   │   └── (Optional) Health Policies
   ├── Constraints:
   │   ├── Authentication Methods:
   │   │   ├── ✅ Microsoft: Protected EAP (PEAP)
   │   │   └── ✅ Microsoft: Smart Card or other cert (EAP-TLS)
   │   └── PEAP → inner method = MSCHAPv2
   └── Settings:
       ├── Standard RADIUS Attributes:
       │   ├── Tunnel-Type = VLAN
       │   ├── Tunnel-Medium-Type = 802
       │   └── Tunnel-Pvt-Group-ID = 100
       └── NAP: Not configured (deprecated)

6. Configure Certificate:
   ├── ต้องมี server certificate (auto-enroll จาก ADCS)
   ├── Certificate template: RAS and IAS Server
   └── ตรวจสอบ: certificate ยังไม่หมดอายุ

4.4 Cisco ISE (Identity Services Engine)

Cisco ISE เป็น NAC solution ระดับ enterprise ที่สมบูรณ์ที่สุด ไม่ใช่แค่ RADIUS server แต่รวมทุกอย่างเข้าด้วยกัน — authentication, authorization, profiling, posture assessment, guest access, BYOD onboarding และ TrustSec (SGT):

Cisco ISE Key Features:

1. Authentication & Authorization:
   ├── 802.1X (PEAP, EAP-TLS, EAP-FAST)
   ├── MAB (MAC Authentication Bypass)
   ├── Web Authentication (guest portal)
   ├── TACACS+ (สำหรับ device administration)
   └── SAML / OAuth integration

2. Profiling:
   ├── ระบุประเภทอุปกรณ์อัตโนมัติ
   ├── Probes: DHCP, DNS, HTTP, SNMP, NetFlow, RADIUS
   ├── ตัวอย่าง: "อุปกรณ์นี้คือ iPhone 15, macOS Sequoia, HP Printer"
   ├── ใช้ข้อมูล profiling ในการ authorize
   └── Feed update จาก Cisco — อัปเดต device profiles ใหม่ๆ

3. Posture Assessment:
   ├── ตรวจสอบสถานะความปลอดภัยของอุปกรณ์ก่อนอนุญาต
   ├── ตรวจ: Antivirus installed & updated?
   ├── ตรวจ: OS patches up to date?
   ├── ตรวจ: Firewall enabled?
   ├── ตรวจ: Disk encryption enabled?
   ├── ถ้าไม่ผ่าน → quarantine VLAN → remediation portal
   └── ใช้ AnyConnect ISE Posture Module หรือ Temporal Agent

4. Guest Access:
   ├── Captive Portal สำหรับแขก
   ├── Self-registration / sponsor-approved
   ├── SMS verification
   ├── Time-limited access
   └── แยก VLAN สำหรับ guest

5. TrustSec (SGT):
   ├── Scalable Group Tags — แทนที่ VLAN-based segmentation
   ├── Assign SGT ตาม identity (เช่น Employee=10, IoT=20)
   ├── SGT Policy Matrix — กำหนด policy ระหว่าง groups
   └── ทำงานร่วมกับ Cisco switches/firewalls

ISE Deployment Models:
├── Standalone: 1 node ทำทุกอย่าง (เหมาะ lab/SMB)
├── Distributed: แยก roles — PAN, MnT, PSN
│   ├── PAN (Policy Admin Node) — policy management
│   ├── MnT (Monitoring & Troubleshooting) — logging
│   └── PSN (Policy Service Node) — authentication processing
└── High Availability: Primary + Secondary PAN, multiple PSN

ส่วนที่ 5: NAC Solutions อื่นๆ

5.1 Aruba ClearPass

Aruba ClearPass Policy Manager เป็นอีก NAC solution ที่ได้รับความนิยมสูง โดยเฉพาะในองค์กรที่ใช้ Aruba wireless infrastructure ข้อดีคือ vendor-agnostic — ทำงานร่วมกับ switch และ AP จากหลาย vendor ได้ ไม่จำกัดเฉพาะ Aruba:

ClearPass Key Features:
├── 802.1X Authentication (PEAP, EAP-TLS)
├── OnGuard Agent — posture assessment
├── OnBoard — BYOD certificate provisioning
├── Guest Portal — customizable guest access
├── Device Profiling — fingerprinting
├── Policy Manager — visual policy editor
├── Integration: AD, LDAP, SQL, MDM, SIEM
├── REST API — automation friendly
└── ข้อดี: ใช้ได้กับ multi-vendor network

5.2 FortiNAC (Fortinet)

FortiNAC เป็น NAC solution จาก Fortinet ที่เน้น visibility และ automated response ทำงานร่วมกับ FortiGate firewall ได้อย่างดีเยี่ยม เหมาะสำหรับองค์กรที่ใช้ Fortinet ecosystem อยู่แล้ว:

FortiNAC Highlights:
├── Agentless device profiling — ไม่ต้องติดตั้ง agent
├── 20+ profiling methods
├── Automated response — isolate/quarantine ทันที
├── Integration กับ Security Fabric (FortiGate, FortiSwitch, FortiAP)
├── Multi-vendor support (3rd party switches/APs)
├── Micro-segmentation
├── Compliance enforcement
└── ข้อดี: ถ้าใช้ FortiGate อยู่แล้ว integrate ได้ง่ายมาก

5.3 PacketFence — Open Source NAC

PacketFence เป็น NAC solution แบบ open source ที่สมบูรณ์ที่สุด เหมาะสำหรับองค์กรที่มี budget จำกัดแต่ต้องการ NAC ที่ทำงานได้จริง:

PacketFence Features:
├── ฟรี! (open source, GPL)
├── 802.1X + MAB + Web Authentication
├── Built-in RADIUS (FreeRADIUS integrated)
├── Device profiling (DHCP fingerprinting, User-Agent)
├── Captive portal (guest access, BYOD)
├── Compliance enforcement (antivirus check)
├── VLAN assignment based on role
├── Inline enforcement (สำหรับ switch ที่ไม่รองรับ 802.1X)
├── Integration: AD, LDAP, RADIUS
├── Support: 50+ switch vendors (Cisco, HP, Juniper, etc.)
├── Docker deployment available
└── Community support + paid support option

# ติดตั้ง PacketFence บน RHEL/CentOS
sudo yum install packetfence
sudo /usr/local/pf/bin/pfcmd pfconfig

# Docker deployment
docker pull packetfence/packetfence
docker-compose up -d

เหมาะกับ:
├── SMB ที่มี budget จำกัด
├── สถาบันการศึกษา
├── องค์กรที่ต้องการ PoC ก่อน invest ใน commercial NAC
└── IT team ที่มีความสามารถ manage open source

ส่วนที่ 6: การ Configure 802.1X บน Switch (Wired)

6.1 Cisco Switch 802.1X Configuration

ตัวอย่างการ configure 802.1X บน Cisco Catalyst switch ซึ่งเป็นรูปแบบที่พบมากที่สุดในองค์กรไทย:

! === Cisco Switch 802.1X Configuration ===

! Step 1: Enable AAA (Authentication, Authorization, Accounting)
aaa new-model
aaa authentication dot1x default group radius
aaa authorization network default group radius
aaa accounting dot1x default start-stop group radius

! Step 2: Configure RADIUS Server
radius server ISE-PRIMARY
 address ipv4 192.168.1.100 auth-port 1812 acct-port 1813
 key 0 MyR@diusSh@redSecret!
 timeout 5
 retransmit 3

radius server ISE-SECONDARY
 address ipv4 192.168.1.101 auth-port 1812 acct-port 1813
 key 0 MyR@diusSh@redSecret!
 timeout 5
 retransmit 3

aaa group server radius ISE-GROUP
 server name ISE-PRIMARY
 server name ISE-SECONDARY
 deadtime 15

! Step 3: Enable 802.1X globally
dot1x system-auth-control

! Step 4: Configure access port with 802.1X
interface GigabitEthernet1/0/1
 description User-Port-Floor3-Room301
 switchport mode access
 switchport access vlan 999
 ! VLAN 999 = dead VLAN (ไม่มี traffic ถ้า auth fail)

 ! Enable 802.1X
 authentication port-control auto
 dot1x pae authenticator

 ! Authentication order: try 802.1X first, then MAB
 authentication order dot1x mab
 authentication priority dot1x mab

 ! MAB fallback for non-802.1X devices (printers, etc.)
 mab

 ! Host mode
 authentication host-mode multi-auth
 ! single-host: 1 device per port
 ! multi-host: 1 auth, all devices on port authorized
 ! multi-domain: 1 voice + 1 data (IP phone + PC)
 ! multi-auth: each device must auth separately

 ! VLAN assignment
 authentication event fail action authorize vlan 999
 authentication event no-response action authorize vlan 999
 authentication event server dead action authorize vlan 1
 authentication event server alive action reinitialize

 ! Timers
 authentication timer reauthenticate server
 dot1x timeout tx-period 10
 dot1x max-reauth-req 3

 ! Enable periodic re-authentication
 authentication periodic

 ! Storm control
 storm-control broadcast level 10
 storm-control multicast level 10

 spanning-tree portfast
 spanning-tree bpduguard enable

! Step 5: Configure Guest VLAN (สำหรับ device ที่ไม่มี supplicant)
interface GigabitEthernet1/0/1
 authentication event no-response action authorize vlan 100
 ! VLAN 100 = Guest VLAN — internet only, no internal access

! Step 6: Configure Critical VLAN (เมื่อ RADIUS server down)
interface GigabitEthernet1/0/1
 authentication event server dead action authorize vlan 1
 authentication event server dead action authorize voice
 ! เมื่อ RADIUS down → ให้ใช้งาน VLAN 1 ชั่วคราว (critical auth)

! Step 7: Verify
show dot1x all
show authentication sessions
show authentication sessions interface Gi1/0/1 details
show aaa servers

6.2 Host Modes อธิบายละเอียด

802.1X Host Modes:

1. Single-Host Mode:
   ├── อนุญาต 1 MAC address ต่อ port
   ├── ถ้ามี MAC ที่ 2 → port violation
   ├── เหมาะสำหรับ: ห้อง server, จุดที่ต้อง secure สูง
   └── ปัญหา: ใช้กับ IP phone + PC ไม่ได้

2. Multi-Domain Mode:
   ├── อนุญาต 1 device ใน data domain + 1 device ใน voice domain
   ├── เหมาะสำหรับ: desk ที่มี IP phone → PC ต่อผ่าน phone
   ├── Phone auth ด้วย CDP/LLDP-MED หรือ MAB
   └── PC auth ด้วย 802.1X

3. Multi-Auth Mode:
   ├── แต่ละ device ต้อง authenticate แยกกัน
   ├── เหมาะสำหรับ: port ที่ต่อกับ hub/small switch
   ├── จำกัดจำนวน MAC ได้
   └── แนะนำ: ใช้ mode นี้เป็น default

4. Multi-Host Mode:
   ├── auth 1 device → ทุก device บน port ได้สิทธิ์
   ├── ไม่ปลอดภัย — ไม่แนะนำ
   └── ใช้เฉพาะ legacy scenarios

ส่วนที่ 7: Wireless 802.1X Configuration

7.1 WPA2/WPA3-Enterprise

ใน wireless network, 802.1X ถูกใช้ร่วมกับ WPA2-Enterprise หรือ WPA3-Enterprise (ต่างจาก WPA2-Personal ที่ใช้ pre-shared key) โดย access point ทำหน้าที่เป็น authenticator:

Wireless 802.1X vs PSK:

WPA2-Personal (PSK):
├── ใช้ password เดียวกันทุกคน
├── ถ้า password หลุด → เปลี่ยนทุกเครื่อง
├── ไม่รู้ว่าใครเชื่อมต่อ (ไม่มี identity)
├── ไม่สามารถ assign VLAN per-user
└── เหมาะสำหรับ: บ้าน, ร้านกาแฟ

WPA2-Enterprise (802.1X):
├── แต่ละคนใช้ credentials ตัวเอง (username/password หรือ cert)
├── ถ้าพนักงานลาออก → disable account ใน AD → เสร็จ
├── รู้ว่าใครเชื่อมต่อ (identity-based)
├── สามารถ assign VLAN per-user/group
├── สามารถ apply ACL/policy per-user
└── เหมาะสำหรับ: องค์กร, enterprise

WPA3-Enterprise (802.1X + 192-bit):
├── ทุกอย่างเหมือน WPA2-Enterprise
├── เพิ่ม: SAE (Simultaneous Authentication of Equals)
├── เพิ่ม: 192-bit security suite (CNSA)
├── ป้องกัน: offline dictionary attack
├── ป้องกัน: key reinstallation attack (KRACK)
└── แนะนำสำหรับ: new deployment ทั้งหมด

7.2 ตัวอย่าง Configuration บน Cisco WLC

# Cisco WLC — WPA2-Enterprise SSID Configuration

# 1. สร้าง WLAN
config wlan create 1 Corp-WiFi "Corp-WiFi"
config wlan security wpa wpa2 enable 1
config wlan security wpa wpa2 ciphers aes enable 1
config wlan security wpa akm 802.1x enable 1
config wlan security wpa akm psk disable 1

# 2. กำหนด RADIUS server
config radius auth add 1 192.168.1.100 1812 ascii MyR@diusSh@redSecret!
config radius acct add 1 192.168.1.100 1813 ascii MyR@diusSh@redSecret!
config wlan radius_server auth add 1 1
config wlan radius_server acct add 1 1

# 3. Enable AAA Override (เพื่อรับ VLAN จาก RADIUS)
config wlan aaa-override enable 1

# 4. Enable WLAN
config wlan enable 1

ส่วนที่ 8: Guest Access และ Web Authentication

8.1 Captive Portal สำหรับแขก

ไม่ใช่ทุกคนที่เข้ามาในองค์กรจะมี 802.1X supplicant — แขก (guest), vendor, contractor ต้องมีวิธีเข้าถึง internet ได้ด้วย โดยใช้ Captive Portal (Web Authentication):

Guest Access Methods:

1. Self-Registration Portal:
   ├── แขกกรอก: ชื่อ, อีเมล, เบอร์โทร, บริษัท
   ├── ระบบส่ง SMS/Email verification code
   ├── ได้รับ temporary credentials (valid 8 ชั่วโมง)
   ├── เข้าถึงได้เฉพาะ internet (ไม่เห็น internal network)
   └── ข้อดี: ไม่ต้องรบกวน staff

2. Sponsor-Approved Portal:
   ├── แขกกรอกข้อมูล + ระบุ sponsor (พนักงานที่เชิญ)
   ├── Sponsor ได้รับ email/SMS → approve/deny
   ├── หลัง approve → แขกได้ credentials
   ├── Audit trail: รู้ว่าใครเป็น sponsor
   └── ข้อดี: มี accountability, ปลอดภัยกว่า

3. Pre-Registered Account:
   ├── IT/Reception สร้าง guest account ล่วงหน้า
   ├── พิมพ์ username/password ให้แขก
   ├── กำหนดวันหมดอายุ
   └── ข้อดี: ควบคุมได้เต็มที่

4. Social Login:
   ├── Login ด้วย Google, Facebook, Line
   ├── เหมาะสำหรับ co-working space, โรงแรม
   └── ข้อดี: สะดวกสำหรับผู้ใช้

Guest Network Architecture:
┌──────────┐    ┌──────────┐    ┌──────────┐
│  Guest   │───▶│  Guest   │───▶│ Internet │
│  Device  │    │  VLAN    │    │ Gateway  │
└──────────┘    │ (VLAN200)│    └──────────┘
                └──────────┘
                     │
                ⛔ NO ACCESS ⛔
                     │
                ┌──────────┐
                │ Internal │
                │ Network  │
                │(VLAN10-99│
                └──────────┘

8.2 MAC Authentication Bypass (MAB)

MAB ใช้สำหรับอุปกรณ์ที่ ไม่รองรับ 802.1X supplicant — เช่น เครื่องพิมพ์, กล้อง CCTV, smart TV, เครื่อง barcode scanner, IoT sensors อุปกรณ์เหล่านี้ไม่สามารถส่ง EAP credentials ได้ จึงใช้ MAC address เป็นตัว identify แทน:

MAB (MAC Authentication Bypass) Workflow:

1. อุปกรณ์เสียบสาย LAN
2. Switch ส่ง EAP-Request/Identity → ไม่มีการตอบ (timeout)
3. Switch fallback ไปใช้ MAB
4. Switch อ่าน source MAC address ของอุปกรณ์
5. ส่ง MAC address เป็น username/password ไปยัง RADIUS
   (เช่น username=001122334455, password=001122334455)
6. RADIUS ตรวจสอบ MAC ใน database
7. ถ้าตรง → Access-Accept + VLAN assignment
8. ถ้าไม่ตรง → Access-Reject → dead VLAN หรือ guest portal

MAB Configuration on Cisco Switch:
interface GigabitEthernet1/0/10
 description Printer-Floor3
 switchport mode access
 switchport access vlan 999
 authentication port-control auto
 authentication order mab dot1x
 ! MAB first (เพราะรู้ว่า port นี้ต่อ printer)
 mab
 dot1x pae authenticator
 spanning-tree portfast

RADIUS Policy for MAB (ตัวอย่าง FreeRADIUS):
# users file
001122334455 Cleartext-Password := "001122334455"
    Tunnel-Type = VLAN,
    Tunnel-Medium-Type = IEEE-802,
    Tunnel-Private-Group-ID = 50

ข้อจำกัด MAB:
├── MAC address สามารถ spoof ได้ (ไม่ปลอดภัย 100%)
├── ต้อง maintain MAC address database
├── ไม่มี encryption (ต่างจาก 802.1X)
└── ใช้เป็น supplement ร่วมกับ 802.1X เท่านั้น

ส่วนที่ 9: Posture Assessment และ Device Profiling

9.1 Posture Assessment คืออะไร?

Posture Assessment คือการตรวจสอบสถานะความปลอดภัยของอุปกรณ์ ก่อน หรือ หลัง อนุญาตให้เข้าเครือข่าย — เช่น ตรวจว่ามี antivirus ไหม, OS update ล่าสุดไหม, firewall เปิดอยู่ไหม ถ้าอุปกรณ์ไม่ผ่านเกณฑ์ จะถูกส่งไปยัง quarantine VLAN เพื่อ remediate ก่อน:

Posture Assessment Flow:

Client เชื่อมต่อ
     │
     ▼
802.1X Auth สำเร็จ
     │
     ▼
Posture Agent ตรวจสอบ:
├── ✅ Antivirus installed? → Yes (Trend Micro)
├── ✅ Antivirus definitions updated? → Yes (วันนี้)
├── ✅ OS patches up to date? → Yes (KB5034441)
├── ✅ Firewall enabled? → Yes
├── ✅ Disk encryption? → Yes (BitLocker)
├── ❌ USB storage blocked? → No ← FAIL!
└── ❌ Screen lock timeout ≤ 5 min? → 15 min ← FAIL!
     │
     ▼
Posture Result: NON-COMPLIANT
     │
     ▼
Action: Assign Quarantine VLAN (VLAN 999)
     │
     ▼
Redirect to Remediation Portal:
├── "อุปกรณ์ของคุณไม่ผ่านเกณฑ์ความปลอดภัย"
├── "กรุณาปิดการใช้งาน USB storage"
├── "กรุณาตั้ง screen lock timeout ≤ 5 นาที"
└── "เมื่อแก้ไขแล้ว กด Re-check"
     │
     ▼
Re-check → COMPLIANT → Production VLAN

9.2 Device Profiling

Device Profiling คือการระบุประเภทของอุปกรณ์โดยอัตโนมัติ (device fingerprinting) โดยไม่ต้องติดตั้ง agent ระบบจะวิเคราะห์ traffic patterns, DHCP options, HTTP User-Agent, OUI (MAC vendor) และข้อมูลอื่นๆ เพื่อจำแนกว่าอุปกรณ์นั้นคืออะไร:

Profiling Probes:

1. DHCP Profiling:
   ├── วิเคราะห์ DHCP options (option 55, 60, 12)
   ├── ตัวอย่าง: iPhone ส่ง DHCP option 55 = 1,121,3,6,15,119,252
   ├── Apple devices มี pattern เฉพาะ
   └── ไม่ต้องติดตั้งอะไรบนอุปกรณ์

2. HTTP User-Agent:
   ├── วิเคราะห์ User-Agent string จาก web traffic
   ├── ตัวอย่าง: "Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X)"
   └── ต้อง intercept HTTP traffic (proxy หรือ SPAN)

3. MAC OUI (Organizationally Unique Identifier):
   ├── 3 bytes แรกของ MAC address → ระบุ vendor
   ├── ตัวอย่าง: 00:1A:2B → Vendor = Cisco
   ├── ไม่แม่นยำเสมอไป (VM, USB adapter)
   └── ใช้เป็น initial classification

4. SNMP Profiling:
   ├── Query SNMP OID ของอุปกรณ์
   ├── ได้ข้อมูล: system description, model, firmware
   └── ต้องเปิด SNMP บนอุปกรณ์

5. Active Probing (NMAP-style):
   ├── Scan ports ที่เปิดอยู่บนอุปกรณ์
   ├── ตัวอย่าง: port 9100 open = printer
   ├── port 554 open = IP camera (RTSP)
   └── อาจ trigger IDS/IPS alert

Profile-Based Policy Example:
├── Profile = "Cisco IP Phone" → Voice VLAN (VLAN 50)
├── Profile = "HP LaserJet" → Printer VLAN (VLAN 60)
├── Profile = "Hikvision Camera" → IoT VLAN (VLAN 70)
├── Profile = "Windows 11 (Domain)" → Corporate VLAN (VLAN 10)
├── Profile = "iPhone (BYOD)" → BYOD VLAN (VLAN 80)
└── Profile = "Unknown" → Quarantine VLAN (VLAN 999)

ส่วนที่ 10: VLAN Assignment Based on Identity

10.1 Dynamic VLAN Assignment

หนึ่งในความสามารถที่ทรงพลังที่สุดของ NAC คือ Dynamic VLAN Assignment — การ assign VLAN ให้กับ port โดยอัตโนมัติตาม identity ของผู้ใช้หรืออุปกรณ์ แทนที่จะ hardcode VLAN บน switch port ทำให้พนักงานสามารถนั่งทำงานที่ desk ไหนก็ได้ แล้วได้ VLAN เดิมตลอด:

Dynamic VLAN Assignment Architecture:

Traditional (Static VLAN):
├── Port Gi1/0/1 = VLAN 10 (IT)
├── Port Gi1/0/2 = VLAN 20 (Finance)
├── Port Gi1/0/3 = VLAN 30 (HR)
└── ปัญหา: ถ้าพนักงาน IT ไปนั่ง desk ของ Finance → ต้องเปลี่ยน VLAN ที่ switch

Dynamic VLAN (with NAC):
├── ทุก port config เหมือนกัน (template)
├── พนักงาน IT authenticate → ได้ VLAN 10 (ไม่ว่าจะนั่งที่ไหน)
├── พนักงาน Finance authenticate → ได้ VLAN 20
├── Guest authenticate → ได้ VLAN 200
└── ไม่ต้องเปลี่ยน config ที่ switch เลย

RADIUS Attributes for VLAN Assignment:

# FreeRADIUS — users file
it_user Cleartext-Password := "password"
    Tunnel-Type = VLAN,
    Tunnel-Medium-Type = IEEE-802,
    Tunnel-Private-Group-ID = 10

finance_user Cleartext-Password := "password"
    Tunnel-Type = VLAN,
    Tunnel-Medium-Type = IEEE-802,
    Tunnel-Private-Group-ID = 20

# หรือใช้ LDAP group mapping
DEFAULT Ldap-Group == "CN=IT-Department,OU=Groups,DC=corp,DC=local"
    Tunnel-Type = VLAN,
    Tunnel-Medium-Type = IEEE-802,
    Tunnel-Private-Group-ID = 10

DEFAULT Ldap-Group == "CN=Finance,OU=Groups,DC=corp,DC=local"
    Tunnel-Type = VLAN,
    Tunnel-Medium-Type = IEEE-802,
    Tunnel-Private-Group-ID = 20

10.2 Authorization Policy Design

NAC Authorization Policy Matrix:

┌─────────────┬──────────┬──────────┬───────────┬──────────┐
│ Identity    │ Device   │ Posture  │ VLAN      │ ACL      │
│             │ Type     │ Status   │ Assigned  │ Applied  │
├─────────────┼──────────┼──────────┼───────────┼──────────┤
│ IT Admin    │ Corp PC  │ Compliant│ VLAN 10   │ Full     │
│ IT Admin    │ Corp PC  │ Non-Comp │ VLAN 999  │ Remediate│
│ IT Admin    │ BYOD     │ Any      │ VLAN 80   │ Limited  │
├─────────────┼──────────┼──────────┼───────────┼──────────┤
│ Employee    │ Corp PC  │ Compliant│ VLAN 20   │ Standard │
│ Employee    │ Corp PC  │ Non-Comp │ VLAN 999  │ Remediate│
│ Employee    │ BYOD     │ Any      │ VLAN 80   │ Internet │
├─────────────┼──────────┼──────────┼───────────┼──────────┤
│ Contractor  │ Any      │ Any      │ VLAN 90   │ Project  │
├─────────────┼──────────┼──────────┼───────────┼──────────┤
│ Guest       │ Any      │ N/A      │ VLAN 200  │ Internet │
├─────────────┼──────────┼──────────┼───────────┼──────────┤
│ IoT Device  │ Camera   │ N/A      │ VLAN 70   │ NVR only │
│ IoT Device  │ Printer  │ N/A      │ VLAN 60   │ Print    │
│ IoT Device  │ Phone    │ N/A      │ VLAN 50   │ Voice    │
├─────────────┼──────────┼──────────┼───────────┼──────────┤
│ Unknown     │ Unknown  │ Unknown  │ VLAN 999  │ Block    │
└─────────────┴──────────┴──────────┴───────────┴──────────┘

ส่วนที่ 11: NAC Implementation Best Practices

11.1 Phased Deployment Approach

การ deploy NAC ที่สำเร็จต้องทำเป็นขั้นตอน ห้ามเปิด enforce ทันทีทั้งเครือข่าย เพราะจะทำให้เกิดปัญหามากมาย — อุปกรณ์ที่ไม่ได้ config, user ที่ไม่รู้ password, printer ที่หลุดเครือข่าย:

NAC Deployment Phases:

Phase 1: Monitor Mode (4-8 สัปดาห์)
├── เปิด 802.1X แบบ open mode (auth ไม่ผ่านก็ยังใช้ได้)
├── เก็บ data: ใครเชื่อมต่อ, อุปกรณ์อะไร, auth สำเร็จ/ล้มเหลว
├── สร้าง device inventory ที่สมบูรณ์
├── ระบุ devices ที่ต้อง MAB (printers, cameras, etc.)
├── แก้ปัญหา supplicant configuration
├── ไม่กระทบ user — ถ้า auth fail ก็ยังเข้าได้
└── เป้าหมาย: auth success rate > 95%

Phase 2: Low-Impact Enforcement (4 สัปดาห์)
├── เปิด enforcement บน non-critical ports ก่อน
├── ห้อง meeting, hot desk, guest area
├── ถ้า auth fail → guest VLAN (internet only)
├── ยังไม่ enforce ใน critical areas (server room, exec floor)
├── Monitor issues + tune policies
└── เป้าหมาย: ไม่มี ticket จาก user มากเกินไป

Phase 3: Full Enforcement (ค่อยๆ ทำ)
├── เปิด enforcement ทีละ floor / building
├── ทำ communication ให้ user ทราบล่วงหน้า 2 สัปดาห์
├── มี helpdesk พร้อมรองรับ
├── Rollback plan: ถ้ามีปัญหา → สามารถ disable 802.1X ได้ทันที
└── เป้าหมาย: 100% coverage

Phase 4: Advanced Features
├── เปิด posture assessment
├── เปิด device profiling
├── Integrate กับ SIEM, SOAR
├── Automate response (auto-quarantine compromised devices)
└── Continuous improvement

11.2 Common Pitfalls ที่ควรหลีกเลี่ยง

NAC Implementation Pitfalls:

1. ❌ เปิด enforcement ทันทีโดยไม่มี monitor period
   → ผลลัพธ์: อุปกรณ์ครึ่งเครือข่ายหลุด, user ทำงานไม่ได้
   ✅ แก้ไข: เริ่ม monitor mode ก่อนอย่างน้อย 4 สัปดาห์

2. ❌ ไม่สำรวจ non-802.1X devices ก่อน deploy
   → ผลลัพธ์: printer, camera, IoT หลุดหมด
   ✅ แก้ไข: สำรวจ + สร้าง MAB whitelist ก่อน

3. ❌ ไม่มี fallback plan เมื่อ RADIUS server down
   → ผลลัพธ์: ทุกคนเข้าเครือข่ายไม่ได้
   ✅ แก้ไข: configure critical VLAN + RADIUS redundancy

4. ❌ ใช้ shared secret ง่ายๆ เหมือนกันทุก switch
   → ผลลัพธ์: ถ้า secret หลุด 1 ตัว กระทบทั้งหมด
   ✅ แก้ไข: ใช้ unique secret per device + rotate ทุก 90 วัน

5. ❌ ไม่ train helpdesk/support team
   → ผลลัพธ์: support แก้ปัญหาไม่ได้ → bypass 802.1X เป็น quick fix
   ✅ แก้ไข: train ก่อน deploy + สร้าง troubleshooting guide

6. ❌ Certificate management ไม่ดี
   → ผลลัพธ์: cert หมดอายุ → ทุกคน auth ไม่ได้
   ✅ แก้ไข: monitor cert expiry + auto-renewal + alert 30 วันล่วงหน้า

7. ❌ ไม่มี exception process
   → ผลลัพธ์: IT แก้ปัญหาโดย disable 802.1X แบบถาวร
   ✅ แก้ไข: สร้าง formal exception process — request, approve, review

ส่วนที่ 12: Troubleshooting 802.1X

12.1 Common Problems and Solutions

802.1X Troubleshooting Guide:

Problem 1: Client ไม่ได้ IP address หลัง authenticate
├── อาการ: auth สำเร็จ แต่ได้ 169.254.x.x (APIPA)
├── สาเหตุ 1: VLAN ที่ assign ไม่มี DHCP scope
│   └── แก้ไข: ตรวจสอบ DHCP server มี scope สำหรับ VLAN นั้น
├── สาเหตุ 2: VLAN ที่ assign ไม่ได้ถูก allow บน trunk
│   └── แก้ไข: เพิ่ม VLAN ใน allowed VLAN list บน trunk port
├── สาเหตุ 3: SVI สำหรับ VLAN นั้นไม่มี
│   └── แก้ไข: สร้าง SVI + enable ip helper-address
└── Debug: show authentication sessions interface Gi1/0/1 details

Problem 2: Authentication timeout
├── อาการ: EAP-Request/Identity ไม่ถึง client
├── สาเหตุ 1: Supplicant ไม่ได้เปิดบน client
│   └── แก้ไข: เปิด Wired AutoConfig service (Windows)
├── สาเหตุ 2: Dot1x service ไม่ได้ start บน client
│   └── แก้ไข: sc start dot3svc (Windows)
├── สาเหตุ 3: NIC driver ไม่รองรับ 802.1X
│   └── แก้ไข: update driver / check NIC properties
└── Debug: กด Windows + R → services.msc → Wired AutoConfig

Problem 3: RADIUS server unreachable
├── อาการ: auth ล้มเหลวทุก port
├── สาเหตุ 1: RADIUS server down
│   └── แก้ไข: ตรวจสอบ service status
├── สาเหตุ 2: Firewall block UDP 1812/1813
│   └── แก้ไข: เปิด port บน firewall ระหว่าง switch กับ RADIUS
├── สาเหตุ 3: Shared secret ไม่ตรง
│   └── แก้ไข: ตรวจสอบ shared secret ทั้ง 2 ฝั่ง (case-sensitive)
├── สาเหตุ 4: RADIUS server ไม่รู้จัก switch (ไม่ได้เพิ่มใน clients.conf)
│   └── แก้ไข: เพิ่ม switch IP ใน RADIUS clients config
└── Debug: test aaa group radius ISE-GROUP testuser testpass new-code

Problem 4: Certificate ไม่ trust
├── อาการ: client popup "certificate not trusted" → user กด cancel
├── สาเหตุ: client ไม่มี CA cert ของ RADIUS server
├── แก้ไข Windows: GPO → distribute CA cert to Trusted Root CA store
├── แก้ไข macOS: Configuration Profile (.mobileconfig)
├── แก้ไข iOS/Android: MDM push CA cert
└── สำคัญ: อย่าสอน user ให้ "ไม่ตรวจสอบ server cert" — เสี่ยง Evil Twin

Problem 5: User ผิด VLAN
├── อาการ: authenticate สำเร็จ แต่ได้ VLAN ผิด
├── สาเหตุ 1: RADIUS policy match ผิด rule
│   └── แก้ไข: ตรวจสอบ policy priority/order
├── สาเหตุ 2: User ไม่ได้อยู่ใน AD group ที่ถูกต้อง
│   └── แก้ไข: เพิ่ม user ใน AD group ที่เหมาะสม
├── สาเหตุ 3: RADIUS ส่ง VLAN attribute ผิด format
│   └── แก้ไข: ตรวจสอบ Tunnel-Private-Group-ID = VLAN ID (ตัวเลข)
└── Debug: ดู RADIUS log → ดู attributes ที่ส่งกลับ

Useful Debug Commands (Cisco Switch):
show dot1x all
show dot1x interface Gi1/0/1 details
show authentication sessions
show authentication sessions interface Gi1/0/1 details
show authentication registrations
debug dot1x all
debug radius authentication
debug radius accounting
test aaa group radius ISE-GROUP testuser testpass new-code

12.2 Windows Supplicant Configuration via GPO

Windows 802.1X GPO Configuration:

Computer Configuration:
├── Policies
│   ├── Windows Settings
│   │   └── Security Settings
│   │       ├── System Services
│   │       │   └── Wired AutoConfig → Automatic
│   │       └── Public Key Policies
│   │           └── Trusted Root CA → Import corporate CA cert
│   └── Administrative Templates
│       └── Network
│           └── Wired Network (802.3) Policies
│               ├── Name: Corp-Wired-802.1X
│               ├── ✅ Use Windows Wired Network service
│               ├── Authentication:
│               │   ├── EAP Type: Microsoft: Protected EAP (PEAP)
│               │   ├── ✅ Validate server certificate
│               │   ├── Connect to: radius.corp.local
│               │   ├── Trusted Root CA: Corp-CA
│               │   ├── Inner method: Secured password (MSCHAPv2)
│               │   └── ✅ Enable fast reconnect
│               ├── Advanced:
│               │   ├── ✅ Machine authentication
│               │   ├── ✅ User authentication
│               │   ├── Guest authentication: ❌ Disabled
│               │   └── Max auth failures: 3
│               └── ✅ Enable single sign-on
│                   └── Perform immediately before user logon

# PowerShell — ตรวจสอบ 802.1X status บน Windows
netsh lan show interfaces
netsh lan show profiles
Get-NetAdapterAuthentication

ส่วนที่ 13: NAC Policies and Rules Design

13.1 Policy Hierarchy

การออกแบบ NAC policy ที่ดีต้องมีโครงสร้างที่ชัดเจน เรียงลำดับจาก specific ไปยัง general:

NAC Policy Processing Order:

1. Device Profiling Match (ระบุประเภทอุปกรณ์)
   │
   ▼
2. Authentication Method (802.1X / MAB / Web Auth)
   │
   ▼
3. Identity Matching (user/group/certificate)
   │
   ▼
4. Posture Status (compliant / non-compliant / unknown)
   │
   ▼
5. Authorization Result (VLAN + ACL + Session timeout)

Policy Rules (เรียงตาม priority):

Rule 1: Known IoT Device (MAB match) → IoT VLAN
Rule 2: Corp Device + IT Admin + Compliant → IT VLAN (full access)
Rule 3: Corp Device + Employee + Compliant → Employee VLAN (standard)
Rule 4: Corp Device + Non-Compliant → Quarantine VLAN (remediate)
Rule 5: BYOD + Employee → BYOD VLAN (internet + limited internal)
Rule 6: Guest Portal Auth → Guest VLAN (internet only)
Rule 7: Contractor + Certificate → Project VLAN (project resources)
Rule 8: Default Deny → Block (ไม่ match rule ใดๆ → deny)

สำคัญ: Default policy ควรเป็น DENY เสมอ (deny by default, allow by exception)

13.2 Change of Authorization (CoA)

CoA (Change of Authorization) หรือ RADIUS Disconnect Message (RFC 5176) ช่วยให้ RADIUS server สามารถ เปลี่ยน authorization ของ session ที่ active อยู่ ได้แบบ real-time โดยไม่ต้องรอ re-authentication:

CoA Use Cases:

1. Posture Change:
   ├── อุปกรณ์ auth สำเร็จ → VLAN 10
   ├── Posture check เสร็จ → non-compliant
   ├── RADIUS ส่ง CoA → เปลี่ยน VLAN เป็น 999 (quarantine)
   └── ไม่ต้อง disconnect + reconnect

2. Incident Response:
   ├── SIEM detect ว่าเครื่องนี้มี malware activity
   ├── SIEM → NAC API → trigger CoA
   ├── NAC ส่ง CoA → quarantine ทันที
   └── Automated response — ภายในวินาที

3. Role Change:
   ├── Admin เปลี่ยน user จาก "Employee" เป็น "Contractor"
   ├── NAC ส่ง CoA → เปลี่ยน VLAN ทันที
   └── ไม่ต้องให้ user disconnect/reconnect

CoA Configuration (Cisco Switch):
aaa server radius dynamic-author
 client 192.168.1.100 server-key MyR@diusSh@redSecret!
 port 3799
 auth-type any

ส่วนที่ 14: สรุปและข้อแนะนำ

14.1 Comparison: NAC Solutions

NAC Solution Comparison:

┌─────────────┬──────────┬───────────┬───────────┬───────────┐
│ Feature     │ Cisco ISE│ ClearPass │ FortiNAC  │PacketFence│
├─────────────┼──────────┼───────────┼───────────┼───────────┤
│ License     │ $$$$     │ $$$       │ $$        │ Free      │
│ 802.1X      │ ✅       │ ✅        │ ✅        │ ✅        │
│ Profiling   │ ★★★★★   │ ★★★★☆    │ ★★★★☆    │ ★★★☆☆    │
│ Posture     │ ★★★★★   │ ★★★★☆    │ ★★★☆☆    │ ★★★☆☆    │
│ Guest       │ ★★★★★   │ ★★★★★    │ ★★★☆☆    │ ★★★★☆    │
│ BYOD        │ ★★★★★   │ ★★★★★    │ ★★★☆☆    │ ★★★☆☆    │
│ Multi-vendor│ ★★★★☆   │ ★★★★★    │ ★★★★☆    │ ★★★★☆    │
│ Ease of Use │ ★★★☆☆   │ ★★★★☆    │ ★★★★☆    │ ★★☆☆☆    │
│ Community   │ Large    │ Medium    │ Medium    │ Active    │
│ Best For    │ Cisco    │ Multi-    │ Fortinet  │ Budget-   │
│             │ shops    │ vendor    │ shops     │ conscious │
└─────────────┴──────────┴───────────┴───────────┴───────────┘

14.2 ข้อแนะนำสำหรับองค์กรไทย

สำหรับองค์กรในประเทศไทยที่ต้องการเริ่มต้นใช้ NAC นี่คือข้อแนะนำ:

NAC Recommendation by Organization Size:

SMB (< 100 users):
├── NAC: PacketFence หรือ FreeRADIUS + basic policies
├── EAP: PEAP (MSCHAPv2) — ง่ายที่สุด
├── Identity: Active Directory (already have)
├── Budget: ฟรี (open source) + เวลา IT team
└── Timeline: 2-4 สัปดาห์

Medium (100-500 users):
├── NAC: FortiNAC (ถ้าใช้ FortiGate) หรือ ClearPass
├── EAP: PEAP + MAB for IoT
├── Identity: AD + ADCS for server cert
├── Features: Guest portal, basic profiling
├── Budget: ล้านต้นๆ (license + implementation)
└── Timeline: 2-3 เดือน

Enterprise (500+ users):
├── NAC: Cisco ISE หรือ Aruba ClearPass
├── EAP: EAP-TLS (certificate-based) + PEAP fallback
├── Identity: AD + Enterprise CA + MDM
├── Features: Full profiling, posture, BYOD, TrustSec/SGT
├── Budget: หลายล้าน (license + hardware + consulting)
└── Timeline: 6-12 เดือน (phased rollout)

NAC และ 802.1X ไม่ใช่แค่ "nice-to-have" อีกต่อไป — ในยุค 2026 ที่ทุกองค์กรต้องเผชิญกับ BYOD, IoT explosion, และ compliance requirements ที่เข้มงวดขึ้น NAC คือ foundation ของ Zero Trust Architecture ที่ทำให้คุณรู้ว่าใครและอะไรเชื่อมต่อกับเครือข่ายของคุณ และสามารถควบคุมสิทธิ์ได้แบบ granular ตาม identity, device type และ security posture

เริ่มต้นจาก monitor mode, ค่อยๆ enforce, และอย่าลืมว่า NAC is a journey, not a destination — ต้องปรับปรุงและ tune policies อย่างต่อเนื่องตามความเปลี่ยนแปลงขององค์กร

.

.
.
.

จัดส่งรวดเร็วส่งด่วนทั่วประเทศ
รับประกันสินค้าเคลมง่าย มีใบรับประกัน
ผ่อนชำระได้บัตรเครดิต 0% สูงสุด 10 เดือน
สะสมแต้ม รับส่วนลดส่วนลดและคะแนนสะสม

© 2026 SiamLancard — จำหน่ายการ์ดแลน อุปกรณ์ Server และเครื่องพิมพ์ใบเสร็จ

SiamLancard
#ffffff
Free Forex EA — XM Signal · SiamCafe Blog · SiamLancard · Siam2R · iCafeFX
Partner Sites: iCafe Forex | SiamCafe | SiamLancard | Siam2R | XM Signal | iCafe Cloud
iCafeForex.com - สอนเทรด Forex | SiamCafe.net
Shopping cart
Partner Sites: iCafeForex | SiamCafe | Siam2R | XMSignal