Public | Automated Build

Last pushed: never
Short Description
Short description is empty for this repo.
Full Description

Dockerfile: Quagga BGP Tutorial

A fedora based container for Iljitsch van Beijnum's quagga BGP tutorial.

Pull pre-built image

docker pull alectolytic/quagga-bgp-tutorial

Build from source

docker build --tag alectolytic/quagga-bgp-tutorial .


Create configuration directory on host

export QUAGGA_CONFIG=$(pwd)/quagga-config
mkdir -p ${QUAGGA_CONFIG}

Configure your router instance

This uses the configuration generated from the course website. The argument given is your router name for the tutorial. In the example F is used.

docker run \
  --volume ${QUAGGA_CONFIG}:/etc/quagga \
  alectolytic/quagga-bgp-tutorial bgpexpert-configure F

Run bgpd and zebra

docker run \
  --detach \
  --volume ${QUAGGA_CONFIG}:/etc/quagga \
  --publish 179:179 \
  --publish 2605:2605 \

Connect to the container

telnet localhost 2605

Stopping the container

To stop, identify the container id, then stop it.

$ docker ps
CONTAINER ID        IMAGE                COMMAND                CREATED             STATUS              PORTS                                          NAMES
a0c599f711e0        ralectolytic/quagga-bgp-tutorial:latest   "/usr/bin/supervisor   8 seconds ago       Up 7 seconds>179/tcp,>2605/tcp   backstabbing_tesla
$ docker stop a0c599f711e0

Launching multiple instances

To do this we create three configuration directories, and configure routers with different ids then start them. Note that we do not map the ports explicitly here.

export QUAGGA_CONFIG=$(pwd)/quagga

for NAME in A B C; do
    mkdir -p ${QUAGGA_CONFIG}.${NAME}
    docker run \
        --volume ${QUAGGA_CONFIG}.${NAME}:/etc/quagga \
        alectolytic/quagga-bgp-tutorial bgpexpert-configure ${NAME}
    docker run \
        --detach \
        --volume ${QUAGGA_CONFIG}:/etc/quagga \
        --publish 179 \
        --publish 2605 \

Identifying host ports

$ docker ps
CONTAINER ID        IMAGE                                    COMMAND                CREATED             STATUS              PORTS                                             NAMES
0a772ec6314d        alectolytic/quagga-bgp-tutorial:latest   "/usr/bin/supervisor   3 seconds ago       Up 2 seconds>179/tcp,>2605/tcp   prickly_lalande
8c021cb657de        alectolytic/quagga-bgp-tutorial:latest   "/usr/bin/supervisor   5 seconds ago       Up 4 seconds>179/tcp,>2605/tcp   boring_leakey
a0eed04d992a        alectolytic/quagga-bgp-tutorial:latest   "/usr/bin/supervisor   8 seconds ago       Up 6 seconds>179/tcp,>2605/tcp   naughty_davinci


The following volumes can be mounted from the host.

Volume Description
/etc/quagga Quagga configuration files.


Port Description
179 BGP/tcp port
2605 Telnet port
Docker Pull Command
Source Repository