-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
46 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
#lang racket | ||
'(set firewall (global-options state-policy | ||
(established action accept) | ||
(related action accept) | ||
(invalid action accept)) | ||
(group network-group | ||
(dn42-allowed-transit-v4 network ("10.0.0.0/8" "172.20.0.0/14" "172.31.0.0/16")))) | ||
|
||
(require "util.rkt") | ||
|
||
(commandtree->string | ||
'(set firewall | ||
(global-options state-policy [(established action accept) | ||
(related action accept) | ||
(invalid action accept)]) | ||
(group network-group | ||
(dn42-allowed-transit-v4 network | ||
("10.0.0.0/8") | ||
("172.20.0.0/14") | ||
("172.31.0.0/16"))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#lang racket | ||
|
||
(define bgp-afs '(ipv4-unicast ipv6-unicast)) | ||
(define dn42-roa-route-map "dn42-roa") | ||
|
||
(define (dn42-bgp-group) | ||
`[(delete protocols bgp peer-group dn42) | ||
(set protocols bgp peer-group dn42 | ||
[(capability extended-nexthop) | ||
,(for/list ([af bgp-afs]) | ||
`(,af [(route-map export ,dn42-roa-route-map) | ||
(route-map import ,dn42-roa-route-map) | ||
(soft-reconfiguration inbound)]))])]) | ||
|
||
(define (dn42-route-collector) | ||
(define addr "fd42:4242:2601:ac12::1") | ||
(define routemap 'deny-all) | ||
|
||
`[(delete policy route-map ,routemap) | ||
(set policy route-map ,routemap rule 1 action deny) | ||
|
||
(delete protocols bgp neighbor ,addr) | ||
(set protocols bgp neighbor ,addr | ||
[(capability extended-nexthop) | ||
,(for/list ([af bgp-afs]) `(address-family ,af route-map import ,routemap)) | ||
(description "https://lg.collector.dn42") | ||
(ebgp-multihop 10) | ||
(remote-as 4242422602)])]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters