Add json examples for bgp-user-guide-pmsi-attribute.rst
[bgpcep.git] / docs / bgp / bgp-user-guide-bgp-server.rst
1 .. _bgp-user-guide-bgp-server:
2
3 BGP Server
4 ==========
5
6 BGP uses TCP as its transport protocol, by default listens on port 179. OpenDaylight BGP plugin is configured to listen on port *1790*, due to
7 privileged ports restriction for non-root users.
8 One of the workarounds is to use port redirection. In case other port is desired to be used instead, we can reconfigure it.
9
10 Here is a sample of bgp port listening re-configuration:
11
12 **URL:** ``/restconf/config/odl-bgp-peer-acceptor-config:bgp-peer-acceptor-config/default``
13
14 **RFC8040 URL:** ``/rests/data/odl-bgp-peer-acceptor-config:bgp-peer-acceptor-config=default``
15
16 **Method:** ``PUT``
17
18 .. tabs::
19
20    .. tab:: XML
21
22       **Content-Type:** ``application/xml``
23
24       **Request Body:**
25
26       .. code-block:: xml
27          :linenos:
28          :emphasize-lines: 3,4
29
30          <bgp-peer-acceptor-config xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-peer-acceptor-config">
31              <config-name>default</config-name>
32              <binding-address>0.0.0.0</binding-address>
33              <binding-port>1791</binding-port>
34          </bgp-peer-acceptor-config>
35
36       @line 3: Binding address: By default is 0.0.0.0, so it is not a mandatory field.
37
38       @line 4: Binding Port: Port were BGP Server will listen.
39
40    .. tab:: JSON
41
42       **Content-Type:** ``application/json``
43
44       **Request Body:**
45
46       .. code-block:: json
47          :linenos:
48          :emphasize-lines: 5,6
49
50          {
51              "bgp-peer-acceptor-config": [
52                  {
53                      "config-name": "default",
54                      "binding-address": "0.0.0.0",
55                      "binding-port": 1791
56                  }
57              ]
58          }
59
60       @line 5: Binding address: By default is 0.0.0.0, so it is not a mandatory field.
61
62       @line 6: Binding Port: Port were BGP Server will listen.