Advertisement
PANTHEONtech

lighty-BGP Peers Configuration

Apr 18th, 2019
764
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PUT http://172.18.0.4:8888/restconf/data/openconfig-network-instance:network-instances/network-instance=global-bgp/protocols
  2.  
  3.  
  4. <protocols xmlns="http://openconfig.net/yang/network-instance">
  5.     <protocol>
  6.         <name>example-bgp-rib</name>
  7.         <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
  8.         <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
  9.             <global>
  10.                 <config>
  11.                     <!-- configure AS and router id for lighty-bgp node -->
  12.                     <router-id>172.19.0.4</router-id>
  13.                     <as>50</as>
  14.                 </config>
  15.                 <apply-policy>
  16.                     <config>
  17.                         <!-- policies applied for routing information import and export, in this example we want all routes to be accepted -->
  18.                         <default-export-policy>ACCEPT-ROUTE</default-export-policy>
  19.                         <default-import-policy>ACCEPT-ROUTE</default-import-policy>
  20.                         <import-policy>default-odl-import-policy</import-policy>
  21.                         <export-policy>default-odl-export-policy</export-policy>
  22.                     </config>
  23.                 </apply-policy>
  24.                 <afi-safis>
  25.                     <!-- enable accepting address families, in this case all possible -->
  26.                     <afi-safi>
  27.                         <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
  28.                     </afi-safi>
  29.                     <afi-safi>
  30.                         <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-UNICAST</afi-safi-name>
  31.                     </afi-safi>
  32.                     <afi-safi>
  33.                         <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-LABELLED-UNICAST</afi-safi-name>
  34.                     </afi-safi>
  35.                     <afi-safi>
  36.                         <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-LABELLED-UNICAST</afi-safi-name>
  37.                     </afi-safi>
  38.                     <afi-safi>
  39.                         <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-UNICAST</afi-safi-name>
  40.                     </afi-safi>
  41.                     <afi-safi>
  42.                         <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-UNICAST</afi-safi-name>
  43.                     </afi-safi>
  44.                     <afi-safi>
  45.                         <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-MULTICAST</afi-safi-name>
  46.                     </afi-safi>
  47.                     <afi-safi>
  48.                         <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-MULTICAST</afi-safi-name>
  49.                     </afi-safi>
  50.                     <afi-safi>
  51.                         <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L2VPN-EVPN</afi-safi-name>
  52.                     </afi-safi>
  53.                     <afi-safi>
  54.                         <afi-safi-name>LINKSTATE</afi-safi-name>
  55.                     </afi-safi>
  56.                     <afi-safi>
  57.                         <afi-safi-name>IPV4-FLOW</afi-safi-name>
  58.                     </afi-safi>
  59.                     <afi-safi>
  60.                         <afi-safi-name>IPV6-FLOW</afi-safi-name>
  61.                     </afi-safi>
  62.                     <afi-safi>
  63.                         <afi-safi-name>IPV4-L3VPN-FLOW</afi-safi-name>
  64.                     </afi-safi>
  65.                     <afi-safi>
  66.                         <afi-safi-name>IPV6-L3VPN-FLOW</afi-safi-name>
  67.                     </afi-safi>
  68.                     <afi-safi>
  69.                         <afi-safi-name>IPV4-MCAST-VPN</afi-safi-name>
  70.                     </afi-safi>
  71.                     <afi-safi>
  72.                         <afi-safi-name>IPV6-MCAST-VPN</afi-safi-name>
  73.                     </afi-safi>
  74.                     <afi-safi>
  75.                         <afi-safi-name>ROUTE-TARGET-CONSTRAIN</afi-safi-name>
  76.                     </afi-safi>
  77.                 </afi-safis>
  78.             </global>
  79.             <neighbors>
  80.                 <neighbor>
  81.                     <!-- ip address of neighbor -->
  82.                     <neighbor-address>172.19.0.2</neighbor-address>
  83.                     <route-reflector>
  84.                         <config>
  85.                             <!-- this is the main thing, enables forwarding routing information to this neighbor -->
  86.                             <route-reflector-client>true</route-reflector-client>
  87.                         </config>
  88.                     </route-reflector>
  89.                     <timers>
  90.                         <config>
  91.                             <hold-time>180</hold-time>
  92.                             <connect-retry>5</connect-retry>
  93.                         </config>
  94.                     </timers>
  95.                     <transport>
  96.                         <config>
  97.                             <remote-port>179</remote-port>
  98.                             <passive-mode>false</passive-mode>
  99.                         </config>
  100.                     </transport>
  101.                     <config>
  102.                         <!-- there is a lot of configuration that is common to multiple neighbors, such a configuration is in the peer-group -->
  103.                         <peer-group>/bgp/neighbors/neighbor/bgp/peer-groups/peer-group[peer-group-name="internal-neighbor"]</peer-group>
  104.                     </config>
  105.                 </neighbor>
  106.                 <neighbor>
  107.                     <neighbor-address>172.19.0.3</neighbor-address>
  108.                     <route-reflector>
  109.                         <config>
  110.                             <route-reflector-client>true</route-reflector-client>
  111.                         </config>
  112.                     </route-reflector>
  113.                     <timers>
  114.                         <config>
  115.                             <hold-time>180</hold-time>
  116.                             <connect-retry>5</connect-retry>
  117.                         </config>
  118.                     </timers>
  119.                     <transport>
  120.                         <config>
  121.                             <remote-port>179</remote-port>
  122.                             <passive-mode>false</passive-mode>
  123.                         </config>
  124.                     </transport>
  125.                     <config>
  126.                         <peer-group>/bgp/neighbors/neighbor/bgp/peer-groups/peer-group[peer-group-name="internal-neighbor"]</peer-group>
  127.                     </config>
  128.                 </neighbor>
  129.             </neighbors>
  130.             <peer-groups>
  131.                 <peer-group>
  132.                     <peer-group-name>internal-neighbor</peer-group-name>
  133.                     <config>
  134.                         <peer-type>INTERNAL</peer-type>
  135.                         <peer-as>50</peer-as>
  136.                     </config>
  137.                     <transport>
  138.                         <config>
  139.                             <remote-port>179</remote-port>
  140.                             <passive-mode>false</passive-mode>
  141.                         </config>
  142.                     </transport>
  143.                     <timers>
  144.                         <config>
  145.                             <hold-time>180</hold-time>
  146.                             <connect-retry>10</connect-retry>
  147.                         </config>
  148.                     </timers>
  149.                     <route-reflector>
  150.                         <config>
  151.                             <route-reflector-client>true</route-reflector-client>
  152.                         </config>
  153.                     </route-reflector>
  154.                     <graceful-restart>
  155.                         <config>
  156.                             <restart-time>60</restart-time>
  157.                         </config>
  158.                     </graceful-restart>
  159.                     <afi-safis>
  160.                         <afi-safi>
  161.                             <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
  162.                             <!--Advertise N Paths
  163.                             <receive>true</receive>
  164.                             <send-max>0</send-max>-->
  165.                         </afi-safi>
  166.                         <afi-safi>
  167.                             <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-UNICAST</afi-safi-name>
  168.                             <graceful-restart>
  169.                                 <config>
  170.                                     <enabled>true</enabled>
  171.                                 </config>
  172.                             </graceful-restart>
  173.                         </afi-safi>
  174.                         <afi-safi>
  175.                             <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-LABELLED-UNICAST</afi-safi-name>
  176.                             <graceful-restart>
  177.                                 <config>
  178.                                     <enabled>true</enabled>
  179.                                 </config>
  180.                             </graceful-restart>
  181.                         </afi-safi>
  182.                         <afi-safi>
  183.                             <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-LABELLED-UNICAST</afi-safi-name>
  184.                             <graceful-restart>
  185.                                 <config>
  186.                                     <enabled>true</enabled>
  187.                                 </config>
  188.                             </graceful-restart>
  189.                         </afi-safi>
  190.                         <afi-safi>
  191.                             <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-UNICAST</afi-safi-name>
  192.                             <graceful-restart>
  193.                                 <config>
  194.                                     <enabled>true</enabled>
  195.                                 </config>
  196.                             </graceful-restart>
  197.                         </afi-safi>
  198.                         <afi-safi>
  199.                             <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-UNICAST</afi-safi-name>
  200.                             <graceful-restart>
  201.                                 <config>
  202.                                     <enabled>true</enabled>
  203.                                 </config>
  204.                             </graceful-restart>
  205.                         </afi-safi>
  206.                         <afi-safi>
  207.                             <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-MULTICAST</afi-safi-name>
  208.                             <graceful-restart>
  209.                                 <config>
  210.                                     <enabled>true</enabled>
  211.                                 </config>
  212.                             </graceful-restart>
  213.                         </afi-safi>
  214.                         <afi-safi>
  215.                             <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-MULTICAST</afi-safi-name>
  216.                             <graceful-restart>
  217.                                 <config>
  218.                                     <enabled>true</enabled>
  219.                                 </config>
  220.                             </graceful-restart>
  221.                         </afi-safi>
  222.                         <afi-safi>
  223.                             <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L2VPN-EVPN</afi-safi-name>
  224.                             <graceful-restart>
  225.                                 <config>
  226.                                     <enabled>true</enabled>
  227.                                 </config>
  228.                             </graceful-restart>
  229.                         </afi-safi>
  230.                         <afi-safi>
  231.                             <afi-safi-name>LINKSTATE</afi-safi-name>
  232.                             <graceful-restart>
  233.                                 <config>
  234.                                     <enabled>true</enabled>
  235.                                 </config>
  236.                             </graceful-restart>
  237.                         </afi-safi>
  238.                         <afi-safi>
  239.                             <afi-safi-name>IPV4-FLOW</afi-safi-name>
  240.                             <graceful-restart>
  241.                                 <config>
  242.                                     <enabled>true</enabled>
  243.                                 </config>
  244.                             </graceful-restart>
  245.                         </afi-safi>
  246.                         <afi-safi>
  247.                             <afi-safi-name>IPV6-FLOW</afi-safi-name>
  248.                             <graceful-restart>
  249.                                 <config>
  250.                                     <enabled>true</enabled>
  251.                                 </config>
  252.                             </graceful-restart>
  253.                         </afi-safi>
  254.                         <afi-safi>
  255.                             <afi-safi-name>IPV4-L3VPN-FLOW</afi-safi-name>
  256.                             <graceful-restart>
  257.                                 <config>
  258.                                     <enabled>true</enabled>
  259.                                 </config>
  260.                             </graceful-restart>
  261.                         </afi-safi>
  262.                         <afi-safi>
  263.                             <afi-safi-name>IPV6-L3VPN-FLOW</afi-safi-name>
  264.                             <graceful-restart>
  265.                                 <config>
  266.                                     <enabled>true</enabled>
  267.                                 </config>
  268.                             </graceful-restart>
  269.                         </afi-safi>
  270.                         <afi-safi>
  271.                             <afi-safi-name>IPV4-MCAST-VPN</afi-safi-name>
  272.                             <graceful-restart>
  273.                                 <config>
  274.                                     <enabled>true</enabled>
  275.                                 </config>
  276.                             </graceful-restart>
  277.                         </afi-safi>
  278.                         <afi-safi>
  279.                             <afi-safi-name>IPV6-MCAST-VPN</afi-safi-name>
  280.                             <graceful-restart>
  281.                                 <config>
  282.                                     <enabled>true</enabled>
  283.                                 </config>
  284.                             </graceful-restart>
  285.                         </afi-safi>
  286.                         <afi-safi>
  287.                             <afi-safi-name>ROUTE-TARGET-CONSTRAIN</afi-safi-name>
  288.                             <graceful-restart>
  289.                                 <config>
  290.                                     <enabled>true</enabled>
  291.                                 </config>
  292.                             </graceful-restart>
  293.                         </afi-safi>
  294.                     </afi-safis>
  295.                 </peer-group>
  296.             </peer-groups>
  297.         </bgp>
  298.     </protocol>
  299. </protocols>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement