Add bird2 + skeleton config
This commit is contained in:
1
files/etc/bird/bird-local.conf
Normal file
1
files/etc/bird/bird-local.conf
Normal file
@ -0,0 +1 @@
|
||||
# Containerlab user overrides go in this file.
|
26
files/etc/bird/bird.conf
Normal file
26
files/etc/bird/bird.conf
Normal file
@ -0,0 +1,26 @@
|
||||
# Bird2 configuration for VPP Containerlab
|
||||
|
||||
# router id 192.0.2.0;
|
||||
|
||||
timeformat base iso long;
|
||||
timeformat log iso long;
|
||||
timeformat protocol iso long;
|
||||
timeformat route iso long;
|
||||
|
||||
log "/var/log/bird/bird.log" { debug, trace, info, remote, warning, error, auth, fatal, bug };
|
||||
|
||||
protocol device { scan time 30; }
|
||||
|
||||
protocol direct { ipv4; ipv6; check link yes; }
|
||||
|
||||
protocol kernel kernel4 {
|
||||
ipv4 { import none; export where source != RTS_DEVICE; };
|
||||
learn off; scan time 300;
|
||||
}
|
||||
|
||||
protocol kernel kernel6 {
|
||||
ipv6 { import none; export where source != RTS_DEVICE; };
|
||||
learn off; scan time 300;
|
||||
}
|
||||
|
||||
include "bird-local.conf";
|
@ -3,6 +3,7 @@
|
||||
STARTUP_CONFIG=${STARTUP_CONFIG:="/etc/vpp/startup.conf"}
|
||||
CLAB_VPP_FILE=${CLAB_VPP_FILE:=/etc/vpp/clab.vpp}
|
||||
NETNS=${NETNS:="dataplane"}
|
||||
BIRD_ENABLED=${BIRD_ENABLED:="true"}
|
||||
|
||||
echo "Creating dataplane namespace"
|
||||
/usr/bin/mkdir -p /etc/netns/$NETNS
|
||||
@ -14,6 +15,15 @@ sed -i -e 's,^#PermitRootLogin prohibit-password,PermitRootLogin yes,' /etc/ssh/
|
||||
sed -i -e 's,^root:.*,root:$y$j9T$kG8pyZEVmwLXEtXekQCRK.$9iJxq/bEx5buni1hrC8VmvkDHRy7ZMsw9wYvwrzexID:20211::::::,' /etc/shadow
|
||||
/etc/init.d/ssh start
|
||||
|
||||
if [ "$BIRD_ENABLED" == "true" ]; then
|
||||
echo "Starting Bird in $NETNS"
|
||||
mkdir -p /run/bird /var/log/bird
|
||||
chown bird:bird /var/log/bird
|
||||
ROUTERID=$(ip -br a show eth0 | awk '{ print $3 }' | cut -f1 -d/)
|
||||
sed -i -e "s,.*router id .*,router id $ROUTERID; # Set by container-init.sh," /etc/bird/bird.conf
|
||||
/usr/bin/nsenter --net=/var/run/netns/$NETNS /usr/sbin/bird -u bird -g bird
|
||||
fi
|
||||
|
||||
echo "Generating $CLAB_VPP_FILE"
|
||||
: > $CLAB_VPP_FILE
|
||||
MTU=9216
|
||||
|
Reference in New Issue
Block a user