From c85fa8d9f1755afc3309cd9a5847256a308ea5fa Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Tue, 23 Jan 2018 18:51:45 +0100 Subject: [PATCH] bird: IPv6 backbone L3 routing --- roles/bird/tasks/main.yml | 12 ++++++++---- roles/bird/templates/bird.conf.j2 | 2 +- roles/bird/templates/bird6.conf.j2 | 29 +++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 roles/bird/templates/bird6.conf.j2 diff --git a/roles/bird/tasks/main.yml b/roles/bird/tasks/main.yml index c014448..4581749 100644 --- a/roles/bird/tasks/main.yml +++ b/roles/bird/tasks/main.yml @@ -1,14 +1,18 @@ --- - name: Install bird - apt: package={{ item }} - with_items: - - bird - - bird6 + apt: package=bird - name: Configure bird template: src=bird.conf.j2 dest=/etc/bird/bird.conf notify: Restart bird +- name: Configure bird6 + template: src=bird6.conf.j2 dest=/etc/bird/bird6.conf + notify: Restart bird6 + - name: Enable bird service: name=bird state=started enabled=yes + +- name: Enable bird6 + service: name=bird6 state=started enabled=yes diff --git a/roles/bird/templates/bird.conf.j2 b/roles/bird/templates/bird.conf.j2 index 3825cdd..d9fe2b5 100644 --- a/roles/bird/templates/bird.conf.j2 +++ b/roles/bird/templates/bird.conf.j2 @@ -7,7 +7,7 @@ router id {{ ansible_default_ipv4.address }}; timeformat protocol iso long; protocol device { - scan time 10; + scan time 10; } protocol kernel { diff --git a/roles/bird/templates/bird6.conf.j2 b/roles/bird/templates/bird6.conf.j2 new file mode 100644 index 0000000..d9fe2b5 --- /dev/null +++ b/roles/bird/templates/bird6.conf.j2 @@ -0,0 +1,29 @@ +# {{ ansible_managed }} + +log syslog all; + +router id {{ ansible_default_ipv4.address }}; + +timeformat protocol iso long; + +protocol device { + scan time 10; +} + +protocol kernel { + metric 64; # Use explicit kernel route metric to avoid collisions + # with non-BIRD routes in the kernel routing table + import none; + export all; # Actually insert routes into the kernel routing table +} + +protocol ospf bbmesh { + area 0 { + interface "br-*" { + stub yes; + }; + interface "tun-*" { + type ptp; + }; + }; +}