I`m building a BGP peering between Cisco router (BGP RR-Client) and OpenDaylight (BGP-RR), (ODL - Oxygen release) using the following REST/XML configuration and Postman API call. Cisco router, as well as ODL are in the same AS (BGP AS 65500), but not in the same IP address space. Proper IGP routing (OSPF) has been configured and both are mutual reachable over IPv4.
Here is the API call with the XML schema I`m using for ODL configuration:
PUT: http://localhost:8181/restconf/data/openconfig-network-instance:network-instances/network-instance=global-bgp/protocols
<protocols xmlns="http://openconfig.net/yang/network-instance">
<protocol>
<name>bgp-rr</name>
<identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
<bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
<global>
<config>
<router-id>172.16.10.3</router-id>
<as>65500</as>
</config>
<afi-safis>
<afi-safi>
<afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
</afi-safi>
</afi-safis>
</global>
<neighbors>
<neighbor>
<neighbor-address>1.1.1.1</neighbor-address>
<route-reflector>
<config>
<route-reflector-client>true</route-reflector-client>
</config>
</route-reflector>
<timers>
<config>
<hold-time>180</hold-time>
<connect-retry>5</connect-retry>
</config>
</timers>
<transport>
<config>
<remote-port>179</remote-port>
<passive-mode>false</passive-mode>
</config>
</transport>
</neighbor>
</neighbors>
</bgp>
<protocol>
</protocols>
However, the problem is that I get an error 400 Bad Request with the empty response body, but when pointing on the error code (in Postman), I see bad syntax message. I tried to simplify my API call with the BGP peering only, but always get the same error. I checked the XML code via XML validator and everything looks good (code is valid). On Cisco router, BGP state is in CONNECT state, and I see that TCP state is SYN-SENT. Socket error is Connection Refused (by remote peer). This is understandable, because Cisco router tries to connect to OpenDaylight, but as the BGP peering has not been successfully applied, there`s no BGP speaker in OpenDaylight yet.
I assume that the issue could be the HTML request (PUT), but as I`m beginner in ODL and REST/XML, I have no idea what the correct syntax is.
Can someone help me to identify it and how to solve it? Thank you. Peter