Advertisement
PANTHEONtech

[lighty.io] BGP Postman Collection

Aug 22nd, 2019
1,042
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 23.35 KB | None | 0 0
  1. # Save this file as .json for full functionality
  2. {
  3.     "info": {
  4.         "_postman_id": "960fd5b9-71b8-40b6-b4a1-5431f3719639",
  5.         "name": "lighty.io-BGP",
  6.         "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  7.     },
  8.     "item": [
  9.         {
  10.             "name": "get bgp-rib",
  11.             "protocolProfileBehavior": {
  12.                 "disableBodyPruning": true
  13.             },
  14.             "request": {
  15.                 "auth": {
  16.                     "type": "basic",
  17.                     "basic": [
  18.                         {
  19.                             "key": "password",
  20.                             "value": "admin",
  21.                             "type": "string"
  22.                         },
  23.                         {
  24.                             "key": "username",
  25.                             "value": "admin",
  26.                             "type": "string"
  27.                         }
  28.                     ]
  29.                 },
  30.                 "method": "GET",
  31.                 "header": [],
  32.                 "body": {
  33.                     "mode": "raw",
  34.                     "raw": ""
  35.                 },
  36.                 "url": {
  37.                     "raw": "http://172.20.0.4:8888/restconf/data/bgp-rib:bgp-rib",
  38.                     "protocol": "http",
  39.                     "host": [
  40.                         "172",
  41.                         "20",
  42.                         "0",
  43.                         "4"
  44.                     ],
  45.                     "port": "8888",
  46.                     "path": [
  47.                         "restconf",
  48.                         "data",
  49.                         "bgp-rib:bgp-rib"
  50.                     ]
  51.                 }
  52.             },
  53.             "response": []
  54.         },
  55.         {
  56.             "name": "Get bgp-openconfig",
  57.             "protocolProfileBehavior": {
  58.                 "disableBodyPruning": true
  59.             },
  60.             "request": {
  61.                 "method": "GET",
  62.                 "header": [
  63.                     {
  64.                         "key": "Content-Type",
  65.                         "name": "Content-Type",
  66.                         "type": "text",
  67.                         "value": "application/xml"
  68.                     }
  69.                 ],
  70.                 "body": {
  71.                     "mode": "raw",
  72.                     "raw": "<protocols xmlns=\"http://openconfig.net/yang/network-instance\">\r\n    <protocol>\r\n        <name>bgp-peer</name>\r\n        <identifier xmlns:x=\"http://openconfig.net/yang/policy-types\">x:BGP</identifier>\r\n        <bgp xmlns=\"urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions\">\r\n            <global>\r\n                <config>\r\n                    <!-- configure BGP-AS and router-id for bgp-rr node (lighty-bgp) -->\r\n                    <router-id>172.18.0.3</router-id>\r\n                    <as>65100</as>\r\n                </config>\r\n                <apply-policy>\r\n                    <config>\r\n                        <!-- policies applied for routing information import and export, in this example we want all routes to be accepted -->\r\n                        <default-export-policy>ACCEPT-ROUTE</default-export-policy>\r\n                        <default-import-policy>ACCEPT-ROUTE</default-import-policy>\r\n                        <import-policy>default-odl-import-policy</import-policy>\r\n                        <export-policy>default-odl-export-policy</export-policy>\r\n                    </config>\r\n                </apply-policy>\r\n                <afi-safis>\r\n                    <!-- enable accepting address families, in this case all possible -->\r\n                    <afi-safi>\r\n                        <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:IPV4-UNICAST</afi-safi-name>\r\n                    </afi-safi>\r\n                    <afi-safi>\r\n                        <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:IPV6-UNICAST</afi-safi-name>\r\n                    </afi-safi>\r\n                    <afi-safi>\r\n                        <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:IPV4-LABELLED-UNICAST</afi-safi-name>\r\n                    </afi-safi>\r\n                    <afi-safi>\r\n                        <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:IPV6-LABELLED-UNICAST</afi-safi-name>\r\n                    </afi-safi>\r\n                    <afi-safi>\r\n                        <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L3VPN-IPV4-UNICAST</afi-safi-name>\r\n                    </afi-safi>\r\n                    <afi-safi>\r\n                        <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L3VPN-IPV6-UNICAST</afi-safi-name>\r\n                    </afi-safi>\r\n                    <afi-safi>\r\n                        <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L3VPN-IPV4-MULTICAST</afi-safi-name>\r\n                    </afi-safi>\r\n                    <afi-safi>\r\n                        <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L3VPN-IPV6-MULTICAST</afi-safi-name>\r\n                    </afi-safi>\r\n                    <afi-safi>\r\n                        <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L2VPN-EVPN</afi-safi-name>\r\n                    </afi-safi>\r\n                    <afi-safi>\r\n                        <afi-safi-name>LINKSTATE</afi-safi-name>\r\n                    </afi-safi>\r\n                    <afi-safi>\r\n                        <afi-safi-name>IPV4-FLOW</afi-safi-name>\r\n                    </afi-safi>\r\n                    <afi-safi>\r\n                        <afi-safi-name>IPV6-FLOW</afi-safi-name>\r\n                    </afi-safi>\r\n                    <afi-safi>\r\n                        <afi-safi-name>IPV4-L3VPN-FLOW</afi-safi-name>\r\n                    </afi-safi>\r\n                    <afi-safi>\r\n                        <afi-safi-name>IPV6-L3VPN-FLOW</afi-safi-name>\r\n                    </afi-safi>\r\n                    <afi-safi>\r\n                        <afi-safi-name>IPV4-MCAST-VPN</afi-safi-name>\r\n                    </afi-safi>\r\n                    <afi-safi>\r\n                        <afi-safi-name>IPV6-MCAST-VPN</afi-safi-name>\r\n                    </afi-safi>\r\n                    <afi-safi>\r\n                        <afi-safi-name>ROUTE-TARGET-CONSTRAIN</afi-safi-name>\r\n                    </afi-safi>\r\n                </afi-safis>\r\n            </global>\r\n            <neighbors>\r\n                <neighbor>\r\n                    <!-- ip address of the neighbor (CEOS3) -->\r\n                    <neighbor-address>172.18.0.4</neighbor-address>\r\n                    <config>\r\n        \t\t\t\t<peer-type>INTERNAL</peer-type>\r\n        \t\t\t\t<peer-as>65100</peer-as>\r\n    \t\t\t\t</config>\r\n                    <!-- define BGP peering under AFI IPv4 and L2VPN SAFI EVPN -->\r\n                    <afi-safis>\r\n                    \t<afi-safi>\r\n                            <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:IPV4-UNICAST</afi-safi-name>\r\n                        </afi-safi>\r\n                    \t<afi-safi>\r\n                            <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L2VPN-EVPN</afi-safi-name>\r\n                        </afi-safi>\r\n                    </afi-safis>\r\n                    <!-- define BGP hold-time timer -->\r\n                    <timers>\r\n                        <config>\r\n                            <hold-time>180</hold-time>\r\n                            <connect-retry>5</connect-retry>\r\n                        </config>\r\n                    </timers>\r\n                    <!-- define TCP transport capabilities -->\r\n                    <transport>\r\n                        <config>\r\n                            <remote-port>179</remote-port>\r\n                            <passive-mode>true</passive-mode>\r\n                            <local-address>172.18.0.4</local-address>\r\n                        </config>\r\n                    </transport>\r\n                </neighbor>\r\n            </neighbors>\r\n        </bgp>\r\n    </protocol>\r\n</protocols>"
  73.                 },
  74.                 "url": {
  75.                     "raw": "http://172.20.0.4:8888/restconf/data/openconfig-network-instance:network-instances/network-instance=global-bgp/protocols",
  76.                     "protocol": "http",
  77.                     "host": [
  78.                         "172",
  79.                         "20",
  80.                         "0",
  81.                         "4"
  82.                     ],
  83.                     "port": "8888",
  84.                     "path": [
  85.                         "restconf",
  86.                         "data",
  87.                         "openconfig-network-instance:network-instances",
  88.                         "network-instance=global-bgp",
  89.                         "protocols"
  90.                     ]
  91.                 }
  92.             },
  93.             "response": []
  94.         },
  95.         {
  96.             "name": "PUT bgp peers",
  97.             "request": {
  98.                 "method": "PUT",
  99.                 "header": [
  100.                     {
  101.                         "key": "Authorization",
  102.                         "value": "Basic YWRtaW46YWRtaW4="
  103.                     },
  104.                     {
  105.                         "key": "Content-Type",
  106.                         "value": "application/xml"
  107.                     },
  108.                     {
  109.                         "key": "Cache-Control",
  110.                         "value": "no-cache"
  111.                     }
  112.                 ],
  113.                 "body": {
  114.                     "mode": "raw",
  115.                     "raw": "<protocols xmlns=\"http://openconfig.net/yang/network-instance\">\n    <protocol>\n        <name>bgp-rr</name>\n        <identifier xmlns:x=\"http://openconfig.net/yang/policy-types\">x:BGP</identifier>\n        <bgp xmlns=\"urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions\">\n            <global>\n                <config>\n                    <!-- configure AS and router id for lighty-bgp node -->\n                    <router-id>172.20.0.4</router-id>\n                    <as>50</as>\n                </config>\n                <apply-policy>\n                    <config>\n                        <!-- policies applied for routing information import and export, in this example we want all routes to be accepted -->\n                        <default-export-policy>ACCEPT-ROUTE</default-export-policy>\n                        <default-import-policy>ACCEPT-ROUTE</default-import-policy>\n                        <import-policy>default-odl-import-policy</import-policy>\n                        <export-policy>default-odl-export-policy</export-policy>\n                    </config>\n                </apply-policy>\n                <afi-safis>\n                     <!-- enable accepting address families, in this case all possible -->\n                    <afi-safi>\n                        <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:IPV4-UNICAST</afi-safi-name>\n                        <!--Advertise N Paths\n                        <receive>true</receive>\n                        <send-max>2</send-max>-->\n                    </afi-safi>\n                    <afi-safi>\n                        <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:IPV6-UNICAST</afi-safi-name>\n                    </afi-safi>\n                    <afi-safi>\n                        <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:IPV4-LABELLED-UNICAST</afi-safi-name>\n                    </afi-safi>\n                    <afi-safi>\n                        <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:IPV6-LABELLED-UNICAST</afi-safi-name>\n                    </afi-safi>\n                    <afi-safi>\n                        <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L3VPN-IPV4-UNICAST</afi-safi-name>\n                    </afi-safi>\n                    <afi-safi>\n                        <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L3VPN-IPV6-UNICAST</afi-safi-name>\n                    </afi-safi>\n                    <afi-safi>\n                        <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L3VPN-IPV4-MULTICAST</afi-safi-name>\n                    </afi-safi>\n                    <afi-safi>\n                        <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L3VPN-IPV6-MULTICAST</afi-safi-name>\n                    </afi-safi>\n                    <afi-safi>\n                        <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L2VPN-EVPN</afi-safi-name>\n                    </afi-safi>\n                    <afi-safi>\n                        <afi-safi-name>LINKSTATE</afi-safi-name>\n                    </afi-safi>\n                    <afi-safi>\n                        <afi-safi-name>IPV4-FLOW</afi-safi-name>\n                    </afi-safi>\n                    <afi-safi>\n                        <afi-safi-name>IPV6-FLOW</afi-safi-name>\n                    </afi-safi>\n                    <afi-safi>\n                        <afi-safi-name>IPV4-L3VPN-FLOW</afi-safi-name>\n                    </afi-safi>\n                    <afi-safi>\n                        <afi-safi-name>IPV6-L3VPN-FLOW</afi-safi-name>\n                    </afi-safi>\n                    <afi-safi>\n                        <afi-safi-name>IPV4-MCAST-VPN</afi-safi-name>\n                    </afi-safi>\n                    <afi-safi>\n                        <afi-safi-name>IPV6-MCAST-VPN</afi-safi-name>\n                    </afi-safi>\n                    <afi-safi>\n                        <afi-safi-name>ROUTE-TARGET-CONSTRAIN</afi-safi-name>\n                    </afi-safi>\n                </afi-safis>\n            </global>\n            <neighbors>\n                <neighbor>\n                    <!-- ip address of neighbor -->\n                    <neighbor-address>172.20.0.2</neighbor-address>\n                    <route-reflector>\n                        <config>\n                            <route-reflector-client>true</route-reflector-client>\n                        </config>\n                    </route-reflector>\n                    <timers>\n                        <config>\n                            <hold-time>280</hold-time>\n                            <connect-retry>5</connect-retry>\n                        </config>\n                    </timers>\n                    <transport>\n                        <config>\n                            <remote-port>179</remote-port>\n                            <passive-mode>false</passive-mode>\n                        </config>\n                    </transport>\n                    <config>\n                        <!-- there is a lot of configuration that is common to multiple neighbors, such a configuration is in the peer-group -->\n                        <peer-group>/bgp/neighbors/neighbor/bgp/peer-groups/peer-group[peer-group-name=\"internal-neighbor\"]</peer-group>\n                    </config>\n                </neighbor>\n                <neighbor>\n                    <neighbor-address>172.20.0.3</neighbor-address>\n                    <route-reflector>\n                        <config>\n                            <route-reflector-client>true</route-reflector-client>\n                        </config>\n                    </route-reflector>\n                    <timers>\n                        <config>\n                            <hold-time>280</hold-time>\n                            <connect-retry>5</connect-retry>\n                        </config>\n                    </timers>\n                    <transport>\n                        <config>\n                            <remote-port>179</remote-port>\n                            <passive-mode>false</passive-mode>\n                        </config>\n                    </transport>\n                    <config>\n                        <peer-group>/bgp/neighbors/neighbor/bgp/peer-groups/peer-group[peer-group-name=\"internal-neighbor\"]</peer-group>\n                    </config>\n                </neighbor>\n            </neighbors>\n            <peer-groups>\n                <peer-group>\n                    <peer-group-name>internal-neighbor</peer-group-name>\n                    <config>\n                        <peer-type>INTERNAL</peer-type>\n                        <peer-as>50</peer-as>\n                    </config>\n                    <transport>\n                        <config>\n                            <remote-port>179</remote-port>\n                            <passive-mode>false</passive-mode>\n                        </config>\n                    </transport>\n                    <timers>\n                        <config>\n                            <hold-time>280</hold-time>\n                            <connect-retry>10</connect-retry>\n                        </config>\n                    </timers>\n                    <route-reflector>\n                        <config>\n                            <route-reflector-client>true</route-reflector-client>\n                        </config>\n                    </route-reflector>\n                    <graceful-restart>\n                        <config>\n                            <restart-time>60</restart-time>\n                        </config>\n                    </graceful-restart>\n                    <afi-safis>\n                        <afi-safi>\n                            <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:IPV4-UNICAST</afi-safi-name>\n                            <!--Advertise N Paths\n                            <receive>true</receive>\n                            <send-max>0</send-max>-->\n                        </afi-safi>\n                        <afi-safi>\n                            <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:IPV6-UNICAST</afi-safi-name>\n                            <graceful-restart>\n                                <config>\n                                    <enabled>true</enabled>\n                                </config>\n                            </graceful-restart>\n                        </afi-safi>\n                        <afi-safi>\n                            <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:IPV4-LABELLED-UNICAST</afi-safi-name>\n                            <graceful-restart>\n                                <config>\n                                    <enabled>true</enabled>\n                                </config>\n                            </graceful-restart>\n                        </afi-safi>\n                        <afi-safi>\n                            <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:IPV6-LABELLED-UNICAST</afi-safi-name>\n                            <graceful-restart>\n                                <config>\n                                    <enabled>true</enabled>\n                                </config>\n                            </graceful-restart>\n                        </afi-safi>\n                        <afi-safi>\n                            <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L3VPN-IPV4-UNICAST</afi-safi-name>\n                            <graceful-restart>\n                                <config>\n                                    <enabled>true</enabled>\n                                </config>\n                            </graceful-restart>\n                        </afi-safi>\n                        <afi-safi>\n                            <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L3VPN-IPV6-UNICAST</afi-safi-name>\n                            <graceful-restart>\n                                <config>\n                                    <enabled>true</enabled>\n                                </config>\n                            </graceful-restart>\n                        </afi-safi>\n                        <afi-safi>\n                            <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L3VPN-IPV4-MULTICAST</afi-safi-name>\n                            <graceful-restart>\n                                <config>\n                                    <enabled>true</enabled>\n                                </config>\n                            </graceful-restart>\n                        </afi-safi>\n                        <afi-safi>\n                            <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L3VPN-IPV6-MULTICAST</afi-safi-name>\n                            <graceful-restart>\n                                <config>\n                                    <enabled>true</enabled>\n                                </config>\n                            </graceful-restart>\n                        </afi-safi>\n                        <afi-safi>\n                            <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L2VPN-EVPN</afi-safi-name>\n                            <graceful-restart>\n                                <config>\n                                    <enabled>true</enabled>\n                                </config>\n                            </graceful-restart>\n                        </afi-safi>\n                        <afi-safi>\n                            <afi-safi-name>LINKSTATE</afi-safi-name>\n                            <graceful-restart>\n                                <config>\n                                    <enabled>true</enabled>\n                                </config>\n                            </graceful-restart>\n                        </afi-safi>\n                        <afi-safi>\n                            <afi-safi-name>IPV4-FLOW</afi-safi-name>\n                            <graceful-restart>\n                                <config>\n                                    <enabled>true</enabled>\n                                </config>\n                            </graceful-restart>\n                        </afi-safi>\n                        <afi-safi>\n                            <afi-safi-name>IPV6-FLOW</afi-safi-name>\n                            <graceful-restart>\n                                <config>\n                                    <enabled>true</enabled>\n                                </config>\n                            </graceful-restart>\n                        </afi-safi>\n                        <afi-safi>\n                            <afi-safi-name>IPV4-L3VPN-FLOW</afi-safi-name>\n                            <graceful-restart>\n                                <config>\n                                    <enabled>true</enabled>\n                                </config>\n                            </graceful-restart>\n                        </afi-safi>\n                        <afi-safi>\n                            <afi-safi-name>IPV6-L3VPN-FLOW</afi-safi-name>\n                            <graceful-restart>\n                                <config>\n                                    <enabled>true</enabled>\n                                </config>\n                            </graceful-restart>\n                        </afi-safi>\n                        <afi-safi>\n                            <afi-safi-name>IPV4-MCAST-VPN</afi-safi-name>\n                            <graceful-restart>\n                                <config>\n                                    <enabled>true</enabled>\n                                </config>\n                            </graceful-restart>\n                        </afi-safi>\n                        <afi-safi>\n                            <afi-safi-name>IPV6-MCAST-VPN</afi-safi-name>\n                            <graceful-restart>\n                                <config>\n                                    <enabled>true</enabled>\n                                </config>\n                            </graceful-restart>\n                        </afi-safi>\n                        <afi-safi>\n                            <afi-safi-name>ROUTE-TARGET-CONSTRAIN</afi-safi-name>\n                            <graceful-restart>\n                                <config>\n                                    <enabled>true</enabled>\n                                </config>\n                            </graceful-restart>\n                        </afi-safi>\n                    </afi-safis>\n                </peer-group>\n            </peer-groups>\n        </bgp>\n    </protocol>\n</protocols>"
  116.                 },
  117.                 "url": {
  118.                     "raw": "http://172.20.0.4:8888/restconf/data/openconfig-network-instance:network-instances/network-instance=global-bgp/protocols",
  119.                     "protocol": "http",
  120.                     "host": [
  121.                         "172",
  122.                         "20",
  123.                         "0",
  124.                         "4"
  125.                     ],
  126.                     "port": "8888",
  127.                     "path": [
  128.                         "restconf",
  129.                         "data",
  130.                         "openconfig-network-instance:network-instances",
  131.                         "network-instance=global-bgp",
  132.                         "protocols"
  133.                     ]
  134.                 }
  135.             },
  136.             "response": []
  137.         }
  138.     ]
  139. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement