<html><head><meta http-equiv="content-type" content="text/html; charset=GB2312"><style>body { line-height: 1.5; }body { font-size: 10.5pt; font-family: 'Microsoft YaHei UI'; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>Hi All.</div><div><br></div><div>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</div><div>some configuration to BGPD£¬the question is I can't configure the "afi-safis"¡£The configuration is underneath£º</div><div><br></div><div><div><i><font color="#808080">{</font></i></div><div><i><font color="#808080"> "frr-routing:routing": {</font></i></div><div><i><font color="#808080"> "control-plane-protocols": {</font></i></div><div><i><font color="#808080"> "control-plane-protocol": [{</font></i></div><div><i><font color="#808080"> "type": "frr-bgp:bgp",</font></i></div><div><i><font color="#808080"> "name": "bgp",</font></i></div><div><i><font color="#808080"> "vrf": "default",</font></i></div><div><i><font color="#808080"> "frr-bgp:bgp": {</font></i></div><div><i><font color="#808080"> "global": {</font></i></div><div><i><font color="#808080"> "local-as": 100,</font></i></div><div><i><font color="#808080"> "router-id": "2.2.2.2",</font></i></div><div><i><font color="#808080"> "afi-safis": {</font></i></div><div><i><font color="#808080"> "afi-safi": [{</font></i></div><div><i><font color="#808080"> "afi-safi-name": "frr-routing:ipv4-unicast",</font></i></div><div><i><font style="background-color: rgb(255, 255, 255);" color="#ff0000"> "frr-routing:ipv4-unicast": {</font></i></div><div><i><font style="background-color: rgb(255, 255, 255);" color="#ff0000"> "network-config": [{</font></i></div><div><i><font style="background-color: rgb(255, 255, 255);" color="#ff0000"> "prefix": "192.168.155.0/24"</font></i></div><div><i><font style="background-color: rgb(255, 255, 255);" color="#ff0000"> }, {</font></i></div><div><i><font style="background-color: rgb(255, 255, 255);" color="#ff0000"> "prefix": "192.168.166.0/16"</font></i></div><div><i><font color="#808080"> }]</font></i></div><div><i><font color="#808080"> }</font></i></div><div><i><font color="#808080"> }]</font></i></div><div><i><font color="#808080"> }</font></i></div><div><i><font color="#808080"> },</font></i></div><div><i><font color="#808080"> "neighbors": {</font></i></div><div><i><font color="#808080"> "neighbor": [{</font></i></div><div><i><font color="#808080"> "remote-address": "4.4.4.4",</font></i></div><div><i><font color="#808080"> "neighbor-remote-as": {</font></i></div><div><i><font color="#808080"> "remote-as-type": "as-specified",</font></i></div><div><i><font color="#808080"> "remote-as": 100</font></i></div><div><i><font color="#808080"> }</font></i></div><div><i><font color="#808080"> }]</font></i></div><div><i><font color="#808080"> }</font></i></div><div><i><font color="#808080"> }</font></i></div><div><i><font color="#808080"> }]</font></i></div><div><i><font color="#808080"> }</font></i></div><div><i><font color="#808080"> }</font></i></div><div><i><font color="#808080">}</font></i></div></div>
<div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);"> The red part can't deliver to BGPD£¬and the log is£º</span></div><div><div style="background-color: rgba(0, 0, 0, 0);"><i><font color="#808080">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]</font></i></div><div style="background-color: rgba(0, 0, 0, 0);"><i><font color="#808080">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)]</font></i></div><div style="background-color: rgba(0, 0, 0, 0);"><i><font color="#808080">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)]</font></i></div><div style="background-color: rgba(0, 0, 0, 0);"><i><font color="#808080">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]</font></i></div><div style="background-color: rgba(0, 0, 0, 0);"><i><font color="#808080">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]</font></i></div><div style="background-color: rgba(0, 0, 0, 0);"><br></div><div style="background-color: rgba(0, 0, 0, 0);"><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);"> I'm also tried to replace the "network-config" to </span><span style="font-size: 10.5pt; line-height: 1.5; background-color: transparent;"><i style="color: rgb(0, 0, 255);">"frr-bgp:network-config"</i>,</span><span style="font-size: 10.5pt; line-height: 1.5; background-color: transparent;">but it's also does't work.</span></div><div style="background-color: rgba(0, 0, 0, 0);"><span style="font-size: 10.5pt; line-height: 1.5; background-color: transparent;"><br></span></div><div style="background-color: rgba(0, 0, 0, 0);"><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);"> </span><span style="background-color: transparent;">Can anyone tell me the correct json format of </span><span style="font-size: 10.5pt; line-height: 1.5; background-color: transparent;">"afi-safis"?</span></div><div style="background-color: rgba(0, 0, 0, 0);"><span style="font-size: 10.5pt; line-height: 1.5; background-color: transparent;"><br></span></div><div style="background-color: rgba(0, 0, 0, 0);"><span style="font-size: 10.5pt; line-height: 1.5; background-color: transparent;">Regards,</span></div><div style="background-color: rgba(0, 0, 0, 0);"><span style="font-size: 10.5pt; line-height: 1.5; background-color: transparent;">Yeping Xing</span></div><div><div><br></div></div></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>xingyeping@163.com</div></div></span></div>
</body></html>