diff --git a/manifests/init.pp b/manifests/init.pp index 35dae3a..3c88009 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -35,6 +35,7 @@ class ff_gw($ff_net, $ff_mesh_net, $ff_as, $mesh_mac, $gw_ipv4, $gw_ipv6, $secre own_ipv4 => $gw_ipv4, own_ipv6 => $gw_ipv6, gw_do_ic_peering => $gw_do_ic_peering, + ic_vpn_ip6 => $ic_vpn_ip6, } if $gw_do_ic_peering { diff --git a/templates/etc/bird/bird6.conf.erb b/templates/etc/bird/bird6.conf.erb index 1f73075..dca6927 100644 --- a/templates/etc/bird/bird6.conf.erb +++ b/templates/etc/bird/bird6.conf.erb @@ -53,25 +53,16 @@ protocol pipe pipe_ffhh { }; # template for internal routing -template bgp bgp_ibgp { +template bgp locals { table ffhh; local as 65112; source address <%= @own_ipv6 %>; import all; export where source = RTS_BGP; - gateway direct; + direct; next hop self; }; -# icvpn template for hamburg03 -template bgp bgp_icvpn { - local as 65112; - source address <%= @own_ipv6 %>; - table ffhh; - import where is_ula(); - export where is_self() || (source = RTS_BGP); -}; - <% @peerings_v6.each_pair do |key, hash| -%><% if hash["ip"] != @own_ipv6 -%> protocol bgp <%= key %> from <%= hash["template"] %> { neighbor <%= hash["ip"] %> as <%= hash["as"] %>; @@ -79,6 +70,15 @@ protocol bgp <%= key %> from <%= hash["template"] %> { <% end -%><% end -%> <% if @gw_do_ic_peering -%> +# icvpn template for hamburg03 +template bgp peers { + local as 65112; + source address <%= @ic_vpn_ip6 %>; + table ffhh; + import where is_ula(); + export where is_self() || (source = RTS_BGP); +}; + <% @ic_peerings_v6.each_pair do |key, hash| -%><% if hash["ip"] != @own_ipv6 -%> protocol bgp <%= key %> from <%= hash["template"] %> { neighbor <%= hash["ip"] %> as <%= hash["as"] %>;