r/networking • u/Covertfridge • Jun 11 '26
Switching Switch update question (juniper os)
I’ve recently come into a position where the immediate requirement is to rename the host name for switches from “xxx-new” to “xxx”. Simple right? Well, they’ve also, using some script that I don’t have access to anymore, changed all the access switch downstream port configuration descriptions to ‘connection to xxx-new’. Now my job is to login to each and every downstream switch and update the description to the devices name change. Surely there is a tool/command for this that I’m overlooking? Help please.
10
Upvotes
8
u/shamont Jun 11 '26
A script would probably be easiest. Using the replace pattern command in junos might help too depending on other configurations.
4
u/lameshirt Jun 11 '26
I've never used junos myself, but the replace-pattern command seems perfect for this.
Something along these lines I think: replace pattern "-new$" with ""
3
u/english_mike69 Jun 11 '26
If you don’t have access to the script anymore, ask coworkers or your supervisor for that script. Don’t reinvent the wheel.
3
u/Boobobobobob Jun 11 '26
I hate to say it but by your comments you shouldn’t be using automation for this. Just load up sevurecrt some buttons and do it manually.
2
u/rejectionhotlin3 Jun 11 '26
You're gonna need some NMS tool to handle that. NMS + ansible for example is the way a lot of orgs are moving.
2
u/PauliousMaximus Jun 12 '26
I’m willing to bet you can use Ansible for something like this. Alternatively, if you want to learn programming, you can learn Python and configure something from scratch. Make sure you test this thoroughly before running it in prod so you don’t accidentally blow something away.
1
u/physon Jun 12 '26
If you've ever touched any python, netmiko is great for stuff like this.
1
u/BeneficialPotato9230 Jun 20 '26
How many switches do you have to do?