Initial commit to get Bird working

This commit is contained in:
sump pump 2020-04-28 04:16:29 +00:00
parent 25ad0676d7
commit 2dfdfd358b
2 changed files with 30 additions and 1 deletions

22
bird/bird.conf.tmpl Normal file
View File

@ -0,0 +1,22 @@
log stderr all; # Using docker; defer logging to stderr
debug protocols all; # Enable debugging
router id ${address}
protocol bgp {
description "Lixonet BGP uplink for ${address} (ASN: {$asn})"
local as ${asn}
source address ${address} # What local address we use for the TCP connection
path metric 1; # Prefer routes with shorter paths (like Cisco does)
}
# Define a template to use when connecting to other BGP clients
template bgp lixonet_client {
local as ${asn}
}
# Neighbor
protocol bgp test from lixonet_client {
neighbor 172.30.0.16 as 4206969016
}

View File

@ -18,6 +18,13 @@ chmod +x /etc/tinc/lixonet/subnet-up
chmod +x /etc/tinc/lixonet/subnet-down chmod +x /etc/tinc/lixonet/subnet-down
# Bird # Bird
rm -rf /etc/bird/* # Remove existing configuration
rm -v -rf /etc/bird/*
# Copy all tinc default files to /etc/(bird)
find bird -type d | xargs -I '{}' mkdir --verbose -p /etc/{}
find bird -type f | xargs -I '{}' cp --verbose {} /etc/{}
# Fill out templates and remove them after
find /etc/bird/ -type f -name '*.tmpl' -exec sh -c 'sigil -f {} -p $(cat /etc/lixonet/lixonet.conf | tr "\\n" " ") > "$(dirname {})/$(basename {} .tmpl)"' {} \;
find /etc/bird/ -type f -name '*.tmpl' | xargs -I '{}' rm -f {}
docker-compose up -d --build docker-compose up -d --build