diff --git a/proto/aggregator/bird.conf b/proto/aggregator/bird.conf new file mode 100644 index 00000000..db8da401 --- /dev/null +++ b/proto/aggregator/bird.conf @@ -0,0 +1,30 @@ + +debug protocols all; +debug channels all; + +log "bird.log" all; + +ipv4 table aggregated; + +protocol device {} +#router id 1; + +attribute int distinguisher; + +protocol static { + ipv4 { + import filter { distinguisher = 9; accept; }; + }; + + route 10.100.0.0/16 unreachable; +} + +protocol aggregator { + table master4; + peer table aggregated; + export filter { print net; accept; }; + aggregate on distinguisher, net; + merge by { accept; }; + # defualt route unrechable; +} + diff --git a/proto/aggregator/run_test_case.sh b/proto/aggregator/run_test_case.sh new file mode 100755 index 00000000..05a91c2d --- /dev/null +++ b/proto/aggregator/run_test_case.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +dir_name="trie-test-case" + +cd ../.. +make all +echo '------------------------' + +if [[ ! -e "$dir_name" ]]; then + mkdir "$dir_name" + echo "creating directory '$dir_name'" +fi + +cp ./bird ./"$dir_name" +echo 'copying bird executable' + +cp ./birdc ./"$dir_name" +echo 'copying birdc executable' + +cp ./proto/aggregator/bird.conf ./"$dir_name" +echo 'copying bird.conf' + +cd "$dir_name" + +echo 'done' +echo +echo 'expected result: 10.100.0.0/16'