JNPRAutomate / ansible-junos-evpn-vxlan

Sample project that use Ansible and Jinja2 template to automatically generate configurations for Juniper devices deploy in EVPN/VXLAN fabric mode
MIT License
91 stars 64 forks source link

OSPF role fixes #46

Open nitzan-tz opened 7 years ago

nitzan-tz commented 7 years ago

Hi Demian

i will start to add issues for the changes I made Under the OSPF role (roles/underlay-ospf/templates/main.conf.j2 )

The {{ host.loopback.ip }} var is not defined

-    router-id {{ host.loopback.ip }};
+    router-id {{ loopback_ip }};

Under the ospf interfaces I add bfd and authentication

 {% for neighbor in underlay.neighbors %}
-            interface {{ neighbor.interface }};
+            interface {{ neighbor.interface }} {
+                               interface-type p2p;
+                               hello-interval 3;
+                               authentication {
+                                       md5 2 key "{{ underlay_ospf_pass_hash }}";
+                               }
+                               bfd-liveness-detection {
+                                       version automatic;
+                                       minimum-interval 300;
+                                       multiplier 3;
+                                       detection-time {
+                                               threshold 1000;
+                                       }
+                               }
+                       }
+
+
 {% endfor %}

For 100g interfaces on qfx10K you have to define the speed in under chassis so I add speed var to the topology

+{% for neighbor in underlay.neighbors %}
+{% if neighbor.speed is defined and neighbor.speed == "100g" %}
+chassis {
+    fpc {{ neighbor.interface.split('/')[-3].split('-')[-1] }} {
+        pic {{ neighbor.interface.split('/')[-2] }} {
+            port {{ neighbor.interface.split('/')[-1] }} {
+                speed 100g;
+            }
+        }
+    }
+}
+{% endif %}
+{% endfor %}

Thanks

Nitzan

dgarros commented 7 years ago

Thanks @nitzan-tz for reporting these issues.

The first 2 seems straightforward to me and should be added to the OSPF role absolutely, any chance you can provide a pull request for that ?

The last one, I think it's not specific to OSPF so it might not be the best place to add that. Not sure of it should be part of common or if it should be part of another roles.

BTW, I saw that you created some new roles for analytics and sflow etc ... it's great and I would suggest to contribute these into another repo that is more generic than this one. I already have few of them there https://github.com/JNPRautomate/ansible-lib-roles

Adding @trmccart @ksator @mpergament to help moving forward.

nitzan-tz commented 7 years ago

I will create a pull request I agree that the 100g part is more generic and maybe I will create a separate role for it if I think about it I should also check for the exact platform