diff options
author | Asbjørn Sloth Tønnesen <asbjorn@labitat.dk> | 2021-06-18 21:35:52 +0000 |
---|---|---|
committer | Asbjørn Sloth Tønnesen <asbjorn@labitat.dk> | 2021-06-18 22:39:48 +0000 |
commit | f6361901625aae13992670bd385ca2e67310f1b4 (patch) | |
tree | 393f8f58265f0cf983ab47b22a1ef4d7ea9ea3bd | |
parent | 6456863d1350340a8d6cfad183332e80b334bd8d (diff) | |
download | labitat-ansible-f6361901625aae13992670bd385ca2e67310f1b4.tar.gz labitat-ansible-f6361901625aae13992670bd385ca2e67310f1b4.tar.xz labitat-ansible-f6361901625aae13992670bd385ca2e67310f1b4.zip |
space_server: bird: set communities on import
Assign large communities on prefix import.
Later we can then use the community, to decide if we should
announce it to our peers.
-rw-r--r-- | roles/space_server/files/bird.conf | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/roles/space_server/files/bird.conf b/roles/space_server/files/bird.conf index 5e48427..a23a7bf 100644 --- a/roles/space_server/files/bird.conf +++ b/roles/space_server/files/bird.conf @@ -109,6 +109,7 @@ function honor_graceful_shutdown() filter transit_import { honor_graceful_shutdown(); + set_peer_type(lc_type_transit); accept; } @@ -117,14 +118,23 @@ filter transit_export { reject; } +filter import_originating { + set_peer_type(lc_type_originate); + accept; +} + # generate local routes protocol static static4 { - ipv4; + ipv4 { + import filter import_originating; + }; route 185.38.175.0/24 unreachable; } protocol static static6 { - ipv6; + ipv6 { + import filter import_originating; + }; route 2a01:4262:1ab::/48 unreachable; } @@ -132,6 +142,7 @@ protocol static static6 { function customer_import(int peer_asn; prefix set peer_prefixes) { if net !~ peer_prefixes then reject; if bgp_path.first != peer_asn then reject; + set_peer_type(lc_type_customer); accept; } |