Juniper - pyez driver and structured ping/traceroute #171
Unanswered
MorningLightMountain713
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I've been testing hyperglass and am looking to roll this out in our prod environment in the next while.
We are soley a Juniper shop. I was having good success with the netmiko driver, but I find it quite restrictive. Especially when it comes to tracroutes and driver timeouts. The whole netmiko delay factor is pretty naff and slows down every other command just so I can get traceroutes to work.
I ended up writing a pyez driver, which is pretty straightforward.
I've converted all the juniper commands to rpc's, I really don't like netmiko just doing straight ssh sessions - this defeats the whole point of netconf, I want to be able to lock our routers down to only allow netconf (i.e ssh -s netconf) for security purposes, as in no tty. I can't do that with netmiko.
The way I've done it though doesn't feel right, I've just updated the commands to be dicts with the rpc info, then dump that to a string so it passes vaildation.
Using pyez on Juniper with RPCs is far faster than I can get with Netmiko. Can also return structured data for the traceroute and ping which is easier to parse.
The main problem with traceroutes is for queries where all 30 hops are timeouts, means you've got to wait 90 seconds for a response. I've found by limiting the ttl to 20 hops, this is a good compromise. Most routes are less than 20 hops anyway.
Another option would be to make the ttl command configurable for Netmiko - that would solve 99% of my problems.
Any input here? Cheers.
Beta Was this translation helpful? Give feedback.
All reactions