Network Configuration Management: NETCONF, RESTCONF, gNMI และ Yang Models

Network Configuration Management: NETCONF, RESTCONF, gNMI และ Yang Models

Network Configuration Management: NETCONF, RESTCONF, gNMI และ Yang Models

Network Configuration Management กำลังเปลี่ยนจาก CLI-based (SSH + screen scraping) ไปสู่ model-driven programmability NETCONF ใช้ XML over SSH สำหรับ configuration management, RESTCONF ใช้ HTTP/JSON สำหรับ RESTful access, gNMI ใช้ gRPC สำหรับ streaming telemetry + config และ YANG Models เป็น data modeling language ที่กำหนดโครงสร้างของ configuration และ operational data

CLI + SSH เป็นวิธี configure network มากว่า 30 ปี แต่มี ปัญหาสำคัญ: output เป็น unstructured text (ต้อง parse ด้วย regex), ไม่มี transactional support (partial config = broken state), vendor-specific syntax, ไม่มี validation ก่อน apply Model-driven programmability แก้ทุกปัญหา: structured data (XML/JSON), transactions (commit/rollback), standardized models (YANG), validation built-in

CLI vs Model-Driven

Feature CLI (Traditional) Model-Driven (NETCONF/RESTCONF/gNMI)
Data Format Unstructured text Structured (XML, JSON, Protobuf)
Parsing Regex/TextFSM (fragile) Native parsing (structured data)
Transactions ไม่มี (line-by-line) Atomic commit/rollback
Validation ไม่มี (apply แล้วค่อยเห็น error) Validate ก่อน commit (candidate config)
Vendor Neutral ไม่ (vendor-specific syntax) YANG models (OpenConfig = vendor-neutral)
Automation Expect scripts, Netmiko Native API (ncclient, requests, gNMIc)
Idempotent ไม่ (repeated commands may cause issues) ใช่ (desired state = same result every time)

YANG Data Models

Feature รายละเอียด
คืออะไร Data modeling language (RFC 7950) ที่กำหนดโครงสร้างของ config + operational data
Structure Tree structure: modules → containers → lists → leaves
Types leaf (single value), leaf-list (array), container (group), list (keyed entries)
Constraints Type validation, mandatory, min/max elements, when/must conditions
OpenConfig Vendor-neutral YANG models (Google-led, multi-vendor consortium)
IETF Models Standard YANG models (ietf-interfaces, ietf-routing, ietf-acl)
Native Models Vendor-specific models (Cisco-IOS-XE, Juniper, Arista)
Tools pyang (validate/compile), YANG Explorer, YANG Suite

NETCONF

Feature รายละเอียด
Standard RFC 6241
Transport SSH (port 830)
Encoding XML (RPC-based)
Operations get, get-config, edit-config, copy-config, delete-config, lock, unlock, commit
Datastores running, candidate, startup
Candidate Config แก้ไขใน candidate → validate → commit ไป running (atomic)
Rollback Confirmed commit: auto-rollback ถ้าไม่ confirm ภายใน timeout
Subtree Filtering XPath หรือ subtree filter เพื่อ get เฉพาะ data ที่ต้องการ
Python Library ncclient

RESTCONF

Feature รายละเอียด
Standard RFC 8040
Transport HTTPS (port 443)
Encoding JSON or XML
HTTP Methods GET (read), POST (create), PUT (replace), PATCH (update), DELETE (remove)
URL Path YANG model path mapped to URL (e.g., /restconf/data/ietf-interfaces:interfaces)
Advantage Familiar HTTP/REST → easy for web developers, browser testable
Limitation No candidate datastore, no commit/rollback (applied immediately)
Python Library requests (standard HTTP library)

gNMI (gRPC Network Management Interface)

Feature รายละเอียด
Transport gRPC over HTTP/2 (TLS)
Encoding Protobuf (binary, efficient) or JSON
Operations Get, Set, Subscribe (streaming telemetry)
Streaming Telemetry Subscribe to data → device pushes updates (event-driven or periodic)
Subscribe Modes ONCE (one-time), POLL (on-demand), STREAM (continuous push)
Performance Best performance (binary protobuf + HTTP/2 multiplexing)
Advantage Streaming telemetry (push-based) replaces SNMP polling
Tools gNMIc, Telegraf (gNMI input), pygnmi

NETCONF vs RESTCONF vs gNMI

Feature NETCONF RESTCONF gNMI
Transport SSH HTTPS gRPC/HTTP2
Encoding XML JSON/XML Protobuf/JSON
Candidate Config Yes No Yes (vendor-dependent)
Commit/Rollback Yes No Vendor-dependent
Streaming Telemetry Limited (notifications) No Yes (primary use case)
Performance Good Good Best (binary + HTTP/2)
Ease of Use Complex (XML) Easy (REST + JSON) Moderate (gRPC setup)
Best For Full config management Simple CRUD operations Telemetry + config

Configuration Datastores

Datastore Purpose Support
Running Currently active configuration All
Candidate Staging area for changes (validate before commit) NETCONF (RFC 6241)
Startup Configuration loaded at boot NETCONF
Intended Desired configuration (NMDA – RFC 8342) NMDA-compliant devices
Operational Current operational state (read-only) NMDA-compliant devices

Best Practices

Practice รายละเอียด
Use YANG models Model-driven config แทน CLI (structured, validated, idempotent)
OpenConfig first ใช้ OpenConfig models สำหรับ multi-vendor (fallback to native)
Candidate + commit ใช้ candidate datastore → validate → commit (atomic changes)
Confirmed commit ใช้ confirmed commit → auto-rollback ถ้าไม่ confirm (safety net)
gNMI for telemetry ใช้ gNMI streaming แทน SNMP polling (real-time, efficient)
RESTCONF for simple ops ใช้ RESTCONF สำหรับ simple read/write (easy integration)
NETCONF for full config ใช้ NETCONF สำหรับ complex config management (transactions)

ทิ้งท้าย: Model-Driven = Future of Network Management

Configuration Management YANG: data modeling language (structure for config + operational data) NETCONF: SSH + XML, candidate config, commit/rollback (full config mgmt) RESTCONF: HTTPS + JSON, REST API (simple CRUD, easy integration) gNMI: gRPC + Protobuf, streaming telemetry (real-time push, best performance) OpenConfig: vendor-neutral YANG models (multi-vendor automation) Best practice: YANG models + candidate config + confirmed commit + gNMI telemetry

อ่านเพิ่มเติมเกี่ยวกับ Network Automation Python Netmiko NAPALM และ SDN OpenFlow Controllers ที่ siamlancard.com หรือจาก icafeforex.com และ siam2r.com

อ่านเพิ่มเติม: TradingView ใช้ฟรี | กลยุทธ์เทรดทอง

อ่านเพิ่มเติม: กราฟทอง TradingView | Panel SMC MT5

อ่านเพิ่มเติม: เทรด Forex | XM Signal EA

FAQ

Network Configuration Management: NETCONF, RESTCONF, gNMI และ Yang Models คืออะไร?

Network Configuration Management: NETCONF, RESTCONF, gNMI และ Yang Models เป็นหัวข้อสำคัญในวงการเทคโนโลยีที่ช่วยให้การทำงานมีประสิทธิภาพมากขึ้น ไม่ว่าจะเป็นด้าน IT, Network หรือ Server Management

ทำไมต้องเรียนรู้เรื่อง Network Configuration Management: NETCONF, RESTCONF, gNMI และ Yang Models?

เพราะ Network Configuration Management: NETCONF, RESTCONF, gNMI และ Yang Models เป็นทักษะที่ตลาดต้องการสูง และช่วยให้คุณแก้ปัญหาในงานจริงได้อย่างมืออาชีพ การเรียนรู้ตั้งแต่วันนี้จะเป็นประโยชน์ในระยะยาว

Network Configuration Management: NETCONF, RESTCONF, gNMI และ Yang Models เหมาะกับผู้เริ่มต้นไหม?

ได้แน่นอนครับ บทความนี้เขียนให้เข้าใจง่าย เหมาะทั้งผู้เริ่มต้นและผู้มีประสบการณ์ มี step-by-step guide พร้อมตัวอย่างให้ทำตามได้ทันที

Network Configuration Management: NETCONF, RESTCONF, gNMI และ Yang Models — ทำไมถึงสำคัญ?

Network Configuration Management: NETCONF, RESTCONF, gNMI และ Yang Models เป็นหัวข้อสำคัญในวงการ IT ที่ System Admin, Network Engineer และ DevOps Engineer ควรเข้าใจเป็นอย่างดี การรู้เรื่องนี้จะช่วยให้ทำงานได้มีประสิทธิภาพมากขึ้น แก้ปัญหาได้เร็วขึ้น และเป็นทักษะที่ตลาดแรงงานต้องการสูง

เริ่มต้นเรียนรู้ Network Configuration Management: NETCONF, RESTCONF, gNMI และ Yang Models

แนะนำ path การเรียนรู้:

  1. อ่านเอกสาร official — เริ่มจาก documentation ของเครื่องมือ/เทคโนโลยีนั้นๆ
  2. ทำ lab จริง — ตั้ง VM หรือ Docker container แล้วลองทำตาม tutorial
  3. ทำ project จริง — ใช้กับงานจริงหรือ side project เรียนรู้จากปัญหาที่เจอ
  4. อ่าน best practices — ศึกษาว่าคนอื่นใช้งานจริงยังไง มี pitfall อะไร
  5. เข้า community — Reddit, Stack Overflow, Thai IT groups เรียนรู้จากคนอื่น

เครื่องมือที่แนะนำสำหรับ Network Configuration Management: NETCONF, RESTCONF, gNMI และ Yang Models

เครื่องมือ ใช้สำหรับ ราคา
VS Code Code editor หลัก ฟรี
Docker Container + Lab environment ฟรี
Git/GitHub Version control ฟรี
VirtualBox/Proxmox Virtualization สำหรับ lab ฟรี

FAQ — Network Configuration Management: NETCONF, RESTCONF, gNMI และ Yang Models

Network Configuration Management: NETCONF, RESTCONF, gNMI และ Yang Models คืออะไร?

Network Configuration Management: NETCONF, RESTCONF, gNMI และ Yang Models เป็นเทคโนโลยี/ความรู้ด้าน IT ที่ช่วยให้การทำงานมีประสิทธิภาพมากขึ้น อ่านรายละเอียดทั้งหมดในบทความนี้

Network Configuration Management: NETCONF, RESTCONF, gNMI และ Yang Models เหมาะกับผู้เริ่มต้นไหม?

เหมาะครับ บทความนี้อธิบายตั้งแต่พื้นฐาน มี step-by-step guide พร้อมตัวอย่างให้ทำตาม

เรียนรู้ Network Configuration Management: NETCONF, RESTCONF, gNMI และ Yang Models ใช้เวลานานไหม?

พื้นฐานใช้เวลา 1-2 สัปดาห์ ขั้นกลาง 1-3 เดือน ขั้นสูงต้องใช้ประสบการณ์จริง 6 เดือน+

อ่านเพิ่มเติม: SiamLanCard.com | iCafeForex.com | Siam2R.com

XM Signal — EA Forex ฟรี

Best Practices สำหรับ Network Configuration Management: NETCONF, RESTCONF, gNMI และ Yang Models

Network Configuration Management: NETCONF, RESTCONF, gNMI และ Yang Models มี best practices ที่ผู้เชี่ยวชาญแนะนำ:

  • Documentation — จด document ทุกอย่างที่ทำ เพื่อให้คนอื่น (หรือตัวเอง 6 เดือนหลัง) เข้าใจ
  • Version Control — ใช้ Git สำหรับทุก config/code เก็บ history ย้อนกลับได้
  • Automation — automate task ที่ทำซ้ำๆ ด้วย script/Ansible/Terraform
  • Monitoring — ตั้ง monitoring + alerting ให้รู้ปัญหาก่อน user
  • Backup — กฎ 3-2-1 เสมอ 3 copies, 2 media, 1 offsite

ทรัพยากรเรียนรู้เพิ่มเติม

  • Official Documentation — แหล่งเรียนรู้ที่ดีที่สุด อ่าน docs ก่อนเสมอ
  • YouTube Tutorials — ดู video walkthrough เข้าใจเร็วกว่าอ่าน
  • GitHub Examples — ดู code ของคนอื่น เรียนรู้จาก real projects
  • Lab Practice — ตั้ง VM/Docker ฝึกจริง ไม่มีอะไรดีกว่าลงมือทำ

อ่านเพิ่มเติม: iCafeForex | XM Signal EA ฟรี | SiamLanCard | Siam2R

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

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

SiamLancard
Logo
Free Forex EA — XM Signal · SiamCafe Blog · SiamLancard · Siam2R · iCafeFX
iCafeForex.com - สอนเทรด Forex | SiamCafe.net
Shopping cart