Browse Source

Enable IPv6 BGP sessions to FFRL

Markus Lindenberg 9 years ago
parent
commit
7fa0ea6682

+ 7 - 0
roles/gateway-peering/handlers/bird.yml

@@ -0,0 +1,7 @@
+---
+
+- name: Reload bird daemons
+  service: name={{item}} state=reloaded
+  with_items:
+  - bird
+  - bird6

+ 3 - 0
roles/gateway-peering/handlers/main.yml

@@ -0,0 +1,3 @@
+---
+
+- include: bird.yml

+ 6 - 7
roles/gateway-peering/tasks/main.yml

@@ -1,7 +1,6 @@
 ---
-# tasks file for peering
 
-- name: Install interface definitions
+- name: Install GRE uplink tunnel interfaces
   template:
     dest: "/etc/network/interfaces.d/{{item.file}}"
     src: "{{item.template}}"
@@ -9,10 +8,10 @@
   - file: 30_peering.cfg
     template: peering_interfaces.j2
 
-# - name: Install bird.conf
-#   template: src=bird.conf.j2 dest=/etc/bird/conf.d/peering.conf
-#   notify: Reload bird daemons
+- name: Install Bird6 configuration for eBGP
+  template: src=peering6.conf.j2 dest=/etc/bird/conf6.d/peering6.conf
+  notify: Reload bird daemons
 
-# - name: Install bird6.conf
-#   template: src=bird6.conf.j2 dest=/etc/bird/conf6.d/peering.conf
+# - name: Install Bird configuration for eBGP
+#   template: src=peering.conf.j2 dest=/etc/bird/conf.d/peering.conf
 #   notify: Reload bird daemons

+ 0 - 22
roles/gateway-peering/templates/bird6.conf.j2

@@ -1,22 +0,0 @@
-#
-# This file is managed by ansible. Do not edit by hand!
-#
-
-template bgp uplink {
-        local as {{as}};
-        import all;
-        export all;
-        next hop self;
-        direct;
-        multihop 64;
-}
-
-{% if peers is defined %}
-{% for peer in peers %}
-protocol bgp {{peer.name}} from uplink {
-        neighbor {{peer.peer_ipv6}} as {{peer.as}};
-        default bgp_med 2;
-}
-
-{% endfor %}
-{% endif %}

roles/gateway-peering/templates/bird.conf.j2 → roles/gateway-peering/templates/peering.conf.j2


+ 14 - 0
roles/gateway-peering/templates/peering6.conf.j2

@@ -0,0 +1,14 @@
+template bgp uplink {
+        local as {{as}};
+        import where net ~ [::/0];
+        export where net ~ {{ ipv6_network }};
+}
+
+{% if peers is defined %}
+{% for peer in peers %}
+protocol bgp '{{ peer.name }}' from uplink {
+        neighbor {{ peer.peer_ipv6|ipaddr('address') }} as {{ peer.as }};
+}
+
+{% endfor %}
+{% endif %}

+ 2 - 2
roles/mesh-batman/templates/batman6.conf.j2

@@ -1,8 +1,8 @@
-protocol direct direct_bat0 {
+protocol direct bat0 {
 	interface "bat0";
 }
 
-protocol radv radv_bat0 {
+protocol radv ra_bat0 {
 	interface "bat0";
 	rdnss {{mesh_ipv6_address|ipaddr('address')}};
 {% for host in groups['supernodes'] %}

+ 2 - 2
roles/mesh-interfaces/templates/igp6.conf.j2

@@ -1,4 +1,4 @@
-protocol static blackhole_mynetwork {
+protocol static bh_mynet {
     preference 1;
     route {{ ipv6_network }} blackhole;
 };
@@ -12,5 +12,5 @@ protocol ospf IGP_OSPF {
     };
 
     import all;
-    export filter static_routes;
+    export where source != RTS_STATIC;
 }

+ 1 - 8
roles/mesh-routing/templates/bird6.conf.j2

@@ -14,16 +14,9 @@ protocol device {
     scan time 10;
 };
 
-protocol static unreachable_default {
+protocol static unr_def {
     preference 1;
     route ::/0 unreachable;
 };
 
-filter static_routes {
-	if source = RTS_STATIC then
-		reject;
-	else
-		accept;
-};
-
 include "/etc/bird/conf6.d/*.conf";