From 49f970310ae52646a90c61c08963a8e27e569eb0 Mon Sep 17 00:00:00 2001 From: bauen1 Date: Wed, 13 May 2020 12:10:22 +0200 Subject: [PATCH] Add usage to README --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index 6debab6..e5784e6 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,36 @@ Generate bird 2.0 roa entries from the dn42 registry. 1. Install `cargo-deb`: `cargo install cargo-deb` 2. Build dpkg: `cargo deb` + +## Usage + +Add +```bird + +roa4 table dn42_roa4; +roa6 table dn42_roa6; + +protocol static { + roa4 { + table dn42_roa4; + }; + + roa6 { + table dn42_roa6; + }; + + include "/var/lib/bird/dn42-roa46.conf"; +}; +``` +to your bird config. +You can now use +``` +if (roa_check(dn42_roa4, net, bgp_path.last) != ROA_VALID) then { + reject; +} + +if (roa_check(dn42_roa6, net, bgp_path.last) != ROA_VALID) then { + reject; +} +``` +to reject any routes without a matching and valid roa entry.