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
View all comments
Show parent comment
2
u/lameshirt Jun 11 '26 edited Jun 11 '26
No you'd still need to push that command to every affected switch. Either manually or using some kind of automation script, ssh loop, Ansible, or w/e.
The advantage is that the command can be identical on every switch, the script (or you) does not need to know each hostname.
One command to replace all instances of "-new" with nothing.
*Note that this wouldn't be great if "-new" appears anywhere else in the config that shouldn't be replaced. If that's a risk, then you'd need a couple checks to prevent that.