PANTHEONtech

[lighty.io] BGP-RR Configuration

Aug 22nd, 2019
258
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PUT: http://172.20.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>bgp-rr</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.20.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. <!--Advertise N Paths
  29. <receive>true</receive>
  30. <send-max>2</send-max>-->
  31. </afi-safi>
  32. <afi-safi>
  33. <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-UNICAST</afi-safi-name>
  34. </afi-safi>
  35. <afi-safi>
  36. <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-LABELLED-UNICAST</afi-safi-name>
  37. </afi-safi>
  38. <afi-safi>
  39. <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-LABELLED-UNICAST</afi-safi-name>
  40. </afi-safi>
  41. <afi-safi>
  42. <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-UNICAST</afi-safi-name>
  43. </afi-safi>
  44. <afi-safi>
  45. <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-UNICAST</afi-safi-name>
  46. </afi-safi>
  47. <afi-safi>
  48. <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-MULTICAST</afi-safi-name>
  49. </afi-safi>
  50. <afi-safi>
  51. <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-MULTICAST</afi-safi-name>
  52. </afi-safi>
  53. <afi-safi>
  54. <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L2VPN-EVPN</afi-safi-name>
  55. </afi-safi>
  56. <afi-safi>
  57. <afi-safi-name>LINKSTATE</afi-safi-name>
  58. </afi-safi>
  59. <afi-safi>
  60. <afi-safi-name>IPV4-FLOW</afi-safi-name>
  61. </afi-safi>
  62. <afi-safi>
  63. <afi-safi-name>IPV6-FLOW</afi-safi-name>
  64. </afi-safi>
  65. <afi-safi>
  66. <afi-safi-name>IPV4-L3VPN-FLOW</afi-safi-name>
  67. </afi-safi>
  68. <afi-safi>
  69. <afi-safi-name>IPV6-L3VPN-FLOW</afi-safi-name>
  70. </afi-safi>
  71. <afi-safi>
  72. <afi-safi-name>IPV4-MCAST-VPN</afi-safi-name>
  73. </afi-safi>
  74. <afi-safi>
  75. <afi-safi-name>IPV6-MCAST-VPN</afi-safi-name>
  76. </afi-safi>
  77. <afi-safi>
  78. <afi-safi-name>ROUTE-TARGET-CONSTRAIN</afi-safi-name>
  79. </afi-safi>
  80. </afi-safis>
  81. </global>
  82. <neighbors>
  83. <neighbor>
  84. <!-- ip address of neighbor -->
  85. <neighbor-address>172.20.0.2</neighbor-address>
  86. <route-reflector>
  87. <config>
  88. <route-reflector-client>true</route-reflector-client>
  89. </config>
  90. </route-reflector>
  91. <timers>
  92. <config>
  93. <hold-time>180</hold-time>
  94. <connect-retry>5</connect-retry>
  95. </config>
  96. </timers>
  97. <transport>
  98. <config>
  99. <remote-port>179</remote-port>
  100. <passive-mode>false</passive-mode>
  101. </config>
  102. </transport>
  103. <config>
  104. <!-- there is a lot of configuration that is common to multiple neighbors, such a configuration is in the peer-group -->
  105. <peer-group>/bgp/neighbors/neighbor/bgp/peer-groups/peer-group[peer-group-name="internal-neighbor"]</peer-group>
  106. </config>
  107. </neighbor>
  108. <neighbor>
  109. <neighbor-address>172.20.0.3</neighbor-address>
  110. <route-reflector>
  111. <config>
  112. <route-reflector-client>true</route-reflector-client>
  113. </config>
  114. </route-reflector>
  115. <timers>
  116. <config>
  117. <hold-time>180</hold-time>
  118. <connect-retry>5</connect-retry>
  119. </config>
  120. </timers>
  121. <transport>
  122. <config>
  123. <remote-port>179</remote-port>
  124. <passive-mode>false</passive-mode>
  125. </config>
  126. </transport>
  127. <config>
  128. <peer-group>/bgp/neighbors/neighbor/bgp/peer-groups/peer-group[peer-group-name="internal-neighbor"]</peer-group>
  129. </config>
  130. </neighbor>
  131. </neighbors>
  132. <peer-groups>
  133. <peer-group>
  134. <peer-group-name>internal-neighbor</peer-group-name>
  135. <config>
  136. <peer-type>INTERNAL</peer-type>
  137. <peer-as>50</peer-as>
  138. </config>
  139. <transport>
  140. <config>
  141. <remote-port>179</remote-port>
  142. <passive-mode>false</passive-mode>
  143. </config>
  144. </transport>
  145. <timers>
  146. <config>
  147. <hold-time>180</hold-time>
  148. <connect-retry>10</connect-retry>
  149. </config>
  150. </timers>
  151. <route-reflector>
  152. <config>
  153. <route-reflector-client>true</route-reflector-client>
  154. </config>
  155. </route-reflector>
  156. <graceful-restart>
  157. <config>
  158. <restart-time>60</restart-time>
  159. </config>
  160. </graceful-restart>
  161. <afi-safis>
  162. <afi-safi>
  163. <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
  164. <!--Advertise N Paths
  165. <receive>true</receive>
  166. <send-max>0</send-max>-->
  167. </afi-safi>
  168. <afi-safi>
  169. <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-UNICAST</afi-safi-name>
  170. <graceful-restart>
  171. <config>
  172. <enabled>true</enabled>
  173. </config>
  174. </graceful-restart>
  175. </afi-safi>
  176. <afi-safi>
  177. <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-LABELLED-UNICAST</afi-safi-name>
  178. <graceful-restart>
  179. <config>
  180. <enabled>true</enabled>
  181. </config>
  182. </graceful-restart>
  183. </afi-safi>
  184. <afi-safi>
  185. <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-LABELLED-UNICAST</afi-safi-name>
  186. <graceful-restart>
  187. <config>
  188. <enabled>true</enabled>
  189. </config>
  190. </graceful-restart>
  191. </afi-safi>
  192. <afi-safi>
  193. <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-UNICAST</afi-safi-name>
  194. <graceful-restart>
  195. <config>
  196. <enabled>true</enabled>
  197. </config>
  198. </graceful-restart>
  199. </afi-safi>
  200. <afi-safi>
  201. <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-UNICAST</afi-safi-name>
  202. <graceful-restart>
  203. <config>
  204. <enabled>true</enabled>
  205. </config>
  206. </graceful-restart>
  207. </afi-safi>
  208. <afi-safi>
  209. <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-MULTICAST</afi-safi-name>
  210. <graceful-restart>
  211. <config>
  212. <enabled>true</enabled>
  213. </config>
  214. </graceful-restart>
  215. </afi-safi>
  216. <afi-safi>
  217. <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-MULTICAST</afi-safi-name>
  218. <graceful-restart>
  219. <config>
  220. <enabled>true</enabled>
  221. </config>
  222. </graceful-restart>
  223. </afi-safi>
  224. <afi-safi>
  225. <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L2VPN-EVPN</afi-safi-name>
  226. <graceful-restart>
  227. <config>
  228. <enabled>true</enabled>
  229. </config>
  230. </graceful-restart>
  231. </afi-safi>
  232. <afi-safi>
  233. <afi-safi-name>LINKSTATE</afi-safi-name>
  234. <graceful-restart>
  235. <config>
  236. <enabled>true</enabled>
  237. </config>
  238. </graceful-restart>
  239. </afi-safi>
  240. <afi-safi>
  241. <afi-safi-name>IPV4-FLOW</afi-safi-name>
  242. <graceful-restart>
  243. <config>
  244. <enabled>true</enabled>
  245. </config>
  246. </graceful-restart>
  247. </afi-safi>
  248. <afi-safi>
  249. <afi-safi-name>IPV6-FLOW</afi-safi-name>
  250. <graceful-restart>
  251. <config>
  252. <enabled>true</enabled>
  253. </config>
  254. </graceful-restart>
  255. </afi-safi>
  256. <afi-safi>
  257. <afi-safi-name>IPV4-L3VPN-FLOW</afi-safi-name>
  258. <graceful-restart>
  259. <config>
  260. <enabled>true</enabled>
  261. </config>
  262. </graceful-restart>
  263. </afi-safi>
  264. <afi-safi>
  265. <afi-safi-name>IPV6-L3VPN-FLOW</afi-safi-name>
  266. <graceful-restart>
  267. <config>
  268. <enabled>true</enabled>
  269. </config>
  270. </graceful-restart>
  271. </afi-safi>
  272. <afi-safi>
  273. <afi-safi-name>IPV4-MCAST-VPN</afi-safi-name>
  274. <graceful-restart>
  275. <config>
  276. <enabled>true</enabled>
  277. </config>
  278. </graceful-restart>
  279. </afi-safi>
  280. <afi-safi>
  281. <afi-safi-name>IPV6-MCAST-VPN</afi-safi-name>
  282. <graceful-restart>
  283. <config>
  284. <enabled>true</enabled>
  285. </config>
  286. </graceful-restart>
  287. </afi-safi>
  288. <afi-safi>
  289. <afi-safi-name>ROUTE-TARGET-CONSTRAIN</afi-safi-name>
  290. <graceful-restart>
  291. <config>
  292. <enabled>true</enabled>
  293. </config>
  294. </graceful-restart>
  295. </afi-safi>
  296. </afi-safis>
  297. </peer-group>
  298. </peer-groups>
  299. </bgp>
  300. </protocol>
  301. </protocols>
RAW Paste Data