Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
I would like to send the following commands to a 3560-CX 8-Port Switch:
enable
interface range GigabitEthernet 0/1-8
power inline static
no cdp enable
exit
exit
copy running-config startup-config
But prior to being able to enter any commands, I mus...
I am looking for a way to create a "BATCH" or "BASH" like set of commands where I can log into a new switch, and run a prewritten set of commands.
I would also be VERY open to executing this on an RaspberryPI where I can plug into the USB-B interf...
Thank you for your help!!
I do have a few questions in regard to the code you posted.
I will also comment below the error message I received. I placed comments below each line in your code.
#!/usr/bin/expect -f
set timeout 20
set 10.10.10.1
set...
I just saw that... using the "<" symbol now leaves me with a Prompt window with a blinking cursor. I can press enter, but this time I won't enter into the switch console. I can issue commands such as "dir", but it yeilds nothing in return.
If I enter...
I just attempted this and it did not work. I have included the BATCH file below.
I used the "echo. |" as a preceding command to create the initial "Enter" command so I can access the command link of the CLI on the switch.
timeout 5
@echo off
echo.
...
Genius. I am going to try this now. It's a quick solution to avoid unnecessary typing. In the future, I will attempt something on the RPi.
Thanks again!!