0

I am connecting to Junos OS on Juniper EX-2200 switches using minicom as shown below

minicom -C log_sw1 sw1

Now I have a series of commands that I need to execute on sw1.(example shown below)

cli
request system zeroize
show config
show interface
edit 
delete protocols
set system arp aging-timer 240

I want to avoid having to type these commands every time I log into the system.I want to put them in a config file and I want the it to be execute every time I log into the switch using minicom.

Is there any way I can achieve this?

1 Answer 1

1

runscript is what you're looking for.

print "Starting Juniper EX-2200 switch configuration: "
send ""
expect {
    "EX-2200>"
}
send "cli"
expect {
    "..."
}
...

Give it a try.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .