Important: You cannot upgrade PNETLab 4.x or PNETLab 5.x to PNETLab 6.x. PNETLab 6.x require fresh installation of Ubuntu Server 20.04 whereas PNETLab 4.x and 5.x works on Ubuntu Server 18.04
In this blog we will be looking at how we can update PNETLab Version 4.x to 5.3.13 (Stable), If you are looking for the installation procedure on how to install PNETLab then follow THIS link, so continue with the update process you can use any Terminal emulator like PuTTY, SecureCRT, MobaXterm, Xshell, SuperPuTTY, Solar-Putty or Native PNETLab Console i will go with SecureCRT as I am comfortable with it, you can choose whatever you like, the first thing we will doing is to SSH to the PNETLab IP and connect it as shown in the below picture with PNETLab IP Address. Port:22 & with default username: root and click on connect and if its your first time connecting to shh it will ask you to save the Host Key click on Accept & Save and on next screen it will ask for the password, enter the default password: pnet if you have not changed it, Congratulation you have successfully connected to PNETLab via ssh, if you want to check the current version of PNETLab you are running you can login to the PNETLab Web UI and check the current version of PNETLab on Login Screen below PNETLab Logo or you can use the cli command to know the PNETLab version use this below command to view the current version you are running.
mysql -uroot -ppnetlab -D pnetlab_db -e "SELECT control_value FROM control WHERE control_value>1;"
As you can see the current version of my PNETLab is 4.2.10, Now to update it to the Latest Stable version 5.3.13 use the below command and wait until it get finish. (Before you run the update command make sure you can reach internet & DNS ping google.com)
bash -c "$(curl -sL https://labhub.eu.org/api/raw/?path=/UNETLAB%20I/upgrades_pnetlab/bionic/install_pnetlab_latest_v5.sh)"
Once the command is applied PNETLab will start downloading the required packages to update and make sure not to interrupt in between it may take some while to finish (Depends on your Internet & PC Performance).
Once the update process is completed you may reboot the vm to take effect the update, Again you can confirm the PNETLab Version By Logging in to the PNETLab Web UI or by these two commands
mysql -uroot -ppnetlab -D pnetlab_db -e "SELECT control_value FROM control WHERE control_value>1;"
cat /opt/unetlab/version
That’s all you have to do in order to update the PNETLab from 4.x to 5.3.13 Stable version.