Add FRRouting support to VPP Containerlab
This commit is contained in:
@ -5,6 +5,7 @@ CLAB_VPP_FILE=${CLAB_VPP_FILE:=/etc/vpp/clab.vpp}
|
||||
VPPCFG_VPP_FILE=${VPPCFG_VPP_FILE:=/etc/vpp/vppcfg.vpp}
|
||||
NETNS=${NETNS:="dataplane"}
|
||||
BIRD_ENABLED=${BIRD_ENABLED:="true"}
|
||||
FRR_ENABLED=${FRR_ENABLED:="false"}
|
||||
|
||||
echo "Creating dataplane namespace"
|
||||
/usr/bin/mkdir -p /etc/netns/$NETNS
|
||||
@ -25,6 +26,13 @@ if [ "$BIRD_ENABLED" == "true" ]; then
|
||||
/usr/bin/nsenter --net=/var/run/netns/$NETNS /usr/sbin/bird -u bird -g bird
|
||||
fi
|
||||
|
||||
if [ "$FRR_ENABLED" == "true" ]; then
|
||||
echo "Starting FRRouting in $NETNS"
|
||||
ROUTERID=$(ip -br a show eth0 | awk '{ print $3 }' | cut -f1 -d/)
|
||||
sed -i -e "s,^ip router-id .*,ip router-id $ROUTERID," /etc/frr/frr.conf
|
||||
/etc/init.d/frr start
|
||||
fi
|
||||
|
||||
echo "Generating $CLAB_VPP_FILE"
|
||||
: > $CLAB_VPP_FILE
|
||||
MTU=9216
|
||||
|
Reference in New Issue
Block a user