I studied Wendell Odom’s Official Cert Guide and the used the accompanying Config Labs with Packet Tracer to prepare for the CCNA exam. They’re both great resources, but I quickly got tired of manually fetching the initial configurations and decided to make ptlab(1) to handle it automatically, allowing me to focus on the labs.
It’s a simple script, but it does all it needs to do. For example, to run “OSPF Interface Config 1” you can simply pass the lab url or id:
$ ptlab 519
and it will run Packet Tracer, fetching the lab configuration as needed.
In the beginning, it simply put the configuration into a file ran Packet Tracer with it directly. Over time, I realized this behavior wasn’t desirable for doing the same lab multiple times, since if you saved it the first time, you’d have to fetch the original again. Now, Packet Tracer is run on a copy, which can either be preserved or overwritten by a new copy on the next run.
The script is available here.