Containerlab is a brilliant way to bring up network testing labs, and Juniper have released free vJunos images that you can use. In this post I am going to download the vJunos image and load it into my Containerlab server.
Download the vJunos router image
The vJunos router image can be downloaded from:
https://support.juniper.net/support/downloads/?p=vjunos-router
This is a qcow image which will not natively run in Containerlab so you have to convert it.
It is built using vrnetlab project and essentially is a Qemu VM packaged in a docker container format.
Head over to https://github.com/hellt/vrnetlab
Next clone this repo to your machine
git clone https://github.com/hellt/vrnetlab.git
cd into the directory of your chosen vendor, in my case
I also need to SCP the image which I have downloaded on my Mac to my Containerlab Server. This may vary for you but you just need to get the vJunos router image into the vjunosrouters folder
The command for me looks like this
SCP vJunos-router-23.2R1.15.qcow2 [email protected]:/home/roger/vrnetlab/vjunosrouter
I now have the vJunos Router qcow image in the correct folder.
To make the containerised image, just run the command make
Now I have the containerised image which I can use in a ContainerLab topology.
If you haven’t got Containerlab installed check out my Containerlab post here:
https://www.rogerperkin.co.uk/containerlab/
We are just going to build a very simple topology with one router to make sure it spins up ok
Once you have containerlab installed you need to create a file called <yourlab>.clab.yml
name: "Juniper vJunos Router Lab" prefix: "" mgmt: network: fixedips ipv4-subnet: 172.16.250.0/24 topology: nodes: vJunos-1: kind: juniper_vjunosrouter image: vrnetlab/juniper_vjunos-router:23.2R1.15
Then from the directory that contains your topology file run the command sudo clab deploy
You can now ssh to the vJunos router using admin:admin@123
These are the default credentials applied during the container build
Enjoy!
Leave a Reply