Techerest

SNMP สำหรับ Network Engineer: SNMPv2c, SNMPv3, MIB, OID และ Monitoring

การดูว่า Router หรือ Switch ยัง Online อยู่หรือไม่ด้วยคำสั่ง Ping เพียงอย่างเดียว ไม่เพียงพอสำหรับการดูแล Network ขนาดใหญ่ เพราะ Network Engineer ยังต้องทราบสถานะ Interface, Bandwidth, CPU, Memory, Error Counter และเหตุการณ์ผิดปกติของอุปกรณ์

SNMP หรือ Simple Network Management Protocol เป็น Protocol สำคัญสำหรับ Network Monitoring และ Management บทความนี้อธิบายตั้งแต่ SNMP Manager, Agent, MIB, OID, Polling, Trap, SNMPv2c และ SNMPv3 พร้อมตัวอย่าง Cisco Configuration, Security และ Troubleshooting สำหรับนำไปใช้ใน Enterprise Network

ภาค 1: พื้นฐาน SNMP

SNMP คืออะไร?

SNMP หรือ Simple Network Management Protocol เป็น Protocol ที่ใช้สำหรับ Monitoring และ Management อุปกรณ์บนเครือข่าย

ตัวอย่างอุปกรณ์ที่สามารถรองรับ SNMP ได้แก่:

  • Router
  • Switch
  • Firewall
  • Wireless Controller
  • Access Point
  • Server
  • UPS
  • Printer
  • Storage
  • อุปกรณ์ Network Infrastructure อื่น ๆ

ภาพรวม:

Network Monitoring System
          |
          | SNMP
          |
    +-----+-----+
    |     |     |
    v     v     v
 Router Switch Firewall

ทำไม Network Engineer ต้องรู้จัก SNMP?

สมมติมี Switch 100 ตัว ถ้าต้อง SSH เข้าไปตรวจทุกอุปกรณ์ด้วย:

show interfaces

show processes cpu

show memory

show environment

จะใช้เวลามากและไม่เหมาะกับ Continuous Monitoring

SNMP ช่วยให้ Monitoring System สามารถ:

Poll Device
    |
    +---- Interface Status
    |
    +---- Traffic Counters
    |
    +---- CPU
    |
    +---- Memory
    |
    +---- Errors
    |
    +---- Device Information

แล้วนำข้อมูลไปสร้าง Dashboard, Graph, Alert และ Historical Trend ได้

ภาค 2: SNMP Architecture

SNMP Architecture มีอะไรบ้าง?

องค์ประกอบหลักประกอบด้วย:

+---------------------------+
| SNMP Manager / NMS        |
| Monitoring System         |
+-------------+-------------+
              |
              | SNMP
              |
       +------+------+
       |             |
       v             v
+-------------+ +-------------+
| SNMP Agent  | | SNMP Agent  |
| Router      | | Switch      |
+-------------+ +-------------+
       |             |
       v             v
      MIB           MIB
       |             |
       v             v
      OID           OID

SNMP Manager คืออะไร?

SNMP Manager คือระบบที่ใช้ Query, รวบรวม และวิเคราะห์ข้อมูล จาก SNMP Agent

มักเป็นส่วนหนึ่งของ:

NMS
=
Network Management System

ตัวอย่าง Workflow:

NMS
 |
 | SNMP Request
 v
Router
 |
 | SNMP Response
 v
NMS
 |
 v
Database
 |
 v
Dashboard / Alert

SNMP Agent คืออะไร?

SNMP Agent ทำงานอยู่บน Managed Device และให้ข้อมูลแก่ SNMP Manager ตามสิทธิ์และ Configuration ที่กำหนด

Router
 |
 +---- SNMP Agent
          |
          +---- Interface Data
          +---- CPU Data
          +---- Memory Data
          +---- System Data

ภาค 3: MIB และ OID

MIB คืออะไร?

MIB หรือ Management Information Base เป็นโครงสร้างข้อมูลที่ใช้อธิบาย Managed Objects ซึ่งสามารถเข้าถึง ผ่าน SNMP

มองอย่างง่าย:

MIB
 |
 +---- System
 |
 +---- Interfaces
 |
 +---- IP
 |
 +---- Routing
 |
 +---- Vendor Specific Objects

MIB ช่วยให้ Monitoring Software เข้าใจว่าข้อมูลแต่ละ Object หมายถึงอะไร

OID คืออะไร?

OID หรือ Object Identifier เป็น Identifier ของ Object ใน MIB Tree

ตัวอย่างโครงสร้าง:

iso
 |
 org
 |
 dod
 |
 internet
 |
 mgmt
 |
 mib-2
 |
 interfaces
 |
 ...

OID สามารถแสดงเป็นตัวเลข ตามโครงสร้าง Hierarchical

ตัวอย่าง:

1.3.6.1.2.1...

แต่ Network Engineer ไม่จำเป็นต้องจำ OID ทุกตัว เพราะ Monitoring Platform และ MIB Browser สามารถช่วยแปลงชื่อ Object กับ Numeric OID ได้

MIB กับ OID ต่างกันอย่างไร?

MIB
=
โครงสร้างและคำอธิบายของ
Management Objects


OID
=
Identifier ของ Object
ภายในโครงสร้างนั้น

ภาค 4: SNMP Operations

SNMP GET คืออะไร?

Manager ใช้ GET เพื่อขอค่าของ Object จาก Agent

NMS
 |
 | GET
 v
Router
 |
 | Response
 v
NMS

GETNEXT คืออะไร?

GETNEXT ใช้ขอ Object ถัดไป ตามลำดับของ MIB Tree

OID A
 |
 v
GETNEXT
 |
 v
OID B

GETBULK คืออะไร?

GETBULK ช่วยดึงข้อมูลหลาย Object อย่างมีประสิทธิภาพมากขึ้น และเป็นความสามารถที่เกี่ยวข้องกับ SNMPv2 เป็นต้นมา

NMS
 |
 | GETBULK
 v
Device
 |
 +---- OID 1
 +---- OID 2
 +---- OID 3
 +---- OID 4

SNMP SET คืออะไร?

SET สามารถใช้เปลี่ยนค่าของ Object ที่รองรับการเขียน

NMS
 |
 | SET
 v
Managed Device
 |
 v
Configuration / State Change
SNMP Write Access ควรถูกควบคุมอย่างเข้มงวด สำหรับระบบ Monitoring จำนวนมาก Read-Only Access อาจเพียงพอ หากไม่มี Requirement ด้าน Remote Management

ภาค 5: SNMP Polling

Polling คืออะไร?

Polling คือการที่ Monitoring System Query Device เป็นระยะ

ตัวอย่าง:

00:00  Poll

00:05  Poll

00:10  Poll

00:15  Poll

Monitoring System สามารถนำค่าที่ได้ ไปสร้าง Historical Graph

Interface Traffic

Mbps
 ^
 |           /\
 |       /\ /  \
 |   /\ /  V    \
 |__/  V         \____
 +--------------------> Time

Polling ใช้ดูอะไรได้บ้าง?

  • Interface Up/Down
  • Bandwidth Utilization
  • Input/Output Counters
  • Interface Errors
  • CPU Utilization
  • Memory Utilization
  • Temperature
  • Device Uptime
  • Hardware Status

Object ที่รองรับจริง ขึ้นอยู่กับ Device, MIB และ Vendor

ภาค 6: SNMP Trap และ Inform

SNMP Trap คืออะไร?

SNMP Trap เป็น Notification ที่ Agent ส่งไปยัง Manager เมื่อเกิด Event โดยไม่ต้องรอ Polling รอบถัดไป

Interface Down
      |
      v
SNMP Agent
      |
      | Trap
      v
NMS
      |
      v
Alert

Polling กับ Trap ต่างกันอย่างไร?

หัวข้อ Polling Trap
ผู้เริ่ม Manager Agent
รูปแบบ Query เป็นระยะ ส่งเมื่อเกิด Event
เหมาะกับ Metrics / Status Event Notification
ต้องรอ Polling รอบถัดไป อาจต้องรอ ไม่จำเป็น

SNMP Inform คืออะไร?

Inform เป็น Notification ที่มีกลไกยืนยันการรับ แตกต่างจาก Trap แบบทั่วไป

Agent
 |
 | Inform
 v
Manager
 |
 | Acknowledgment
 v
Agent

จึงมีความแตกต่างด้าน Reliability และ Overhead เมื่อเทียบกับ Trap

ภาค 7: SNMP Ports

SNMP ใช้ Port อะไร?

โดยทั่วไป:

UDP 161
=
SNMP Query / Response


UDP 162
=
SNMP Trap / Notification

ภาพรวม:

NMS
 |
 | UDP 161
 v
Device


Device
 |
 | UDP 162
 v
NMS / Trap Receiver
Firewall ต้องพิจารณาทิศทางของ Traffic ด้วย Polling และ Trap มี Initiator ต่างกัน จึงไม่ควรเปิด Port โดยไม่วิเคราะห์ Source และ Destination

ภาค 8: SNMPv1, SNMPv2c และ SNMPv3

SNMP มี Version อะไรบ้าง?

Version ลักษณะสำคัญ Security
SNMPv1 Version รุ่นแรก จำกัด
SNMPv2c ปรับปรุง Operation และ Performance Community-Based
SNMPv3 เพิ่ม Security Model ที่แข็งแรงกว่า Authentication / Privacy ตาม Security Level

SNMPv2c ยังใช้ Community String

ตัวอย่าง:

NMS
 |
 | Community String
 v
Router

Community String ไม่ควรถูกมองว่าเทียบเท่า Secure Authentication แบบสมัยใหม่

ภาค 9: SNMP Community String

Community String คืออะไร?

ใน SNMPv1 และ SNMPv2c Community String ทำหน้าที่คล้าย Shared Secret สำหรับการเข้าถึง SNMP

ตัวอย่าง Cisco:

snmp-server community MONITORING RO

RO หมายถึง Read-Only

Read-Write Community

สามารถมีสิทธิ์ Read-Write:

snmp-server community MANAGEMENT RW
ไม่ควรเปิด SNMP Read-Write โดยไม่มีความจำเป็น เพราะเพิ่มความสามารถในการเปลี่ยนค่าบนอุปกรณ์ หาก Credential ถูกนำไปใช้โดยไม่ได้รับอนุญาต

จำกัด SNMP ด้วย ACL

บน Cisco Platform ที่รองรับ สามารถผูก Community กับ ACL เพื่อจำกัด Source ที่สามารถ Query SNMP

ตัวอย่าง:

ip access-list standard SNMP-MANAGERS
 permit 10.10.10.50

snmp-server community MONITORING RO SNMP-MANAGERS

แนวคิด:

Authorized NMS
10.10.10.50
      |
      | Allowed
      v
    Router


Other Hosts
      |
      X
    Router

ภาค 10: SNMPv3 Security

ทำไม SNMPv3 จึงสำคัญ?

SNMPv3 เพิ่ม Security Capability ที่เหนือกว่า Community-Based Model ของ SNMPv1/v2c

องค์ประกอบสำคัญได้แก่:

  • Username
  • Authentication
  • Integrity Protection
  • Privacy / Encryption
  • Access Control

SNMPv3 Security Levels

Security Level Authentication Encryption
noAuthNoPriv ไม่มี ไม่มี
authNoPriv มี ไม่มี
authPriv มี มี

สำหรับ Production Environment ที่ต้องการ Security สูง มักพิจารณา authPriv เมื่อ Platform และ Monitoring System รองรับร่วมกัน

ตัวอย่างแนวคิด SNMPv3 บน Cisco

ตัวอย่าง Configuration เพื่อแสดงโครงสร้าง:

snmp-server group NMS-GROUP v3 priv

snmp-server user NMS-USER NMS-GROUP v3 auth sha AUTH_PASSWORD priv aes 128 PRIV_PASSWORD
SNMPv3 Algorithm และ Syntax แตกต่างกันตาม Cisco Platform และ IOS/IOS XE Release บางรุ่นรองรับ Algorithm ใหม่กว่าตัวอย่างนี้ ควรเลือก Algorithm ที่แข็งแรงที่สุดที่ทั้ง Device และ NMS รองรับ และตรวจ Cisco Documentation ก่อนใช้จริง

ภาค 11: Cisco SNMP Monitoring Lab

Topology

                Monitoring Server
                   10.10.10.50
                        |
                        |
                      SW1
                     /   \
                    /     \
                   R1      R2
                   |
                Loopback0
                10.255.0.1

Lab Objective

ต้องการให้ Monitoring Server:

10.10.10.50
     |
     +---- Poll R1
     |
     +---- Receive Trap
     |
     +---- Monitor Interface
     |
     +---- Monitor Device Status

Step 1 — ตรวจ IP Connectivity

บน R1:

ping 10.10.10.50

ตรวจ Routing:

show ip route 10.10.10.50

Step 2 — สร้าง ACL สำหรับ Monitoring Server

ip access-list standard SNMP-MANAGERS
 permit 10.10.10.50

Step 3 — Configure SNMPv2c สำหรับ Lab

snmp-server community LAB-MONITOR RO SNMP-MANAGERS
SNMPv2c ใช้ในส่วนนี้เพื่ออธิบายพื้นฐานและ Lab Production Network ควรประเมิน SNMPv3 ตาม Security Requirement และ Platform Support

Step 4 — กำหนด Device Information

snmp-server location Bangkok-DC

snmp-server contact Network-Team

ข้อมูลเหล่านี้ช่วยให้ NMS แสดง Metadata เกี่ยวกับ Device

Step 5 — Configure Trap Destination

ตัวอย่าง SNMPv2c:

snmp-server host 10.10.10.50 version 2c LAB-MONITOR

Step 6 — Enable Trap ตาม Requirement

ตัวอย่าง:

snmp-server enable traps
อย่า Enable ทุก Trap บน Production โดยไม่ประเมินก่อน บาง Platform มี Trap จำนวนมาก ซึ่งอาจสร้าง Notification Volume สูง ควรเลือก Trap Category ตาม Monitoring Requirement

Step 7 — ทดสอบ Monitoring

จาก NMS ตรวจว่า สามารถ Query Device และอ่านข้อมูลพื้นฐานได้

NMS
 |
 | SNMP GET
 v
R1
 |
 | Response
 v
NMS

Step 8 — ทดสอบ Trap ใน Lab

ใช้ Test Interface ที่ไม่กระทบ Production

interface GigabitEthernet0/2
 shutdown

จากนั้นตรวจ NMS:

Interface Down
      |
      v
SNMP Agent
      |
      v
Trap
      |
      v
Monitoring Server

หลังทดสอบ:

interface GigabitEthernet0/2
 no shutdown

ภาค 12: SNMP Verification

ตรวจ SNMP Configuration

show running-config | include snmp

ตรวจ SNMP Information

บน Cisco Platform ที่รองรับ สามารถใช้:

show snmp

ตรวจ SNMP User

สำหรับ SNMPv3:

show snmp user

ตรวจ SNMP Group

show snmp group

ตรวจ ACL

show access-lists SNMP-MANAGERS

ตรวจ Route ไป NMS

show ip route 10.10.10.50

ตรวจ Interface

show ip interface brief
คำสั่ง Verification บางรายการ อาจแตกต่างกันตาม Platform และ Software Release

ภาค 13: SNMP Troubleshooting

SNMP Troubleshooting Workflow

Device Reachable?
      |
      v
Routing Correct?
      |
      v
SNMP Enabled?
      |
      v
Version Matches?
      |
      v
Credential Correct?
      |
      v
ACL Allows NMS?
      |
      v
UDP 161 Allowed?
      |
      v
OID Supported?
      |
      v
Response Received?

ปัญหา 1 — Ping Device ได้ แต่ SNMP Poll ไม่ได้

Ping ใช้ ICMP ขณะที่ SNMP Query โดยทั่วไปใช้ UDP/161

Ping
=
ICMP


SNMP Polling
=
UDP 161

ตรวจ:

Firewall

ACL

SNMP Version

Community / User

SNMP Configuration

ปัญหา 2 — SNMP Timeout

ตรวจ:

IP Address correct?

Routing correct?

UDP 161 allowed?

Community correct?

SNMPv3 credentials correct?

Source NMS allowed?

Agent running?

ปัญหา 3 — SNMPv2c Poll ไม่ได้หลังเพิ่ม ACL

ตรวจ ACL:

show access-lists SNMP-MANAGERS

ตรวจว่า Source IP ของ Monitoring Server ตรงกับที่ Permit หรือไม่

ปัญหา 4 — Polling ใช้ได้ แต่ Trap ไม่เข้า

ต้องแยก Traffic Direction:

Polling

NMS
 |
 | UDP 161
 v
Device


Trap

Device
 |
 | UDP 162
 v
NMS

ตรวจ:

Trap Destination

Trap Enabled?

UDP 162 allowed?

Correct Source IP?

NMS Trap Receiver running?

ปัญหา 5 — NMS อ่านบาง OID ไม่ได้

ตรวจ:

OID exists?

MIB supported?

Platform supports object?

Software version?

Access view?

Correct SNMP context?

ปัญหา 6 — SNMPv3 Authentication Failure

ตรวจ:

Username

Group

Security Level

Authentication Protocol

Authentication Credential

Privacy Protocol

Privacy Credential

ค่าระหว่าง Device และ NMS ต้องตรงกัน

ปัญหา 7 — Monitoring Graph มีช่องว่าง

ตรวจ:

Packet Loss

Device CPU

NMS Load

Polling Interval

SNMP Timeout

Network Latency

Routing Changes

Graph Gap ไม่ได้หมายความว่า Interface ไม่มี Traffic เสมอไป แต่อาจหมายถึง NMS ไม่สามารถ Poll ค่าได้ในช่วงนั้น

ภาค 14: SNMP กับ Syslog ต่างกันอย่างไร?

SNMP และ Syslog ทำหน้าที่ต่างกัน

หัวข้อ SNMP Syslog
เป้าหมายหลัก Monitoring / Management Event Logging
Polling รองรับ ไม่ใช่หน้าที่หลัก
Event Notification Trap / Inform Log Message
Metrics เหมาะ ไม่ใช่หน้าที่หลัก
Historical Event ขึ้นกับ NMS เหมาะกับ Logging System

ควรใช้ SNMP หรือ Syslog?

คำตอบคือ ใช้ร่วมกัน

SNMP
 |
 +---- CPU
 +---- Memory
 +---- Interface Traffic
 +---- Counters
 +---- Device Status


Syslog
 |
 +---- Interface Down
 +---- Routing Event
 +---- Authentication Event
 +---- Configuration Event
 +---- Security Event

ตัวอย่าง Incident

สมมติ Interface มี Error เพิ่มขึ้น:

SNMP Polling
     |
     v
CRC Errors Increasing
     |
     v
Monitoring Alert

จากนั้น Syslog แสดง:

%LINK-3-UPDOWN:
Interface Gi1/0/48,
changed state to down

Network Engineer สามารถใช้ SNMP Trend และ Syslog Event ร่วมกันในการวิเคราะห์

ภาค 15: Network Monitoring Architecture

DNS + NTP + Syslog + SNMP

Infrastructure Services ที่เรียนมาก่อนหน้านี้ สามารถเชื่อมเข้าด้วยกัน:

                 DNS
                  |
                  v
            Name Resolution

                 NTP
                  |
                  v
             Correct Time

Network Devices
     |
     +----------+----------+
     |                     |
     v                     v
   SNMP                  Syslog
     |                     |
     v                     v
 Metrics / Status        Events
     |                     |
     +----------+----------+
                |
                v
        Monitoring Platform
                |
        +-------+-------+
        |               |
        v               v
    Dashboard          Alert

Monitoring System ควรดูอะไร?

อย่างน้อยควรพิจารณา:

Availability

Interface Status

Bandwidth

Errors

CPU

Memory

Temperature

Routing Events

Authentication Events

Configuration Events

Time Synchronization

Polling Interval ควรเท่าไร?

ไม่มีค่าตายตัวสำหรับทุก Network

ถ้า Poll ถี่มาก:

More Data
   +
Higher Load
   +
More Storage

ถ้า Poll ห่างมาก:

Lower Load
   +
Less Granularity
   +
May Miss Short Events

จึงควรกำหนดตาม Network Size, Device Capability, Metric Importance และ Monitoring Requirement

ภาค 16: SNMP Security

ทำไม SNMP ต้องได้รับการป้องกัน?

SNMP สามารถเปิดเผยข้อมูล เกี่ยวกับ Infrastructure จำนวนมาก

เช่น:

Hostname

Interface

IP Address

Device Model

Software Information

Traffic Counters

Network Status

ข้อมูลเหล่านี้มีประโยชน์ ต่อ Network Administrator และอาจมีประโยชน์ต่อผู้โจมตีเช่นกัน

หลีกเลี่ยง Community String ที่คาดเดาง่าย

ตัวอย่างที่ไม่ควรใช้:

public

private

cisco

monitor

โดยเฉพาะถ้า SNMP สามารถเข้าถึงได้จาก Network ที่ไม่จำเป็น

จำกัด Source ของ SNMP

Management Server
       |
       | Allowed
       v
    Network Device


User VLAN
       |
       X
    SNMP Access

ใช้ Management Network

Enterprise Design สามารถแยก Management Traffic:

Management Network
       |
       +---- SSH
       |
       +---- SNMP
       |
       +---- Syslog
       |
       +---- NTP
       |
       +---- AAA

ช่วยลด Exposure ของ Management Plane

พิจารณา SNMPv3

สำหรับ Production Environment ควรพิจารณา SNMPv3 โดยเฉพาะเมื่อข้อมูล Monitoring เดินทางผ่าน Network ที่ต้องการ Security สูง

ภาค 17: SNMP Best Practices

1. ใช้ SNMPv3 เมื่อเหมาะสม

เลือก Security Level และ Algorithm ที่เหมาะกับ Platform และ Monitoring System

2. จำกัด SNMP ด้วย ACL

อนุญาตเฉพาะ Monitoring Server ที่ต้องใช้งานจริง

3. ใช้ Read-Only เมื่อไม่ต้องการ Write

Monitoring
=
Read Only


Configuration Change
=
Separate Management Process

4. หลีกเลี่ยง Default Community

ถ้ายังต้องใช้ SNMPv2c ควรใช้ Community String ที่ไม่ใช่ค่า Default และควบคุม Source ด้วย ACL

5. Monitor NMS ด้วย

Monitoring Server เป็น Infrastructure สำคัญ และต้องถูก Monitor เช่นกัน

NMS Failure
     |
     v
No Polling
     |
     v
No Data
     |
     v
Blind Spot

6. ใช้ Polling และ Trap ร่วมกัน

Polling
=
Regular State


Trap
=
Event Notification

7. ใช้ Syslog ร่วมกับ SNMP

SNMP ให้ Metrics ขณะที่ Syslog ให้ Event Context

8. Synchronize เวลาด้วย NTP

ช่วยให้ SNMP Alert, Trap และ Syslog สามารถเปรียบเทียบ Timeline ได้ง่ายขึ้น

9. เก็บ Historical Data

Historical Monitoring ช่วยวิเคราะห์ Trend:

CPU increasing?

Bandwidth growing?

Memory usage rising?

Interface errors increasing?

10. สร้าง Baseline

Network Engineer ควรรู้ค่าปกติของ Network ก่อนที่จะบอกได้ว่า ค่าใดผิดปกติ

Normal Baseline
      |
      v
Current Metrics
      |
      v
Compare
      |
      +---- Normal
      |
      +---- Abnormal
               |
               v
             Alert

ภาค 18: ตัวอย่างวิเคราะห์ Network Problem ด้วย SNMP และ Syslog

Scenario: ผู้ใช้แจ้งว่า Network ช้าเป็นช่วง ๆ

Ping ปัจจุบันดูปกติ และ Interface ยัง Up

SNMP Historical Graph แสดง:

09:00   25%

10:00   40%

11:00   72%

12:00   96%

13:00   98%

14:00   45%

พบว่า WAN Interface มี Utilization สูงมาก ช่วง 12:00–13:00

SNMP Counter ยังแสดง:

Output Queue Drops
       |
       v
Increasing

ขณะที่ Syslog ไม่มี Interface Down

จึงสามารถตั้งสมมติฐานว่า:

Interface
=
UP


Physical Link
=
UP


Bandwidth Utilization
=
Very High


Queue Drops
=
Increasing


Possible Cause
=
Congestion

นี่แสดงให้เห็นว่า Ping เพียงอย่างเดียวไม่เพียงพอสำหรับ Network Monitoring

ภาค 19: คำถามที่พบบ่อย

SNMP ย่อมาจากอะไร?

Simple Network Management Protocol

SNMP ใช้ทำอะไร?

ใช้ Monitoring และ Management ข้อมูลของ Network Device ผ่าน SNMP Agent และ MIB Objects

SNMP ใช้ Port อะไร?

โดยทั่วไป:

UDP 161
=
Query / Response


UDP 162
=
Trap / Notification

MIB คืออะไร?

MIB คือโครงสร้างและคำอธิบาย ของ Management Objects ที่ SNMP ใช้

OID คืออะไร?

OID คือ Identifier ของ Object ใน MIB Tree

SNMP Polling กับ Trap ต่างกันอย่างไร?

Polling เริ่มจาก Manager และทำเป็นระยะ ขณะที่ Trap เริ่มจาก Agent เมื่อเกิด Event

Trap กับ Inform เหมือนกันหรือไม่?

ไม่ทั้งหมด Inform มีกลไก Acknowledgment ขณะที่ Trap ทั่วไป ไม่ได้ใช้รูปแบบการยืนยันเดียวกัน

SNMPv2c ปลอดภัยหรือไม่?

SNMPv2c ใช้ Community-Based Access และไม่มี Security Capability ระดับเดียวกับ SNMPv3 จึงต้องควบคุมด้วย ACL, Management Network และ Security Policy ที่เหมาะสม

SNMPv3 ดีกว่า SNMPv2c หรือไม่?

ในด้าน Security SNMPv3 มีความสามารถ ด้าน Authentication และ Privacy ที่เหนือกว่า SNMPv2c เมื่อ Configure Security Level อย่างเหมาะสม

SNMP กับ Syslog ควรเลือกอะไร?

ไม่จำเป็นต้องเลือกเพียงอย่างเดียว เพราะทั้งสองทำหน้าที่เสริมกัน

SNMP
=
Metrics / Status


Syslog
=
Events / Logs

SNMP แทน Network Telemetry ได้หรือไม่?

SNMP ยังมีบทบาทสำคัญ ใน Network Monitoring แต่ Network สมัยใหม่ อาจใช้ Streaming Telemetry และ API ร่วมด้วย ตาม Platform และ Architecture

บทสรุป

SNMP เป็น Protocol พื้นฐานสำหรับ Network Monitoring และ Management ช่วยให้ Monitoring System สามารถรวบรวมข้อมูลจาก Router, Switch, Firewall และ Infrastructure Device ได้โดยไม่ต้อง Login เข้าไปตรวจทีละเครื่อง

องค์ประกอบสำคัญ:

SNMP Manager
      |
      v
SNMP Agent
      |
      v
MIB
      |
      v
OID

รูปแบบการทำงานหลัก:

Polling
 |
 v
GET / GETNEXT / GETBULK
 |
 v
Metrics


Trap / Inform
 |
 v
Event Notification

Port ที่ควรรู้:

UDP 161
=
SNMP Query / Response


UDP 162
=
SNMP Trap / Notification

สำหรับ Production Network ควรให้ความสำคัญกับ SNMPv3, ACL, Management Network, Read-Only Access และ Monitoring Security

เมื่อรวม Infrastructure Services ที่เรียนมาทั้งหมด:

DNS
 |
 v
Name Resolution


NTP
 |
 v
Time Synchronization


Syslog
 |
 v
Event Logging


SNMP
 |
 v
Metrics / Monitoring


        |
        v

Network Visibility

ขั้นต่อไปคือการควบคุมว่า ใครสามารถ Login เข้า Router และ Switch ได้ และแต่ละคนได้รับสิทธิ์อะไร

จึงเข้าสู่หัวข้อ AAA, RADIUS และ TACACS+ ซึ่งเป็นพื้นฐานสำคัญของ Network Access Control และ Device Administration

บทความถัดไป: AAA บน Cisco: Authentication, Authorization, Accounting, RADIUS และ TACACS+ สำหรับ Network Engineer

Share this
Facebook Share X
TECHEREST COMMUNITY

Share your thoughts here

Join the conversation and share your perspective on this article.

Comments will load when you reach this section.