The script is proposed to deploy a network topology drawn in draw.io using containerized FRR as routers. The script uses Docker file creates docker-compose file and container configuration files (docker-start, per container image).
A mapping between draw.io and docker objects is depicted on the figure below:
You can use any shapes for router and broadcast networks. IPv4 subnets are supported right now only. You can use prefix length <= /29 since docker host uses one address from each subnet.
- Clone the repo
git clone https://github.com/alekshi/topology_builder.git
cd topology_builder/
- Draw a network diagram using draw.io and export to xml (without compressing). If VRFs are going to be used, put them in a list after new line in router name (like:
VRF:[RED,GREEN,BLUE]) - To use MPLS with Linux kernel, load additional modules:
modprobe mpls_router
modprobe mpls_gso
modprobe mpls_iptunnel
- Lanuch topology_builder.py to create docker-compose file and frr/docker-start file
./topology_builder.py -f <XML topology file path>
Default settings include:
- Ellipse as router
- Rectangle as broadcast network
- All FRR daemons are enable
- MPLS is disable
- IPv6 is disable
- SSH authentication by login/password (root/root)
Use
--helpto see all options
- Launch docker-compose file to create topology
docker-compose up -d
- Check ports what are exposed for ssh connection using
docker container lsBy default 2000+ ports are used for ssh and root/root credentials. It is possible to create own password or use public key for SSH authentication. Use--help