diff --git a/BGP/bgpipe/Dockerfile b/BGP/bgpipe/Dockerfile new file mode 100644 index 0000000..1f239c2 --- /dev/null +++ b/BGP/bgpipe/Dockerfile @@ -0,0 +1,14 @@ +FROM ubuntu:22.04 +ENV DEBIAN_FRONTEND=noninteractive + +LABEL maintainer="Netlab project " +LABEL description="bgpipe container" + +RUN apt-get update && \ + apt-get install -y bash iputils-ping net-tools iproute2 wget jq && \ + wget https://github.com/bgpfix/bgpipe/releases/download/v0.8.8/bgpipe-linux-amd64 -q -O /usr/local/bin/bgpipe && \ + chmod a+x /usr/local/bin/bgpipe + +WORKDIR /root + +CMD /usr/bin/bash diff --git a/BGP/bgpipe/README.md b/BGP/bgpipe/README.md new file mode 100644 index 0000000..45a5cd0 --- /dev/null +++ b/BGP/bgpipe/README.md @@ -0,0 +1,18 @@ +# Using BGP Pipe + +This directory contains the *netlab* topology file for a lab with a BGP router and a Linux host running BGP Pipe. It also contains a Dockerfile to build a container with BGP Pipe. + +You'll find more details in [this blog post](https://blog.ipspace.net/2024/08/netlab-bgpipe/). + +## Changing Device Types + +The lab topology uses FRRouting running as a container. It can be used with any device supported by the netlab BGP configuration module and *libvirt* or *clab* virtualization provider: + +* To change device type, use the `-d xxx` CLI argument +* To change the virtualization provider, use `-p` CLI argument. + +For example, to start the lab with a Nexus OS virtual machine, use: + +``` +netlab up -d nxos -p libvirt +``` diff --git a/BGP/bgpipe/topology.yml b/BGP/bgpipe/topology.yml new file mode 100644 index 0000000..78a3e1c --- /dev/null +++ b/BGP/bgpipe/topology.yml @@ -0,0 +1,31 @@ +# Configure a BGP session with a Linux host on which we'll run bgpipe + +# Make BGP a valid node attribute so we can configure bgp.as on the node not running BGP +defaults.attributes.node.bgp: + +provider: clab +defaults.devices.linux.group_vars.docker_shell: bash +defaults.device: frr + +nodes: + rtr: + module: [ bgp ] + bgp.as: 65000 + probe: + device: linux + provider: clab + image: netlab/bgpipe:latest + bgp.as: 65100 + +links: +- rtr: + probe: + +message: | + The bgpipe lab is waiting for you ;) Connect to 'probe' with 'netlab connect + 'probe'. The remote router is reachable at 172.16.0.1 and your ASN should be + 65100, for example: + + bgpipe -o speaker --asn 65100 172.16.0.1 + + Good luck!