Initial commit to get Bird working
This commit is contained in:
parent
25ad0676d7
commit
2dfdfd358b
22
bird/bird.conf.tmpl
Normal file
22
bird/bird.conf.tmpl
Normal 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
|
||||
}
|
9
build.sh
9
build.sh
@ -18,6 +18,13 @@ chmod +x /etc/tinc/lixonet/subnet-up
|
||||
chmod +x /etc/tinc/lixonet/subnet-down
|
||||
|
||||
# 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user