diff --git a/templates/bird.conf b/templates/bird.conf index df9b12b..bb32f7f 100644 --- a/templates/bird.conf +++ b/templates/bird.conf @@ -11,7 +11,15 @@ protocol kernel { }; } -protocol ospf v3 { +protocol kernel { + ipv6 { + preference 100; + import none; + export all; + }; +} + +protocol ospf v2 { ipv4 { preference 10; import all; @@ -27,3 +35,19 @@ protocol ospf v3 { }; } +protocol ospf v3 { + ipv6 { + preference 10; + import all; + export all; + }; + area 0 { +{% for br in c.bridges %} + interface "net_{{br.num}}" { + cost 10; + type broadcast; + }; +{% endfor %} + }; +} + diff --git a/templates/hosts b/templates/hosts index 1d4ef8f..80df398 100644 --- a/templates/hosts +++ b/templates/hosts @@ -1,5 +1,6 @@ {% for br in c.bridges %} 172.23.{{ br.num }}.{{ c.num }} host-{{ c.name }}-net-{{ br.num }} +fdce:73a4:0b00:{{ "%x" % (br.num) }}::{{ "%x" % (c.num) }} host-{{ c.name }}-net-{{ br.num }}-v6 {% endfor %} 127.0.0.1 host-{{ c.name }} localhost localhost.localdomain ::1 host-{{ c.name }} localhost localhost.localdomain diff --git a/templates/interfaces b/templates/interfaces index 6684108..ec2360f 100644 --- a/templates/interfaces +++ b/templates/interfaces @@ -6,5 +6,7 @@ auto net_{{ br.num }} iface net_{{br.num}} inet static pre-up nameif -s address 172.23.{{ br.num }}.{{ c.num }}/24 +iface net_{{br.num}} inet6 static + address fdce:73a4:0b00:{{ "%x" % (br.num) }}::{{ "%x" % (c.num) }}/64 {% endfor %} diff --git a/templates/routing.conf b/templates/routing.conf index dbf552b..c3fea02 100644 --- a/templates/routing.conf +++ b/templates/routing.conf @@ -1 +1,2 @@ net.ipv4.conf.all.forwarding=1 +net.ipv6.conf.all.forwarding=1