summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorPavel Tvrdik <pawel.tvrdik@gmail.com>2016-11-30 10:11:12 +0100
committerPavel Tvrdik <pawel.tvrdik@gmail.com>2016-11-30 11:57:35 +0100
commit4abe781c27abea5f8dd0e041106ea6511c210cb7 (patch)
treeb8ffe594eb5d973747b65b457d7869035ab86385 /filter
parent012a0d6bf8761253c67c40ac236e27b2f6b6ce43 (diff)
Remove filter/test_bgp_filtering.conf file
It was an example filtering configuration from BIRD's wiki.
Diffstat (limited to 'filter')
-rw-r--r--filter/test_bgp_filtering.conf113
1 files changed, 0 insertions, 113 deletions
diff --git a/filter/test_bgp_filtering.conf b/filter/test_bgp_filtering.conf
deleted file mode 100644
index 573cad46..00000000
--- a/filter/test_bgp_filtering.conf
+++ /dev/null
@@ -1,113 +0,0 @@
-router id 62.168.0.1;
-
-function net_martian()
-{
- return net ~ [ 169.254.0.0/16+, 172.16.0.0/12+, 192.168.0.0/16+, 10.0.0.0/8+,
- 127.0.0.0/8+, 224.0.0.0/4+, 240.0.0.0/4+, 0.0.0.0/32-, 0.0.0.0/0{25,32}, 0.0.0.0/0{0,7} ];
-}
-
-function net_local()
-{
- return net ~ [ 12.10.0.0/16+, 34.10.0.0/16+ ];
-}
-
-function rt_import(int asn; int set peer_asns; prefix set peer_nets)
-{
- if ! (net ~ peer_nets) then return false;
- if ! (bgp_path.last ~ peer_asns) then return false;
- if bgp_path.first != asn then return false;
- if bgp_path.len > 64 then return false;
- if bgp_next_hop != from then return false;
- return true;
-}
-
-function rt_import_all(int asn)
-{
- if net_martian() || net_local() then return false;
- if bgp_path.first != asn then return false;
- if bgp_path.len > 64 then return false;
- if bgp_next_hop != from then return false;
- return true;
-}
-
-function rt_import_rs(int asn)
-{
- if net_martian() || net_local() then return false;
- if bgp_path.len > 64 then return false;
- return true;
-}
-
-function rt_export()
-{
- if proto = "static_bgp" then return true;
- if source != RTS_BGP then return false;
- if net_martian() then return false;
- if bgp_path.len > 64 then return false;
- # return bgp_next_hop ~ [ 100.1.1.1, 100.1.1.2, 200.1.1.1 ];
- return bgp_path.first ~ [ 345, 346 ];
-}
-
-
-function rt_export_all()
-{
- if proto = "static_bgp" then return true;
- if source != RTS_BGP then return false;
- if net_martian() then return false;
- if bgp_path.len > 64 then return false;
- return true;
-}
-
-filter bgp_in_uplink_123
-{
- if ! rt_import_all(123) then reject;
- accept;
-}
-
-filter bgp_out_uplink_123
-{
- if ! rt_export() then reject;
- accept;
-}
-
-
-filter bgp_in_peer_234
-{
- if ! rt_import(234, [ 234, 1234, 2345, 3456 ],
- [ 12.34.0.0/16, 23.34.0.0/16, 34.56.0.0/16 ])
- then reject;
- accept;
-}
-
-filter bgp_out_peer_234
-{
- if ! rt_export() then reject;
- accept;
-}
-
-filter bgp_in_rs
-{
- if ! rt_import_rs(bgp_path.last) then reject;
- accept;
-}
-
-filter bgp_out_rs
-{
- if ! rt_export() then reject;
- accept;
-}
-
-
-filter bgp_in_client_345
-{
- if ! rt_import(345, [ 345 ], [ 34.5.0.0/16 ]) then reject;
- accept;
-}
-
-filter bgp_out_client_345
-{
- if ! rt_export_all() then reject;
- accept;
-}
-
-
-