Conquering Legacy Tech: rConfig's Clever Solution to Avaya Switch Telnet Challenges
Hello everyone! As the CTO of rConfig, I'm often in the trenches, dealing with all sorts of quirky tech scenarios. Today, I'm excited to share a recent adventure we had with an ISP in the UK, featuring a legacy Avaya Switch series. You can check out the product details here: Avaya Switch Series Datasheet. It's quite the read!
Our journey began when a customer needed help backing up this device via telnet – a request we simply couldn't ignore. We pride ourselves on not letting our customers down, so we rolled up our sleeves and dove in. Several caffeine-fueled hours later, we emerged victorious with an elegant and surprisingly simple solution. And guess what? It works for both our pro and core customers.
Now, let's talk about the problem. When you log into these devices via telnet, you're greeted with a splash screen. From a marketing standpoint, it makes sense, but it's a bit of a hurdle for automation scripts. You're prompted to press ctrl+y to proceed, a small but crucial step. See the screenshot below:
Screenshot of Avaya switch spalsh screen vty100
After bypassing the initial splash screen, you encounter another one – a reminder of the days when CLI interfaces were designed solely for human interaction. You enter your username and password, fill in the fields, and voilà, you're at the standard switch prompt, ready to get down to business.
Screenshot of Avaya switch logn screen vty100
But here's the kicker: when accessing the device via standard telnet, your keystrokes are translated into VT100 control codes, which the CLI's VT100 interpreter then processes. This is great for humans, but not so much for scripts or applications like rConfig. We needed a way to get passed the splash screens and proceed to the CLI prompt, all without human intervention.
Speaking of rConfig, our Telnet engine is pretty robust, supporting thousands of different vendor implementations. But this Avaya switch presented a unique challenge. We realized we were dealing with a VT100 implementation, evident from the special character strings in the rConfig debug output.
Here are some examples of what we saw when working on VT100 connsoles. A bit like the matrix, an experieinced eye can see the patterns in the output right away.:
[24;0HE/
[24;0HE
[24;38H
[24;19H
[?25h
[1;24r
[24;1H
[2K
So, what was the solution? It turned out to be straightforward. We needed to identify the VT100 control code for ctrl+y, which is x19 (you can find it here: IBM VT100 Control Characters). The actual PHP code to send this was simply:
fwrite($this->connection, '\X19'); // ASCII code for Ctrl+Y
To keep this solution flexible for rConfig, we added special parameters to a new connection template for this device. Based on these parameters, the system sends ctrl+y and credentials in response to specific data.
Here's a glimpse of the template code:
vt100:
hasSplashScreen: "on"
splashScreenReadToText: "008"
splashScreenSendControlCode: "\x19"
The full template is in our templates github repo https://github.com/rconfig/rConfig-templates/tree/master/Avaya
In conclusion, this adventure underscores the versatility of rConfig. We're not just about managing configurations; we're about embracing the challenge of legacy devices and protocols, ensuring our platform remains vendor-agnostic and flexible. And yes, troubleshooting this with a fantastic customer was a blast!
Oh, and by the way, all tests passed post-implementation in both Core and Pro versions:
Screenshot of recent rConfig suite of tests all passed
There you have it! A little peek into the life of a CTO at rConfig, where every day is a new opportunity to tackle the fascinating world of network management. Stay tuned for more tales from our tech adventures!