mirror of
https://gitlab.com/bauen1/dn42-roagen
synced 2024-05-11 05:55:36 +00:00
Add usage to README
This commit is contained in:
33
README.md
33
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.
|
||||
|
Reference in New Issue
Block a user