- State OpenDaylight version: Carbon SR2
- I use BGP-IPv4 Flow Specification programming to post routing.The ODL is OK when I post less than 2000 routing to it.Without the limit of transferring speed, the crashed outbreak may strike from each 2000 sendings based on the protocol of sending IPv4 Flow Specification routing.The crashed outbreak may occur by sending each one in a second up to 10,000 times.
3.The picture is how to post IPv4 Flow Specification routing.
3.1 Protocol Configuration
Method: POST
Content-Type: application/xml
<protocol xmlns="http://openconfig.net/yang/network-instance"> <name>bgp-example</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>202.109.207.75</router-id> <as>65110</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-safi> <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-UNICAST</afi-safi-name> </afi-safi> <afi-safi> <afi-safi-name>IPV4-FLOW</afi-safi-name> </afi-safi> <afi-safi> <afi-safi-name>IPV6-FLOW</afi-safi-name> </afi-safi> <afi-safi> <afi-safi-name>IPV4-L3VPN-FLOW</afi-safi-name> </afi-safi> <afi-safi> <afi-safi-name>IPV6-L3VPN-FLOW</afi-safi-name> </afi-safi> </afi-safis> </global> </bgp></protocol>
3.2 BGP flowspec Peer
Method: POST
Content-Type: application/xml
Request Body:
<neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions"><neighbor-address>202.101.99.249</neighbor-address> <timers> <config> <hold-time>90</hold-time> <connect-retry>10</connect-retry> </config> </timers> <transport> <config> <remote-port>179</remote-port> <passive-mode>false</passive-mode> </config> </transport> <config> <peer-type>EXTERNAL</peer-type> <peer-as>65130</peer-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-safi> <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-UNICAST</afi-safi-name> </afi-safi> <afi-safi> <afi-safi-name>IPV4-FLOW</afi-safi-name> </afi-safi> <afi-safi> <afi-safi-name>IPV6-FLOW</afi-safi-name> </afi-safi> <afi-safi> <afi-safi-name>IPV4-L3VPN-FLOW</afi-safi-name> </afi-safi> <afi-safi> <afi-safi-name>IPV6-L3VPN-FLOW</afi-safi-name> </afi-safi> </afi-safis></neighbor>
3.3 BGP Application Peer and programmable RIB(I created it as soon as post one routing.Using different neighbor-address. )
Method: POST
Content-Type: application/xml
Request Body:
<neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions"> <neighbor-address>10.25.1.9</neighbor-address> <config> <peer-group>application-peers</peer-group> </config></neighbor>
URL: http://202.109.207.77:8181/restconf/config/bgp-rib:application-rib/10.25.1.9 /tables/bgp-types:ipv4-address-family/bgp-flowspec:flowspec-subsequent-address-family/bgp-flowspec:flowspec-routes
Method: POST
Content-Type: application/xml
<flowspec-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-flowspec">
<route-key>flow1</route-key>
<path-id>0</path-id>
<flowspec>
<source-prefix>202.109.207.75/32</source-prefix>
</flowspec>
<attributes>
<origin>
<value>egp</value>
</origin>
<as-path/>
<local-pref>
<pref>100</pref>
</local-pref>
<extended-communities>
<transitive>true</transitive>
<traffic-rate-extended-community>
<informative-as>0</informative-as>
<local-administrator>AAAAAA==</local-administrator>
</traffic-rate-extended-community>
</extended-communities>
</attributes>
</flowspec-route>