BIRD appliance

This commit is contained in:
Bernhard Ehlers 2015-11-10 11:38:09 +01:00
parent 004a241555
commit 8fbb91d477
4 changed files with 101 additions and 0 deletions

42
appliances/bird.gns3a Normal file
View File

@ -0,0 +1,42 @@
{
"name": "BIRD",
"category": "router",
"description": "The BIRD project aims to develop a fully functional dynamic IP routing daemon primarily targeted on (but not limited to) Linux, FreeBSD and other UNIX-like systems and distributed under the GNU General Public License.",
"vendor_name": "CZ.NIC Labs",
"vendor_url": "http://bird.network.cz/",
"documentation_url": "http://bird.network.cz/?get_doc&f=bird.html",
"product_name": "BIRD internet routing daemon",
"registry_version": 1,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
"usage": "Configure interfaces in /opt/bootlocal.sh, BIRD configuration is done in /usr/local/etc/bird",
"qemu": {
"adapter_type": "e1000",
"adapters": 4,
"ram": 128,
"arch": "x86_64",
"console_type": "telnet"
},
"images": [
{
"filename": "bird-tinycore64.img",
"version": "1.5.0",
"filesize": 22413312,
"md5sum": "3745838f18f345febe85232d74d1627a",
"download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/",
"direct_download_url": "http://downloads.sourceforge.net/project/gns-3/Qemu%20Appliances/bird-tinycore64.img"
}
],
"versions": [
{
"name": "1.5.0",
"images": {
"hda_disk_image": "bird-tinycore64.img"
}
}
]
}

View File

@ -17,6 +17,17 @@ The only added packages are:
packer build core-linux.json
BIRD
'''''
A build of Core with BIRD Internet Routing Daemon preinstalled.
.. code:: bash
packer build -var-file=bird.json core64-linux.json
Openvswitch
''''''''''''

View File

@ -0,0 +1,5 @@
{
"vm_name": "bird-tinycore64.img",
"setup_script": "bird.sh",
"disk_size": "500"
}

View File

@ -0,0 +1,43 @@
# Original instructions: http://brezular.com/2011/01/20/linux-core-as-router-and-l3-switch-appliance/
set -x
tce-load -wi bird
# disable automatic interface configuration with dhcp
sudo sed -i -e '/label .*core/,/append / s/\(append .*\)/\1 nodhcp/' /mnt/sda1/boot/extlinux/extlinux.conf
# create seperate directory for bird configuration
sudo mkdir /usr/local/etc/bird
sudo mv /usr/local/etc/bird.conf /usr/local/etc/bird/bird.conf.example
sudo cp -p /usr/local/etc/bird/bird.conf.example /usr/local/etc/bird/bird.conf
sudo ln -s bird/bird.conf /usr/local/etc/bird.conf
sudo mv /usr/local/etc/bird6.conf /usr/local/etc/bird/bird6.conf.example
sudo cp -p /usr/local/etc/bird/bird6.conf.example /usr/local/etc/bird/bird6.conf
sudo ln -s bird/bird6.conf /usr/local/etc/bird6.conf
sudo sed -i -e 's/^#\( *router *id \)/\1/' /usr/local/etc/bird/bird6.conf
sudo chown -R gns3:staff /usr/local/etc/bird
# add bird configuration to backup list
echo "usr/local/etc/bird/" >> /opt/.filetool.lst
echo "usr/local/etc/bird.conf/" >> /opt/.filetool.lst
echo "usr/local/etc/bird6.conf/" >> /opt/.filetool.lst
# add startup script for bird
cat >> /opt/bootlocal.sh <<'EOF'
# Boot parameter "nodhcp": network interfaces are configured statically
if grep -q -w nodhcp /proc/cmdline; then
# This waits until all devices have registered
/sbin/udevadm settle --timeout=10
# configure static interface addresses and routes
#ifconfig eth0 x.x.x.x netmask 255.255.255.0 up
#route add default gw y.y.y.y
fi
/usr/local/sbin/bird -u gns3 -g staff
/usr/local/sbin/bird6 -u gns3 -g staff
EOF
exit 0