[FROG] Using Northbound gPRC to configure BGP
xingyeping at 163.com
xingyeping at 163.com
Thu Jun 3 01:42:30 UTC 2021
Hi All.
I'm trying to configure BGP with Northbound gPRC. I'm using a Golang client to send Json format configuration to BGPD and now I can send
some configuration to BGPD,the question is I can't configure the "afi-safis"。The configuration is underneath:
{
"frr-routing:routing": {
"control-plane-protocols": {
"control-plane-protocol": [{
"type": "frr-bgp:bgp",
"name": "bgp",
"vrf": "default",
"frr-bgp:bgp": {
"global": {
"local-as": 100,
"router-id": "2.2.2.2",
"afi-safis": {
"afi-safi": [{
"afi-safi-name": "frr-routing:ipv4-unicast",
"frr-routing:ipv4-unicast": {
"network-config": [{
"prefix": "192.168.155.0/24"
}, {
"prefix": "192.168.166.0/16"
}]
}
}]
}
},
"neighbors": {
"neighbor": [{
"remote-address": "4.4.4.4",
"neighbor-remote-as": {
"remote-as-type": "as-specified",
"remote-as": 100
}
}]
}
}
}]
}
}
}
The red part can't deliver to BGPD,and the log is:
2021/06/02 08:11:24 BGP: [SWK28-M149C] northbound callback: event [prepare] op [modify] xpath [/frr-routing:routing/control-plane-protocols/control-plane-protocol[type='frr-bgp:bgp'][name='bgp'][vrf='default']/frr-bgp:bgp/global/router-id] value [2.2.2.2]
2021/06/02 08:11:24 BGP: [SWK28-M149C] northbound callback: event [prepare] op [create] xpath [/frr-routing:routing/control-plane-protocols/control-plane-protocol[type='frr-bgp:bgp'][name='bgp'][vrf='default']/frr-bgp:bgp/global/afi-safis/afi-safi[afi-safi-name='frr-routing:ipv4-unicast']] value [(none)]
2021/06/02 08:11:24 BGP: [SWK28-M149C] northbound callback: event [prepare] op [create] xpath [/frr-routing:routing/control-plane-protocols/control-plane-protocol[type='frr-bgp:bgp'][name='bgp'][vrf='default']/frr-bgp:bgp/neighbors/neighbor[remote-address='4.4.4.4']] value [(none)]
2021/06/02 08:11:24 BGP: [SWK28-M149C] northbound callback: event [prepare] op [modify] xpath [/frr-routing:routing/control-plane-protocols/control-plane-protocol[type='frr-bgp:bgp'][name='bgp'][vrf='default']/frr-bgp:bgp/neighbors/neighbor[remote-address='4.4.4.4']/neighbor-remote-as/remote-as-type] value [as-specified]
2021/06/02 08:11:24 BGP: [SWK28-M149C] northbound callback: event [prepare] op [modify] xpath [/frr-routing:routing/control-plane-protocols/control-plane-protocol[type='frr-bgp:bgp'][name='bgp'][vrf='default']/frr-bgp:bgp/neighbors/neighbor[remote-address='4.4.4.4']/neighbor-remote-as/remote-as] value [100]
I'm also tried to replace the "network-config" to "frr-bgp:network-config",but it's also does't work.
Can anyone tell me the correct json format of "afi-safis"?
Regards,
Yeping Xing
xingyeping at 163.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.frrouting.org/pipermail/frog/attachments/20210603/deda5a66/attachment.htm>
More information about the frog
mailing list