我正在尝试根据这些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
当我试图用下面的数据使用"next-hop-list"时,我得到了错误的sysrepocfg error: libyang: Unknown element "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"
}
}
]
}
}
}
]
}
}
}发布于 2020-12-18 20:09:57
修好了!“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"
}
]
}
}
}
]
}
}
}
]
}
}
}https://stackoverflow.com/questions/65344429
复制相似问题