Page 1 of 1

Is it possible to execute a command automatically on reboot ?

Posted: 27 May 2025 04:22
by 2502chakir2023_
Hi Everyone,

I'm trying to ensure that each time the OS6360 switch reboots, it automatically executes two CLI commands:

aaa radius-server RadiusServerName1 health-check polling-interval 300 username "test" password test failover
aaa radius-server RadiusServerName2 health-check polling-interval 300 username "test" password test failover

Currently, after each reboot, the RADIUS server logs a reject, even though all settings appear to be correct on the switch. However, as soon as I manually re-enter the above command on the switch, everything works as expected and the RADIUS server logs an accept.

Therefore, I'm looking for a way to automatically trigger these commands upon reboot, to ensure proper RADIUS health-check functionality without requiring manual intervention.

Thanks in advance,

Re: Is it possible to execute a command automatically on reboot ?

Posted: 27 May 2025 10:08
by silvio
I think this should be possible - but I don't know an easy way for this.
The commands should fist executed if all network ports are up.
You can create a python script with the commands. But you need a trap that will be trigger the script. You have to test if the switch is sending one or more traps after comming up. F.e. if you have a linkagg to your neigbor switch there should be a trap that the linkagg is up now.
BR Silvio

Re: Is it possible to execute a command automatically on reboot ?

Posted: 03 Jun 2025 17:04
by 2502chakir2023_
That’s exactly how I solved it as well—thanks!
I enabled traps on the uplink, so once the switch reboots and the uplink enters the “UP” state, the “linkUp” trap is triggered. I then used the “event-action” feature to link a Python script to that event.