From f9215518f760b299f76dc0db18aeb89710eac623 Mon Sep 17 00:00:00 2001 From: Jesper Hess Nielsen Date: Sun, 14 Oct 2018 10:27:14 +0200 Subject: [PATCH] Cleaning up stuff, renaming things a little --- bgp4.conf | 8 +++----- bgp6.conf | 6 +++--- bird.conf | 8 ++++---- filter4.conf | 2 +- filter6.conf | 2 +- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/bgp4.conf b/bgp4.conf index 067764d..c68ba50 100644 --- a/bgp4.conf +++ b/bgp4.conf @@ -1,9 +1,9 @@ -template bgp dnpeers { +template bgp dn42peer { local as OWNAS; table T_BGP; path metric 1; import keep filtered; - import where dnpeers_import_policy(); + import where dn42peer_import_policy(); export filter { if is_valid_network() then { accept; @@ -12,14 +12,12 @@ template bgp dnpeers { }; }; -template bgp iBGP_Peer { +template bgp ibgppeer { local as OWNAS; hold time 15; igp table T_OSPF; path metric on; import keep filtered; -# import where iBGP_import_peer_policy(); -# export where iBGP_export_peer_policy(); import all; export all; source address OWNIP_IBGP; diff --git a/bgp6.conf b/bgp6.conf index 7f85351..4ceae57 100644 --- a/bgp6.conf +++ b/bgp6.conf @@ -1,9 +1,9 @@ -template bgp dnpeers { +template bgp dn42peer { local as OWNAS; table T_BGP; path metric 1; import keep filtered on; - import where dnpeers_import_policy(); + import where dn42peer_import_policy(); export filter { if is_valid_network() then { accept; @@ -12,7 +12,7 @@ template bgp dnpeers { }; }; -template bgp iBGP_Peer { +template bgp ibgppeer { local as OWNAS; hold time 15; igp table T_OSPF; diff --git a/bird.conf b/bird.conf index abf1fc1..8ab2772 100644 --- a/bird.conf +++ b/bird.conf @@ -1,4 +1,5 @@ log "/var/log/bird.log" { debug, trace, info, remote, warning, error, auth, fatal, bug }; + table T_BGP; table T_OSPF; @@ -12,10 +13,6 @@ protocol static { export none; } -include "/etc/bird/local4.conf"; -include "/etc/bird/filter4.conf"; -include "/etc/bird/community_filters.conf"; - protocol kernel { scan time 20; metric 64; # Use explicit kernel route metric to avoid collisions @@ -29,6 +26,9 @@ protocol kernel { }; } +include "/etc/bird/local4.conf"; +include "/etc/bird/filter4.conf"; +include "/etc/bird/community_filters.conf"; include "/etc/bird/ospf4.conf"; include "/etc/bird/bgp4.conf"; include "/etc/bird/peers4/*"; diff --git a/filter4.conf b/filter4.conf index 86ecacc..1ce7a1d 100644 --- a/filter4.conf +++ b/filter4.conf @@ -34,7 +34,7 @@ function import_filter_networks() { return false; } -function dnpeers_import_policy() { +function dn42peer_import_policy() { if(!check_roa()) then return false; if(!import_filter_networks()) then return false; } \ No newline at end of file diff --git a/filter6.conf b/filter6.conf index cd28212..1630403 100644 --- a/filter6.conf +++ b/filter6.conf @@ -27,7 +27,7 @@ function import_filter_networks() { return false; } -function dnpeers_import_policy() { +function dn42peer_import_policy() { if(!check_roa()) then return false; if(!import_filter_networks()) then return false; } \ No newline at end of file