Package Information
Downloads: 51 weekly / 101 monthly
Latest Version: 0.4.1
Author: hb.jhang
Documentation
n8n-nodes-juniper-netconf

這是一個用於 n8n 的社群節點套件,提供與 Juniper 網路設備透過 NETCONF 協定進行互動的功能。
安裝
請遵循 n8n 社群節點安裝指南。
套件名稱
n8n-nodes-juniper-netconf
操作
此節點支援以下操作:
配置管理
- Read Config (All): 讀取完整的設備配置
- Read Config (Path): 讀取特定路徑的配置(支援 Subtree 和 XPath 過濾)
- Check Uncommitted Changes: 檢查尚未提交的配置變更
- Commit Configuration: 提交配置變更到設備 ✨ 新功能
介面管理
- Get Interface Information: 獲取介面資訊
- Get Interface Operations: 獲取介面操作狀態
- Set Interface Rate Limit: 設定介面速率限制
- Remove Interface Rate Limit: 移除介面速率限制
協定狀態查詢
- Get Protocol Status: 獲取協定狀態,支援:
- BGP (Border Gateway Protocol)
- OSPF (Open Shortest Path First)
- OSPFv3 (OSPF for IPv6)
- LDP (Label Distribution Protocol)
- MPLS (Multiprotocol Label Switching)
- L2Circuit
- LACP (Link Aggregation Control Protocol)
- Routing Table
策略與防火牆
- Get Firewall Policers: 獲取防火牆 Policer 配置
- Set Policy Options Prefix List: 設定策略選項前綴列表
認證
此節點使用 Juniper Netconf API 認證。您需要提供:
- Host: Juniper 設備的 IP 位址或主機名稱
- Port: NETCONF over SSH 連接埠(預設 830)
- Username: SSH 使用者名稱
- Password 或 Private Key: 驗證方式(二選一)
- Host Key Verification: 是否驗證 SSH 主機金鑰
- Connection Timeout: 連線超時時間(毫秒)
相容性
- 最低 n8n 版本: 1.0
- 測試相容的 n8n 版本: 1.20+
- 支援的 Juniper 設備系列:
- MX Series (路由器)
- EX Series (交換器)
- QFX Series (資料中心交換器)
- 其他支援 NETCONF 的 Juniper 設備
使用說明
基本工作流程
1. 讀取設備配置
節點: Juniper Netconf
操作: Read Config (All)
2. 查詢 BGP 狀態
節點: Juniper Netconf
操作: Get Protocol Status
協定: BGP
查詢類型: Summary
3. 設定介面速率限制並提交 ✨
工作流程:
1. Juniper Netconf → Set Interface Rate Limit
- Interface: ge-1/2/7
- Policer: li-limit100M
- Auto Commit: false
2. Juniper Netconf → Check Uncommitted Changes
- 檢查待提交的變更
3. Juniper Netconf → Commit Configuration
- Check Only: true (先驗證)
4. Juniper Netconf → Commit Configuration
- Commit Confirmed: true
- Confirm Timeout: 10
- 安全提交配置
新功能:Commit Configuration ✨
版本 0.5.0 新增了完整的配置提交功能,支援:
基本 Commit
直接提交配置變更到設備。
Commit Check
只驗證配置的正確性,不實際提交,適合在正式提交前檢查語法錯誤。
Commit Confirmed
安全提交機制,在指定時間內沒有確認會自動回滾,適合:
- 變更可能影響網路連線的配置
- 遠端設備的配置變更
- 重要的生產環境變更
Commit with Comment
為配置變更添加註解,便於日後追蹤和審計。
Commit Synchronize
在 HA 雙路由引擎環境中,同步配置到所有路由引擎。
詳細文檔
資源
版本歷史
0.5.0 (2025-10-25) ✨
- 新增: Commit Configuration 操作
- 支援 commit、commit check、commit confirmed
- 支援 commit comment、commit synchronize
- 可自訂 commit timeout
- 改進: 配置操作流程,支援手動控制提交時機
0.4.0
- 新增 Check Uncommitted Changes 操作
- 新增 Set/Remove Interface Rate Limit 操作
- 新增 Set Policy Options Prefix List 操作
- 支援多種協定狀態查詢
0.3.0
- 新增 Get Protocol Status 操作
- 支援 BGP、OSPF、OSPF3、LDP、MPLS 等協定
0.2.0
- 新增 Get Interface Information 和 Operations
- 改進 XML 解析功能
0.1.0
- 初始版本
- 基本的配置讀取功能
開發
本地測試
# 安裝相依套件
npm install
# 編譯
npm run build
# 連結到 n8n
npm link
cd ~/.n8n/custom
npm link n8n-nodes-juniper-netconf
# 啟動 n8n
n8n start
程式碼檢查
npm run lint
npm run lintfix
授權
作者
hb.jhang
- Email: hb.jhang@imcloud.tw
- Website: https://telecom.tw
支援
如有問題或建議,請在 GitHub 上開啟 issue。
使用這個節點,您可以輕鬆地自動化 Juniper 網路設備的配置管理和監控任務,將網路運維整合到您的 n8n 工作流程中!