Fix MRI project list
[docs.git] / docs / user-guide / bgpcep-guide / bgp / bgp-user-guide-test-tools.rst
1 .. _bgp-user-guide-test-tools:
2
3 Test Tools
4 ==========
5 BGP test tools serves to test basic BGP functionality, scalability and performance.
6
7 .. contents:: Contents
8    :depth: 2
9    :local:
10
11 BGP Test Tool
12 ^^^^^^^^^^^^^
13 The BGP Test Tool is a stand-alone Java application purposed to simulate remote BGP peers, that are capable to advertise sample routes.
14 This application is not part of the OpenDaylight Karaf distribution, however it can be downloaded from OpenDaylight's Nexus (use latest release version):
15
16 ``https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/bgpcep/bgp-testtool``
17
18 Usage
19 '''''
20 The application can be run from command line:
21
22 .. code-block:: console
23
24    java -jar bgp-testtool-*-executable.jar
25
26
27 with optional input parameters:
28
29 .. code-block:: console
30
31    -i <BOOLEAN>, --active <BOOLEAN>
32       Active initialisation of the connection, by default false.
33
34    -ho <N>, --holdtimer <N>
35       In seconds, value of the desired holdtimer, by default 90.
36
37    -sc <N>, --speakersCount <N>
38       Number of simulated BGP speakers, when creating each speaker, uses incremented local-address for binding, by default 0.
39
40    -ra <IP_ADDRESS:PORT,...>, --remote-address <IP_ADDRESS:PORT,...>
41       A list of IP addresses of remote BGP peers, that the tool can accept or initiate connect to that address (based on the mode), by default 192.0.2.2:1790.
42
43    -la <IP_ADDRESS:PORT>, --localAddress <IP_ADDRESS:PORT>
44       IP address of BGP speakers which the tools simulates, by default 192.0.2.2:0.
45
46    -pr <N>, --prefixes <N>
47       Number of prefixes to be advertised by each simulated speaker
48
49    -mp <BOOLEAN>, --multiPathSupport <BOOLEAN>
50       Active ADD-PATH support, by default false.
51
52    -as <N>, --as <N>
53       Local AS Number, by default 64496.
54
55    -ec <EXTENDED_COMMUNITIES>, --extended_communities <EXTENDED_COMMUNITIES>
56       Extended communities to be send. Format: x,x,x  where  x  is  each  extended  community from bgp-types.yang, by default empty.
57
58    -ll <LOG_LEVEL>, --log_level <LOG_LEVEL>
59       Log level for console output, by default INFO.
60
61 BGP Application Peer Benchmark
62 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
63 It is a simple OpenDaylight application which is capable to inject and remove specific amount of IPv4 routes.
64 This application is part of the OpenDaylight Karaf distribution.
65
66 Configuration
67 '''''''''''''
68 As a first step install BGP and RESTCONF, then configure *Application Peer*.
69 Install ``odl-bgpcep-bgp-benchmark`` feature and reconfigure BGP Application Peer Benchmark application as per following:
70
71 **URL:** ``/restconf/config/odl-bgp-app-peer-benchmark-config:config``
72
73 **Method:** ``PUT``
74
75 **Content-Type:** ``application/xml``
76
77 **Request Body:**
78
79 .. code-block:: xml
80    :linenos:
81    :emphasize-lines: 2
82
83    <odl-bgp-app-peer-benchmark-config xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-app-peer-benchmark-config">
84       <app-peer-id xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-app-peer-benchmark-config">10.25.1.9</app-peer-id>
85    </odl-bgp-app-peer-benchmark-config>
86
87 @line 2: The *Application Peer* identifier.
88
89 Inject routes
90 '''''''''''''
91 Routes injection can be invoked via RPC:
92
93 **URL:** ``/restconf/operations/odl-bgp-app-peer-benchmark:add-prefix``
94
95 **Method:** ``POST``
96
97 **Content-Type:** ``application/xml``
98
99 **Request Body:**
100
101 .. code-block:: xml
102    :linenos:
103    :emphasize-lines: 2,3,4,5
104
105    <input xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-app-peer-benchmark">
106        <prefix>1.1.1.1/32</prefix>
107        <count>100000</count>
108        <batchsize>2000</batchsize>
109        <nexthop>192.0.2.2</nexthop>
110    </input>
111
112 @line 2: A initial IPv4 prefix carried in route. Value is incremented for following routes.
113
114 @line 3: An amount of routes to be added to *Application Peer's* programmable RIB.
115
116 @line 4: A size of the transaction batch.
117
118 @line 5: A NEXT_HOP attribute value used in all injected routes.
119
120 **Response Body:**
121
122 .. code-block:: xml
123    :linenos:
124    :emphasize-lines: 3,4,5
125
126    <output xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-app-peer-benchmark">
127        <result>
128            <duration>4301</duration>
129            <rate>25000</rate>
130            <count>100000</count>
131        </result>
132    </output>
133
134 @line 3: Request duration in milliseconds.
135
136 @line 4: Writes per second rate.
137
138 @line 5: An amount of routes added to *Application Peer's* programmable RIB.
139
140 Remove routes
141 '''''''''''''
142 Routes deletion can be invoked via RPC:
143
144 **URL:** ``/restconf/operations/odl-bgp-app-peer-benchmark:delete-prefix``
145
146 **Method:** ``POST``
147
148 **Content-Type:** ``application/xml``
149
150 **Request Body:**
151
152 .. code-block:: xml
153    :linenos:
154    :emphasize-lines: 2,3,4
155
156    <input xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-app-peer-benchmark">
157        <prefix>1.1.1.1/32</prefix>
158        <count>100000</count>
159        <batchsize>2000</batchsize>
160    </input>
161
162 @line 2: A initial IPv4 prefix carried in route to be removed. Value is incremented for following routes.
163
164 @line 3: An amount of routes to be removed from *Application Peer's* programmable RIB.
165
166 @line 4: A size of the transaction batch.
167
168 **Response Body:**
169
170 .. code-block:: xml
171
172    <output xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-app-peer-benchmark">
173        <result>
174            <duration>1837</duration>
175            <rate>54500</rate>
176            <count>100000</count>
177        </result>
178    </output>