From 75295d9eca64694991ea09360fc4a501edddd57c Mon Sep 17 00:00:00 2001 From: graffen Date: Sat, 8 Sep 2018 11:16:50 +0000 Subject: [PATCH] Move ospf config to its own file --- bird.conf | 20 ++------------------ ospf.conf | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 ospf.conf diff --git a/bird.conf b/bird.conf index 0f2e85f..e7059c4 100644 --- a/bird.conf +++ b/bird.conf @@ -3,6 +3,7 @@ protocol device { } protocol static { + route 172.20.0.0/14 via 172.20.170.192; route 172.20.170.192/28 reject; import all; export none; @@ -28,24 +29,7 @@ protocol kernel { }; } -filter filter_OSPF { - if net = 172.20.170.192/28 then accept; - else reject; -}; - -protocol ospf { - import all; - export all; - - area 0 { - - include "/etc/bird/interfaces/*"; - - interface "lo" { - stub; - }; - }; -} +include "/etc/bird/ospf.conf"; template bgp dnpeers { local as OWNAS; diff --git a/ospf.conf b/ospf.conf new file mode 100644 index 0000000..81ae23b --- /dev/null +++ b/ospf.conf @@ -0,0 +1,21 @@ +filter filter_OSPF { + ospf_metric1 = 1000; + if source = RTS_STATIC then accept; + else reject; +}; + + +protocol ospf { + import all; + export filter filter_OSPF; + + area 0 { + interface "wg-ospf-*" { +# authentication cryptographic; password "R5fg2d66hTuP"; + }; + + interface "lo" { + stub; + }; + }; +}