[英]usage of yang model ietf-routing
我正在嘗試根據這些 yang 模塊添加配置數據:
https://github.com/mbj4668/pyang/blob/master/modules/ietf/ietf-routing.yang
https://github.com/mbj4668/pyang/blob/master/modules/ietf/ietf-ipv4-unicast-routing.yang
我收到錯誤sysrepocfg error: libyang: Unknown element "next-hop-list"
嘗試將"next-hop-list"
與以下數據一起使用時。
{
"ietf-routing:routing": {
"control-plane-protocols": {
"control-plane-protocol": [
{
"type": "static",
"name": "static-routing-protocol",
"static-routes": {
"ietf-ipv4-unicast-routing:ipv4": {
"route": [
{
"destination-prefix": "0.0.0.0/0",
"next-hop-list": {
"next-hop": [
{
"index": "1",
"next-hop-address": "192.0.2.2"
}
]
}
}
]
}
}
}
]
}
}
}
無法找出錯誤,有什么幫助嗎?
我可以對以下數據使用"simple-next-hop"
,效果很好。
{
"ietf-routing:routing": {
"control-plane-protocols": {
"control-plane-protocol": [
{
"type": "static",
"name": "static-routing-protocol",
"static-routes": {
"ietf-ipv4-unicast-routing:ipv4": {
"route": [
{
"destination-prefix": "0.0.0.0/0",
"next-hop": {
"next-hop-address": "192.0.2.2"
}
}
]
}
}
}
]
}
}
}
解決它。 'next-hop-list' 必須在 'next-hop' 內。
{
"ietf-routing:routing": {
"control-plane-protocols": {
"control-plane-protocol": [
{
"type": "static",
"name": "static-routing-protocol",
"static-routes": {
"ietf-ipv4-unicast-routing:ipv4": {
"route": [
{
"destination-prefix": "0.0.0.0/0",
"next-hop": {
"next-hop-list": {
"next-hop": [
{
"index": "1",
"next-hop-address": "192.0.2.2"
},
{
"index": "2",
"next-hop-address": "192.0.2.3"
}
]
}
}
}
]
}
}
}
]
}
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.