cancel
Showing results for 
Search instead for 
Did you mean: 

autoexec.xsf

autoexec.xsf

Arjumand
New Contributor
Hello, what parameters should i put in the .xsf auto execution script so that the initial configuration can be retrieved.
for instance i have all the basic connectivity already in place and someone accidentally uses
unconfig switch all, and reboots the switch..

can there be a autoexec.xsf file script that will at least install basic config like assign IP address to default vlan add and delete ports etc, and will not go to initial setup wizard?

i tried to add basic commands in the .xsf file but after doing unconfig switch all and reboot, that xsf will not load the configuration mentioned in the xsf file rather the switch will start initial configuration wizard.

kindly if someone can shed light on what needs to be added in order for my xsf start kicking in on the reboot.

xsf config contains

conf vlan default ipaddress 10.10.10.200/24
conf vlan default add ports 1 tagged
conf vlan default add ports 23 tagged
conf vlan default del ports 2-22
create vlan data 100
conf vlan data ipaddress 10.20.1.200/24
conf vlan data add ports 1,23 tagged
conf vlan data add ports 2-22
ena ip-forwarding

i need above config to be maintained if someone accidentally erases all the config and reboots
1 ACCEPTED SOLUTION

Tomasz
Valued Contributor II
Hi Arjumand,

I think you'd rather like 'Autoconfigure' script instead.
Put that above to default.xsf and you're good to go.
Please check EXOS User Guide on page 1600:
Autoconfigure:
Configuration commands placed in the default.xsf file are executed by the switch as it comes up and is
unable to find its usual configuration file or if the switch is unconfigured or if the configuration file
cannot be determined due to a corrupt NVRAM.
This returns the switch to some basic configuration. When default.xsf is executed, the show switch
command shows default.xsf as the booted configuration file.
The default.xsf file can have any CLI commands as long as they are all executed within 500 seconds.
The script is aborted when the commands are not executed within that time. When the file is loaded,
the results can be seen by executing the show script output default command.
Autoexecute:
Configuration commands placed in the autoexec.xsf file are executed after a switch loads its
configuration.
The file is not executed when a default.xsf file has been executed. Use the file to execute commands
after a switch is up and running and also to revert changes made to the configuration by UPM scripts
that run persistent commands. The commands must be executed within 500 seconds or the script
execution is aborted.
When an autoexec.xsf file is executed. the results can be seen by executing the show script
output autoexec command.


Hope that helps,
Tomasz

View solution in original post

2 REPLIES 2

Stephane_Grosj1
Extreme Employee
If the plan is to recover from an accidental unconfig switch all, use the default.xsf: it will be executed only after a reboot in default config. Inside that file, put all the relevant commands you need.

Tomasz
Valued Contributor II
Hi Arjumand,

I think you'd rather like 'Autoconfigure' script instead.
Put that above to default.xsf and you're good to go.
Please check EXOS User Guide on page 1600:
Autoconfigure:
Configuration commands placed in the default.xsf file are executed by the switch as it comes up and is
unable to find its usual configuration file or if the switch is unconfigured or if the configuration file
cannot be determined due to a corrupt NVRAM.
This returns the switch to some basic configuration. When default.xsf is executed, the show switch
command shows default.xsf as the booted configuration file.
The default.xsf file can have any CLI commands as long as they are all executed within 500 seconds.
The script is aborted when the commands are not executed within that time. When the file is loaded,
the results can be seen by executing the show script output default command.
Autoexecute:
Configuration commands placed in the autoexec.xsf file are executed after a switch loads its
configuration.
The file is not executed when a default.xsf file has been executed. Use the file to execute commands
after a switch is up and running and also to revert changes made to the configuration by UPM scripts
that run persistent commands. The commands must be executed within 500 seconds or the script
execution is aborted.
When an autoexec.xsf file is executed. the results can be seen by executing the show script
output autoexec command.


Hope that helps,
Tomasz
GTM-P2G8KFN