
我運行一個 Ubiquity Edge 路由器,它本身是基於維亞塔(沒關係,只是以防萬一有人知道該產品)。
設定檔看起來像這樣
(...)
service {
dhcp-server {
disabled false
global-parameters "option rfc3118-auth code 90 = string;"
global-parameters "option SIP code 120 = string;"
global-parameters "option Vendor-specific code 125 = string;"
hostfile-update disable
shared-network-name LAN {
authoritative disable
subnet 192.168.10.0/24 {
default-router 192.168.10.1
dns-server 192.168.10.1
domain-name example.com
lease 86400
ntp-server 192.168.10.1
start 192.168.10.50 {
stop 192.168.10.254
}
static-mapping domotique {
ip-address 192.168.10.5
mac-address 26:e9:0c:53:40:41
}
(...)
有人知道這是否是眾所周知的文件/內容格式標準嗎?
它看起來像是 JSON 和 YAML 之間的連接,我很確定我已經在其他地方看到過它。
答案1
我發現了這裡維亞塔使用的異或異逆反應過去的路由協定(至少在過去...),所以這可能是這個 config 設定檔的起源。它用XorpConfigParserPerl 模組。但我沒能找到這種格式的名稱。
維基百科文章關於 XORP 配置格式
Juniper 在 JUNOS 中使用了非常相似的設定格式,他們只是稱之為 cli 設定格式。現在他們也支援 JSON。